From 74b33c782594e4f6eb563b90d0a65bc587a0c340 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Tue, 19 Jul 2005 13:59:26 +0000 Subject: [PATCH] nick in MUC and resource can have / --- src/common/helpers.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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('\\', '\\\\')