Subscription doesn't respect notEqualTo in pointer field

Hello!
For some reason the following two queries (query and subscription) gives me different results.

QUERY:

let query = new parse.Query('ChatMessage');
const user = parse.User.current();
query.notEqualTo('author', user);
query.containedIn('chat', chats);

return query.find();

SUBSCRIPTION

let query = new parse.Query('ChatMessage');
const user = parse.User.current();
query.notEqualTo('author', user);
query.containedIn('chat', chats);

return query.subscribe();

The query gives the expected result where I get an array of ChatMessages where messages written by current user (author pointer) is excluded.
The subscription triggers create events when ChatMessages written by the logged in user is created.

Why? Is it a bug by me? Is it a bug in parse? Is it an (undocumented?) limitation in parse?

The subscription should work as you expect with this query. What I saw happening with other apps and maybe is happening for you: maybe you are first creating the ChatMessage object (without assigning the author) and later assigning the author. In this case you will have the create event triggered for the first action and the leave event triggered for the second action. This behavior uses to happen a lot when using the Parse Dashboard to test the subscriptions. Could you please double check if that’s not your case?

Thx for the answer!

I’ll look into if this could be the case :+1: