title: Sending push notification to all users in query
body: <p>I am creating an app that uses Parse cloud. I am trying to send a message from a user to all others. After writing the message in a textfield and pressing send, the delegate calls the following method and the push is handled as shown below:</p>
  
  <pre><code>- (BOOL)textFieldShouldReturn:(UITextField *)textField
  {
  //hide keyboard
  [textField resignFirstResponder];
  
  NSString *message = self.broadcastText.text;
  
  //create a user query
  PFQuery *query = [PFUser query];
  PFUser *current = [PFUser currentUser];
  NSString *currentUsername = current[@"username"];
  [query whereKey:@"username" notEqualTo:currentUsername];
  
  //send push in background
  PFPush *push = [[PFPush alloc] init];
  [push setQuery:query];
  [push setMessage:message];
  [push sendPushInBackground];
  
  //clear text field
  textField.text = @"";
  
  return YES;}
  </code></pre>
  
  <p>What's happening is when I send the message, the sender (in this case me) is receiving the push notification as well. What I tried to do is get the current user's username and then create a user query that queries for all users whose usernames are not equal to the current user's username.</p>
  
  <p>However, it didn't work, the message was also being sent to all users including the sender.</p>
  
  <p>Note: I also tried using [query whereKey:@"username" notEqualTo:currentUsername]; just for debugging, and when I try to send the message, neither the sender nor any other device receives it. (when actually no one should receive it except the sender).</p>
  
  <p>Any help would be greatly appreciated. Thank you.</p>