nick in MUC and resource can have /
This commit is contained in:
parent
6f4f126c90
commit
74b33c7825
1 changed files with 3 additions and 5 deletions
|
@ -63,13 +63,11 @@ def get_nick_from_jid(jid):
|
||||||
|
|
||||||
def get_nick_from_fjid(jid):
|
def get_nick_from_fjid(jid):
|
||||||
# fake jid is the jid for a contact in a room
|
# fake jid is the jid for a contact in a room
|
||||||
# gaim@conference.jabber.org/nick
|
# gaim@conference.jabber.org/nick/nick-continued
|
||||||
pos = jid.rfind('/') + 1 # 1 means after /
|
return jid.split('/', 1)[1]
|
||||||
return jid[pos:]
|
|
||||||
|
|
||||||
def get_resource_from_jid(jid):
|
def get_resource_from_jid(jid):
|
||||||
pos = jid.rfind('/') + 1 # 1 means after /
|
return jid.split('/', 1)[1] # abc@doremi.org/res/res-continued
|
||||||
return jid[pos:]
|
|
||||||
|
|
||||||
def to_one_line(msg):
|
def to_one_line(msg):
|
||||||
msg = msg.replace('\\', '\\\\')
|
msg = msg.replace('\\', '\\\\')
|
||||||
|
|
Loading…
Add table
Reference in a new issue