fixed #1509
This commit is contained in:
parent
660ddf847f
commit
3bde3a27e3
1 changed files with 9 additions and 7 deletions
16
src/gui.py
16
src/gui.py
|
@ -429,13 +429,15 @@ class Gui(object):
|
||||||
status = stanza.getStatus()
|
status = stanza.getStatus()
|
||||||
role = stanza.getRole()
|
role = stanza.getRole()
|
||||||
if not room.joined: # user in the room BEFORE us.
|
if not room.joined: # user in the room BEFORE us.
|
||||||
room.users.append(User(from_nick, affiliation, show, status,
|
# ignore redondant presence message, see bug #1509
|
||||||
role))
|
if from_nick not in [user.nick for user in room.users]:
|
||||||
if from_nick.encode('utf-8') == room.own_nick:
|
room.users.append(User(from_nick, affiliation, show, status,
|
||||||
room.joined = True
|
role))
|
||||||
self.add_message_to_room(room, _("Your nickname is %s") % (from_nick))
|
if from_nick.encode('utf-8') == room.own_nick:
|
||||||
else:
|
room.joined = True
|
||||||
self.add_message_to_room(room, _("%s is in the room") % (from_nick))
|
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:
|
else:
|
||||||
change_nick = stanza.getStatusCode() == '303'
|
change_nick = stanza.getStatusCode() == '303'
|
||||||
kick = stanza.getStatusCode() == '307'
|
kick = stanza.getStatusCode() == '307'
|
||||||
|
|
Loading…
Reference in a new issue