1

I'm trying to query whether a PFUser exists in another PFUser's 'blockedUsers' relation column before sending a push notification:

I have written this but it doesn't seem to be working:

var recipientBlockList = toUser.relation("blockedUsers");
var blockListQuery = Parse.Query(recipientBlockList);
blockListQuery.contains(fromUser);
blockListQuery.find({
    success: function(users) {

    },
    error: function() {

    }
});
Halpo
  • 2,982
  • 3
  • 25
  • 54

1 Answers1

1

For relation object queries, you should use yourRelation.query():

var blockListQuery = recipientBlockList.query();
kRiZ
  • 2,320
  • 4
  • 28
  • 39