I'm building a chat feature on iOS. I'm using PubNub's publish/subscribe system for sending messages between clients.
Problem:
Whenever I publish to a channel that I'm subscribed to, I also get a push notification of the message I sent. Although, I can simply ignore this when the app is in the foreground, the problem arises when the notification is delayed and the app goes to the background.
I would like to only receive push notifications when other people send messages to the channel. It doesn't make sense to get notified that you sent a message.
A solution I'm considering is creating additional channels just for push notifications but I find that inefficient and a bit hacky. Please tell me there's another solution.