سؤال

I am using asmack to work with openfire xmpp server. I have created conference(room) and two contacts are joined to this room. But both contacts are getting message like this room is not anonymous . When I googled, I got this link. So as per the discussion over there I have to set room.canAnyoneDiscoverJID to false. But I dont know how to set it in asmack

Please tell me how to set it in asmack

هل كانت مفيدة؟

المحلول

I have to set room.canAnyoneDiscoverJID (default true). The equivalent of this in smack(asmack) is muc#roomconfig_whois.

    Form submitForm = multiUserChat.getConfigurationForm().createAnswerForm();
                            submitForm.setAnswer("muc#roomconfig_publicroom", true);
                            submitForm.setAnswer("muc#roomconfig_persistentroom", true);
                            submitForm.setAnswer("muc#roomconfig_roomname", room);
                            submitForm.setAnswer("muc#roomconfig_whois",Arrays.asList("none"));
    multiUserChat.sendConfigurationForm(submitForm);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top