Here's a small patch that is necessary for correct behavior after first removing a chat room from the contact list. The issue is as follows.
1. One creates/joins a chat room and then leaves the chat room. (So the chat room is in the list.)
2. Then remove the chat room from the contact list.
3. Now when calling the MUCService for creating a new chat room (returns chat room wrapper) it immediately assumes that the protocol service provider (OperationSetMultiUserChat instance) does not know such a chat room, even though it did not explicitly remove it from the OSMUC instance.
The current patch tries to find the chat room before attempting to create it. If it cannot find the room, it will create the room as it would otherwise.
For me specifically, if this patch isn't applied, I can reliably reproduce an OperationFailedException that is thrown as per specification if createChatRoom is called for an existing chat room.
find-before-create-chatroom.patch (1.4 KB)