plugin text commands: added /join command
This commit is contained in:
parent
d75b24427e
commit
4225b694d0
1 changed files with 20 additions and 4 deletions
|
|
@ -117,15 +117,15 @@ class XEP_0045():
|
|||
result.append((room.roomJID.userhost(), [user.nick for user in room.roster.values()], room.nick))
|
||||
return result
|
||||
|
||||
def getRoomNick(self, room_jid, profile_key='@DEFAULT@'):
|
||||
def getRoomNick(self, room_jid_s, profile_key='@DEFAULT@'):
|
||||
"""return nick used in room by user
|
||||
@param room_jid: unicode room id
|
||||
@param room_jid_s: unicode room id
|
||||
@profile_key: profile
|
||||
@return: nick or empty string in case of error"""
|
||||
profile = self.host.memory.getProfileName(profile_key)
|
||||
if not self.__check_profile(profile) or not self.clients[profile].joined_rooms.has_key(room_jid):
|
||||
if not self.__check_profile(profile) or not self.clients[profile].joined_rooms.has_key(room_jid_s):
|
||||
return ''
|
||||
return self.clients[profile].joined_rooms[room_jid].nick
|
||||
return self.clients[profile].joined_rooms[room_jid_s].nick
|
||||
|
||||
def getRoomsSubjects(self, profile_key='@DEFAULT@'):
|
||||
"""Return received subjects of rooms"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue