jabber_mirror: Use str.replace instead of re.sub

(imported from commit 55798a06951366f0c3d246a243dbb3d41ee5b4f7)
This commit is contained in:
Zev Benjamin 2014-02-21 13:31:41 -05:00
parent 033e821963
commit 8d787f888f

View file

@ -124,7 +124,7 @@ class JabberToZulipBot(ClientXMPP):
def nickname_to_jid(self, room, nick):
jid = self.plugin['xep_0045'].getJidProperty(room, nick, "jid")
if (jid is None or jid == ''):
return re.sub(' ', '', nick) + "@" + options.jabber_domain
return nick.replace(' ', '') + "@" + options.jabber_domain
else:
return jid