API backwards compatibility?

i’m trying to update to 3.4.1 and i come to find out that my custom plugin does not work b/c there have been major changes to the api. shouldn’t there have been more warning about this?

also, why the changes? for example, MultiUserChatServer.getChatUser(JID) is missing completely! has it been replaced somewhere else? who knows! now i’m unsure whether my plugin is even possible any more due to (seemingly) missing api calls which i used.
icqoffline.log (7650 Bytes)

Hi kthorn,

A lot of the changes you’re seeing are a result of all the clustering work that Gato did for 3.4.0. I haven’t worked much with various MUC api’s but I would imagine that it would be possible to rework your plugin so that it still does what you need it to do. What does your plugin do once it has a reference to the MUCUser?

Thanks,

Ryan

i’m simply trying to collect all the chat room roles for a given session. (room@server/nickname)

this was done before as:

MultiUserChatServer mucs = XMPPServer.getInstance().getMultiUserChatServer();

MUCUser chat_user = mucs.getChatUser(session.getAddress());

Iterator roles = chat_user.getRoles();

while (roles.hasNext()) {

…etc, etc

all of this is in response to a PresenceEventListener.presenceChanged event.

is there an easy way to do this in a cluster-agnostic fashion? it seems that i may be given Remote* versions of MUCUser and i’m not sure how i’d handle that. i’m not even sure of all the ways to even GET an instance of (Local/Remote)MUCUser.

Hey kthorn,

Sorry for the inconvenience. As part of adding clustering support to MUC I removed unused/old API so that the new API could still be as simple as possible. I created JM-1181 and checked in the improvement. In the next nightly build you will find the new API.

Thanks,

– Gato

gato,

no problem, i was just a little frazzled when i couldn’t find an equivalent call.

If the methods in question were unused/old for a reason, i have no problem finding the roles in a more idiomatic way WRT to openfire. but if that didn’t exist, thanks so much for adding it back in! i’ll give it a try this afternoon.

Hey kthorn,

Note that JM-1181 changes the way you used to get the roles of a given user session. The API is now simpler than before (ie. more straight forward). We added MultiUserChatServer#getMUCRoles(JID user) that will return to you a Collection of MUCRole(s).

Regards,

– Gato

This is close to what I was trying to get at with my MUC Room Creation and Permissions from Plugin post, but I still don’t see how I’m supposed to create MUCUser given the fact MultiUserChatServerImpl.getChatUser() is private.

Also see archived message: http://www.igniterealtime.org/community/message/124034#124034 for code example using now defunct API.

Thanks!