plugin XEP-0045: set the entity data "type" asap (userJoinedRoom is triggered before the join callback)

This commit is contained in:
souliane 2014-10-20 15:09:37 +02:00
commit af7277d4f4

View file

@ -128,7 +128,6 @@ class XEP_0045(object):
self.host.bridge.roomJoined(room.roomJID.userhost(), [user.nick for user in room.roster.values()], room.nick, profile)
room_jid_s = room.roomJID.userhost()
self.host.memory.updateEntityData(room.roomJID, "type", "chatroom", profile)
self.clients[profile].joined_rooms[room_jid_s] = room
if room.locked:
#FIXME: the current behaviour is to create an instant room
@ -695,6 +694,7 @@ class SatMUCClient (muc.MUCClient):
log.debug('receivedGroupChat: room=%s user=%s body=%s' % (room, user, body))
def userJoinedRoom(self, room, user):
self.host.memory.updateEntityData(room.roomJID, "type", "chatroom", self.parent.profile)
if user.nick in self.__changing_nicks:
self.__changing_nicks.remove(user.nick)
else: