summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-07-08 21:12:11 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-07-08 21:12:11 +0000
commit3bde3a27e377361f9306eecf855cd6a0769dfc04 (patch)
tree7df2b29cf4591e982026ac2fd44ff60f12fbbc98
parent660ddf847fbb8b693223ba96e9f8f4e79d17fadc (diff)
downloadpoezio-3bde3a27e377361f9306eecf855cd6a0769dfc04.tar.gz
poezio-3bde3a27e377361f9306eecf855cd6a0769dfc04.tar.bz2
poezio-3bde3a27e377361f9306eecf855cd6a0769dfc04.tar.xz
poezio-3bde3a27e377361f9306eecf855cd6a0769dfc04.zip
fixed #1509
-rw-r--r--src/gui.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui.py b/src/gui.py
index 26fd2506..543029ec 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -429,13 +429,15 @@ class Gui(object):
status = stanza.getStatus()
role = stanza.getRole()
if not room.joined: # user in the room BEFORE us.
- room.users.append(User(from_nick, affiliation, show, status,
- role))
- if from_nick.encode('utf-8') == room.own_nick:
- room.joined = True
- self.add_message_to_room(room, _("Your nickname is %s") % (from_nick))
- else:
- self.add_message_to_room(room, _("%s is in the room") % (from_nick))
+ # ignore redondant presence message, see bug #1509
+ if from_nick not in [user.nick for user in room.users]:
+ room.users.append(User(from_nick, affiliation, show, status,
+ role))
+ if from_nick.encode('utf-8') == room.own_nick:
+ room.joined = True
+ self.add_message_to_room(room, _("Your nickname is %s") % (from_nick))
+ else:
+ self.add_message_to_room(room, _("%s is in the room") % (from_nick))
else:
change_nick = stanza.getStatusCode() == '303'
kick = stanza.getStatusCode() == '307'