Is there a way to send messages (e.g. "system messages") into chat rooms outside of the client SDK? I'd like to do this through my own server to prevent abuse etc.
Thank you for choosing Photon!
No, there is no built-in way to do this.
Here are the two ways you could use this:
Thanks for your response. I hope you'll consider adding this feature, as in our case, your 2 suggestions don't apply unfortunately.
Our use case is that we have groups of players in our game that each have their own channel and when certain game events take place within the group (independently of chat messages), we want to be able to inject system messages like "Player X achieved Y!".
What I suggested before can help you achieve your goal.
either clients could poll (to check for new events) from web backend via PublishMessage webhook (response make use of Data to override message and return event system message)
or special web client(s) send(s) event system message to each group channel (either subscribe to all beforehand or subscribe and publish on demand).
but of course you could also choose to do it from your own backend in a custom way independently from Photon Chat.
Thanks for the suggestions @JohnTube, but as I mentioned before, this doesn't really help us because we don't want to have clients poll (defeats the purpose of having a realtime/chat service) or rely on the PublishMessage webhook (which is strangely reliant on the client allowing this with the forwardAsWebhook parameter 🤯).
We also cannot run a special web client because there's no SDK for our backend environment (python). Today we've run into an additional limitation, which is that there is no way to remove/kick a user from a channel through Photon.
Once again, I hope you'll consider adding a server-to-server API for your service. Relying on the client apps to do the right thing just isn't feasible or secure enough for serious apps/games.