primitivus: fixed messages order in chat window
This commit is contained in:
parent
8d34cacc1d
commit
031bd3134f
1 changed files with 67 additions and 13 deletions
|
|
@ -126,6 +126,15 @@ class XEP_0045():
|
|||
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_s].nick
|
||||
|
||||
def isNickInRoom(self, room_jid, nick, profile):
|
||||
"""Tell if a nick is currently present in a room"""
|
||||
profile = self.host.memory.getProfileName(profile_key)
|
||||
if not self.__check_profile(profile):
|
||||
raise exceptions.UnknownProfileError("Unknown or disconnected profile")
|
||||
if not self.clients[profile].joined_rooms.has_key(room_jid.userhost()):
|
||||
raise UnknownRoom("This room has not been joined")
|
||||
return self.clients[profile].joined_rooms[room_jid.userhost()].inRoster(nick)
|
||||
|
||||
def getRoomsSubjects(self, profile_key='@DEFAULT@'):
|
||||
"""Return received subjects of rooms"""
|
||||
|
|
@ -209,7 +218,6 @@ class XEP_0045():
|
|||
def getHandler(self, profile):
|
||||
self.clients[profile] = SatMUCClient(self)
|
||||
return self.clients[profile]
|
||||
|
||||
|
||||
|
||||
class SatMUCClient (muc.MUCClient):
|
||||
|
|
@ -219,7 +227,7 @@ class SatMUCClient (muc.MUCClient):
|
|||
self.plugin_parent = plugin_parent
|
||||
self.host = plugin_parent.host
|
||||
muc.MUCClient.__init__(self)
|
||||
self.joined_rooms = {}
|
||||
self.joined_rooms = {} #FIXME: seem to do the same thing as MUCClient's _rooms attribute, must be removed
|
||||
self.rec_subjects = {}
|
||||
self.__changing_nicks = set() # used to keep trace of who is changing nick,
|
||||
# and to discard userJoinedRoom signal in this case
|
||||
|
|
@ -283,7 +291,7 @@ class SatMUCClient (muc.MUCClient):
|
|||
|
||||
def userUpdatedStatus(self, room, user, show, status):
|
||||
print("FIXME: MUC status not managed yet")
|
||||
#FIXME: gof
|
||||
#FIXME:
|
||||
|
||||
def receivedSubject(self, room, user, subject):
|
||||
debug (_("New subject for room (%(room_id)s): %(subject)s") % {'room_id':room.roomJID.full(),'subject':subject})
|
||||
|
|
|
|||
Loading…
Reference in a new issue