Changeset 2397

Show
Ignore:
Timestamp:
07/19/05 15:59:26 (3 years ago)
Author:
nk
Message:

nick in MUC and resource can have /

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/common/helpers.py

    r2396 r2397  
    6464def get_nick_from_fjid(jid): 
    6565        # fake jid is the jid for a contact in a room 
    66         # gaim@conference.jabber.org/nick 
    67         pos = jid.rfind('/') + 1 # 1 means after / 
    68         return jid[pos:] 
     66        # gaim@conference.jabber.org/nick/nick-continued 
     67        return jid.split('/', 1)[1] 
    6968 
    7069def get_resource_from_jid(jid): 
    71         pos = jid.rfind('/') + 1 # 1 means after / 
    72         return jid[pos:] 
     70        return jid.split('/', 1)[1] # abc@doremi.org/res/res-continued 
    7371 
    7472def to_one_line(msg):