diff --git a/src/common/helpers.py b/src/common/helpers.py index fd5073010..c406d4379 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -63,13 +63,11 @@ def get_nick_from_jid(jid): def get_nick_from_fjid(jid): # fake jid is the jid for a contact in a room - # gaim@conference.jabber.org/nick - pos = jid.rfind('/') + 1 # 1 means after / - return jid[pos:] + # gaim@conference.jabber.org/nick/nick-continued + return jid.split('/', 1)[1] def get_resource_from_jid(jid): - pos = jid.rfind('/') + 1 # 1 means after / - return jid[pos:] + return jid.split('/', 1)[1] # abc@doremi.org/res/res-continued def to_one_line(msg): msg = msg.replace('\\', '\\\\')