Skip to content
Snippets Groups Projects
Commit b821d23f authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

get real jid of contact we want to ban from a room. Fixes #2521

parent 0a572cf8
No related branches found
No related tags found
No related merge requests found
......@@ -1116,11 +1116,10 @@ class GroupchatControl(ChatControlBase):
self.room_jid)
reason = ' '.join(message_array)
if nick in room_nicks:
ban_jid = gajim.construct_fjid(self.room_jid, nick)
gajim.connections[self.account].gc_set_affiliation(self.room_jid,
ban_jid, 'outcast', reason)
self.clear(self.msg_textview)
elif nick.find('@') >= 0:
gc_contact = gajim.contacts.get_gc_contact(self.account,
self.room_jid, nick)
nick = gc_contact.jid
if nick.find('@') >= 0:
gajim.connections[self.account].gc_set_affiliation(self.room_jid,
nick, 'outcast', reason)
self.clear(self.msg_textview)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment