From af7277d4f478647c9167cab2bafadffa5b638b84 Mon Sep 17 00:00:00 2001 From: souliane Date: Mon, 20 Oct 2014 15:09:37 +0200 Subject: [PATCH] plugin XEP-0045: set the entity data "type" asap (userJoinedRoom is triggered before the join callback) --- src/plugins/plugin_xep_0045.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/plugin_xep_0045.py b/src/plugins/plugin_xep_0045.py index 76f27715..96b500c0 100755 --- a/src/plugins/plugin_xep_0045.py +++ b/src/plugins/plugin_xep_0045.py @@ -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: