MUC: added subject management
- plugin xep-0045: added roomNewSubject signal - wix: added subject bar for group windows
This commit is contained in:
parent
39807e5b36
commit
5486458797
1 changed files with 33 additions and 5 deletions
|
|
@ -72,6 +72,7 @@ class XEP_0045():
|
|||
host.bridge.addSignal("roomJoined", ".communication", signature='ssasss') #args: room_id, room_service, room_nicks, user_nick, profile
|
||||
host.bridge.addSignal("roomUserJoined", ".communication", signature='sssa{ss}s') #args: room_id, room_service, user_nick, user_data, profile
|
||||
host.bridge.addSignal("roomUserLeft", ".communication", signature='sssa{ss}s') #args: room_id, room_service, user_nick, user_data, profile
|
||||
host.bridge.addSignal("roomNewSubject", ".communication", signature='ssss') #args: room_id, room_service, subject, profile
|
||||
|
||||
def __check_profile(self, profile):
|
||||
"""check if profile is used and connected
|
||||
|
|
@ -95,7 +96,7 @@ class XEP_0045():
|
|||
def __err_joining_room(self, failure, profile):
|
||||
"""Called when something is going wrong when joining the room"""
|
||||
error ("Error when joining the room")
|
||||
pdb.set_trace()
|
||||
#TODO: gof: send an error message throught the bridge
|
||||
|
||||
def join(self, service, roomId, nick, profile_key='@DEFAULT@'):
|
||||
profile = self.host.memory.getProfileName(profile_key)
|
||||
|
|
@ -138,6 +139,10 @@ class SatMUCClient (muc.MUCClient):
|
|||
user_data={'entity':user.entity or '', 'affiliation':user.affiliation, 'role':user.role}
|
||||
self.host.bridge.roomUserLeft(room.roomIdentifier, room.service, user.nick, user_data, self.parent.profile)
|
||||
|
||||
def receivedSubject(self, room, subject):
|
||||
debug (_("New subject for room (%(room_id)s): %(subject)s") % {'room_id':room.occupantJID.userhost(),'subject':subject})
|
||||
self.host.bridge.roomNewSubject(room.roomIdentifier, room.service, subject, self.parent.profile)
|
||||
|
||||
#def connectionInitialized(self):
|
||||
#pass
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue