Receiving push notifications in the background

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.

Hello @jeraldo,

In the case of one-on-one communication, you won’t receive any push notification of yourself.
In the case of the group, the user will still receive his own push notifications which can be avoided by manipulating the same in the ‘didReceive’ method. (This is due to the topic-based implementation of push notifications)

To avoid this, we are launching v2 push notifications very soon. In v2 push notification user has to register only his fcm token on the server and all things will be handled by the CometChat PushNotification server.