Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_app.py @ 2066:09c18fcd8225
plugin XEP-0045, quick frontend (app,chat): various chat improvments:
- (XEP-0045): join defered is now fired when room is full joined and history is available
- (XEP-0045): mucJOIN signature has changed, it now returns the same arguments as mucRoomJoined and a boolean which is True if the room was alread joined
- quick frontend (app, chat): adapted code to new changes
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 09 Sep 2016 23:54:33 +0200 |
parents | 748e539c5feb |
children | 7834743705f0 |
comparison
equal
deleted
inserted
replaced
2065:f3167c873e7b | 2066:09c18fcd8225 |
---|---|
524 | 524 |
525 def mucRoomJoinedHandler(self, room_jid_s, occupants, user_nick, subject, profile): | 525 def mucRoomJoinedHandler(self, room_jid_s, occupants, user_nick, subject, profile): |
526 """Called when a MUC room is joined""" | 526 """Called when a MUC room is joined""" |
527 log.debug(u"Room [{room_jid}] joined by {profile}, users presents:{users}".format(room_jid=room_jid_s, profile=profile, users=occupants.keys())) | 527 log.debug(u"Room [{room_jid}] joined by {profile}, users presents:{users}".format(room_jid=room_jid_s, profile=profile, users=occupants.keys())) |
528 room_jid = jid.JID(room_jid_s) | 528 room_jid = jid.JID(room_jid_s) |
529 chat_widget = self.widgets.getOrCreateWidget(quick_chat.QuickChat, room_jid, type_=C.CHAT_GROUP, occupants=occupants, subject=subject, profile=profile) | 529 self.widgets.getOrCreateWidget(quick_chat.QuickChat, room_jid, type_=C.CHAT_GROUP, nick=user_nick, occupants=occupants, subject=subject, profile=profile) |
530 chat_widget.setUserNick(unicode(user_nick)) | |
531 self.contact_lists[profile].setSpecial(room_jid, C.CONTACT_SPECIAL_GROUP) | 530 self.contact_lists[profile].setSpecial(room_jid, C.CONTACT_SPECIAL_GROUP) |
532 # chat_widget.update() | 531 # chat_widget.update() |
533 | 532 |
534 def mucRoomLeftHandler(self, room_jid_s, profile): | 533 def mucRoomLeftHandler(self, room_jid_s, profile): |
535 """Called when a MUC room is left""" | 534 """Called when a MUC room is left""" |