powered by Jive Software

What should return Message.getFrom()?

Hello,

I’'m currently experiencing Jabber & Smack… doing some “bot” to enforce business rules & provide business events on top of the chat.

So I have coded a proff of concept, a little bot to monitor chatrooms.

And so, when I have to retrieve participant information to enforce those rules using a MessageListener+PacketListener added to a chatroom, it only give me today something like :

myroom@conference.myserver/nickname

but I feel that, as opposite to the jabberID (unique_name@server), this nickname is very volatile and I did not find any way to retrieve the JabberId from this chatroom context identification to enforce my business rules.

Did I miss something ?

thx

shazz

You may get the user’'s JID from room presence packets. Room presence packets have a MUCUser extension which includes a MUCUser.Item. This MUCUser.Item may contain the full JID of the associated user. The “may” is based on whether the user receiving the presence packet has permission to see the full JID of room participants.

-Pony