Using PEP for nicknames

Hi,

Im fairly new to XMPP and ejabberd.

I'm creating a chat app with Electron and the node-xmpp module. I have managed to do almost everything for a basic chat app except the nicknames.

If I send the basic IQ nickname set to save the nickname on my own roster

<iq type="set" id="RosterSet-Nick"><query xmlns="jabber:iq:roster"><item jid="eperezf@localhost" name="EPerezF"/></query></iq>

I get a normal response:
<iq from="eperezf@localhost" to="eperezf@localhost/chatapp" id="RosterSet-Nick" type="result" xmlns:stream="http://etherx.jabber.org/streams"/>

and my nickname gets saved to my own roster.

But when I want to change my nickname with a PEP event so everyone on my roster receives my nickname change using:

<iq from="eperezf@localhost" type="set" id="pub1"><pubsub xmlns="http://jabber.org/protocol/pubsub"><publish node="http://jabber.org/protocol/nick"><item><nick xmlns="http://jabber.org/protocol/nick">EPerezF</nick></item></publish></pubsub></iq>

I only get a IQ result response:

<iq from="eperezf@localhost" to="eperezf@localhost/chatapp" id="pub1" type="result" xmlns:stream="http://etherx.jabber.org/streams"><pubsub xmlns="http://jabber.org/protocol/pubsub"><publish node="http://jabber.org/protocol/nick"><item id="5D4D989D24927"/></publish></pubsub></iq>

But no message on my own account or on my contacts accounts.

Is PEP disabled in ejabberd? What do I have to do to enable it? Why I'm not getting the message stanza with the information?

I'm using an ejabberd server on Ubuntu created in DigitalOcean.

Thanks!

Syndicate content