powered by Jive Software

How to get the JID of a MUC user


#1

hi,

i’'m stuck at this problem: im listening on a MUC for messages for a specific user. i want to identify the user of an incoming message with its JID. but getting the Message#getFrom() just gives me the nickname the user used in the MUC. how can i get the real JID of the incoming message or in general, how can i get the JID of a MUC participant?

thank you,

durroon


#2

If you create a room, or control the room configuration, there is a configuration property to make the users use their “real” JIDs when participating in a MUC: muc#roomconfig_whois.

Thanks,

Alex


#3

thx man! that was exactly what i was searching for!


#4

forgive me for asking this again, but how set that configuration property of the room?

thanks in advance.


#5

when you create a room,you should add configuration as follows:

List memTypeList = new ArrayList<>();
memTypeList.add(“anyone”);
submitForm.setAnswer(“muc#roomconfig_whois”, memTypeList);


#6

hi,with this configuration ,but how Can i get the real jids from this message?
Thanks!