xep-0045: ignore non standard presence received between own presence and room subject
This commit is contained in:
parent
c1c7b0446c
commit
a0fb3b451f
1 changed files with 12 additions and 1 deletions
|
|
@ -754,7 +754,12 @@ class SatMUCClient(muc.MUCClient):
|
|||
log.debug(u"room {room} joined with nick {nick}".format(room=room.occupantJID.userhost(), nick=user.nick))
|
||||
# We set type so we don't have use a deferred with disco to check entity type
|
||||
self.host.memory.updateEntityData(room.roomJID, C.ENTITY_TYPE, ENTITY_TYPE_MUC, profile_key=self.parent.profile)
|
||||
|
||||
elif not room._room_ok:
|
||||
log.warning(u"Received user presence data in a room before its initialisation (and after our own presence),"
|
||||
"this is not standard! Ignoring it: {} ({})".format(
|
||||
room.roomJID.userhost(),
|
||||
user.nick))
|
||||
return
|
||||
elif room._roster_ok:
|
||||
try:
|
||||
self._changing_nicks.remove(user.nick)
|
||||
|
|
@ -795,6 +800,12 @@ class SatMUCClient(muc.MUCClient):
|
|||
room = room_jid_s, profile = self.parent.profile))
|
||||
self.host.memory.delEntityCache(room.roomJID, profile_key=self.parent.profile)
|
||||
self.host.bridge.mucRoomLeft(room.roomJID.userhost(), self.parent.profile)
|
||||
elif not room._room_ok:
|
||||
log.warning(u"Received user presence data in a room before its initialisation (and after our own presence),"
|
||||
"this is not standard! Ignoring it: {} ({})".format(
|
||||
room.roomJID.userhost(),
|
||||
user.nick))
|
||||
return
|
||||
else:
|
||||
log.debug(_(u"user {nick} left room {room_id}").format(nick=user.nick, room_id=room.occupantJID.userhost()))
|
||||
extra = {'info_type': ROOM_USER_LEFT,
|
||||
|
|
|
|||
Loading…
Reference in a new issue