Complex query stopped working after update

Hello everyone, I am Loupax and this is my first thread here. Nice meeting you :smile:

Yesterday, I attempted to update my application from Meteor to Meteor I was having this query that was working, but not anymore:

Meteor.publish('NearbyMessages', function(point) {
        var query = [];
        // Gather all messages that are nearby
                 $near: {
                     $geometry: {type: 'Point', coordinates: [point.longitude, point.latitude]},
                     $maxDistance: 1000
        // Also gather all the messages made by this.userId
        query.push({poster_id: this.userId});
        return MessagesCollection.find({$or: query});

I remember that I had the exact same problem in times before Meteor 1.0 so when I saw this code running on Meteor I thought that it was now possible and I didn’t have to worry about this thing anymore…

After that, I tried publishing the result of both queries doing something like this:

var self = this;
    self.added('messages', msg._id, msg);
    self.added('messages', msg._id, msg);

This would publish the results of both queries, but the result doesn’t seem to be reactive anymore.

Is what I’m trying to do possible? Is it on the roadmap? Any suggestion is welcome :smile:

You should create a reproduction and post it on Github.

The app is already on GitHub, the publication in question is located here.

Steps to replicate:

  1. Clone the app
  2. Run it
  3. Do meteor update at the project root and restart the application
  4. See the error messages on the console while nothing gets published
  5. Rerun the application with meteor --release to see it working properly again