0
votes

In older version of ejabberd and strophe, the user needs to send room/nickname in 'from'. But in the updated version of ejabberd, what needs to set in from attribute of presence element?

I sent from="[email protected]/John" where 'John' is the nickname. I received many stanzas, but some of them are without a nickname. Instead, it has ID in number. Is there any reference for that number?

Is there any mechanism/config to get presence specific to a particular chat room in which the user is involved?

1

1 Answers

2
votes

As specified in https://xmpp.org/extensions/xep-0045.html#enter the FROM attribute of PRESENCE element must be the user full jid, and the TO must be the room/nickname.

Real example:

<presence id='42:841254'
    from='user1@localhost/resource1'
    to='[email protected]/mynickname'>
</presence>