comparison frontends/src/quick_frontend/quick_app.py @ 1380:8aa32bcc3a9c

plugin XEP-0085, quick_frontend: fixes chat states
author souliane <souliane@mailoo.org>
date Fri, 20 Mar 2015 17:47:48 +0100
parents 3dae6964c071
children b01efa1c0f5e
comparison
equal deleted inserted replaced
1379:da2ea16fabc6 1380:8aa32bcc3a9c
584 for widget in self.widgets.getWidgets(quick_chat.QuickChat): 584 for widget in self.widgets.getWidgets(quick_chat.QuickChat):
585 if profile != widget.profile: 585 if profile != widget.profile:
586 continue 586 continue
587 to_display = C.USER_CHAT_STATES[state] if (state and widget.type == C.CHAT_GROUP) else state 587 to_display = C.USER_CHAT_STATES[state] if (state and widget.type == C.CHAT_GROUP) else state
588 if widget.type == C.CHAT_GROUP and from_jid_s == C.ENTITY_ALL: 588 if widget.type == C.CHAT_GROUP and from_jid_s == C.ENTITY_ALL:
589 for occupant in [jid.newResource(self.target, nick) for nick in widget.occupants]: 589 for occupant in [jid.newResource(widget.target, nick) for nick in widget.occupants]:
590 widget.updateEntityState(occupant, 'chat_state', to_display) 590 widget.updateEntityState(occupant, 'chat_state', to_display)
591 elif from_jid.bare == widget.target.bare: # roster contact or MUC occupant 591 elif from_jid.bare == widget.target.bare: # roster contact or MUC occupant
592 widget.updateEntityState(from_jid, 'chat_state', to_display) 592 widget.updateEntityState(from_jid, 'chat_state', to_display)
593 593
594 def personalEventHandler(self, sender, event_type, data): 594 def personalEventHandler(self, sender, event_type, data):