[ejabberd] how to pass custom messages to one of the clients in a chat
abhishek at blacklightsw.com
Thu May 25 11:13:02 MSK 2017
I have placed the erlang code of a simple tic-tac-toe game inside ejabberd, and
I have made a set up using ejabberd and Pidgin where when user sends a message to the the other user in an xmpp chat I can see the game running in ejabberd live. But under this scenario the other user is just getting the message sent by the first user and nothing else. I wanted to send the receiving user with game state like a list or tuple also along with the message on Pidgin.
what I have found till now is that the xmpp message stanza has a body attribute and a text attribute where the simple message sent by any user is present.
But how can I inject a custom list or a tuple there to send it to the other user so that he can also see the game's state.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ejabberd