Hi. When sending a message, the current user is also receiving push notification for his/her own message. I understand that this can be intercepted in the client but only in the foreground.
I think if the receiver of the APNS is the same sender, perhaps that “alert”, “badge”, and “sound” should not be included in the payload. Therefore, the app can still receive the remote notification but it will be silent and will not display at all to the current user. I currently see no use case for the user to see his/her own notification in the UI.