diff frontends/src/quick_frontend/quick_app.py @ 2024:01aff34e8873

quick frontends, primitivus: messageState signal handling
author Goffi <goffi@goffi.org>
date Tue, 02 Aug 2016 23:11:44 +0200
parents f09562b0704d
children 48a61879f9ef
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Thu Jul 28 19:11:31 2016 +0200
+++ b/frontends/src/quick_frontend/quick_app.py	Tue Aug 02 23:11:44 2016 +0200
@@ -254,6 +254,7 @@
         self.registerSignal("mucRoomUserChangedNick", iface="plugin")
         self.registerSignal("mucRoomNewSubject", iface="plugin")
         self.registerSignal("chatStateReceived", iface="plugin")
+        self.registerSignal("messageState", iface="plugin")
         self.registerSignal("psEvent", iface="plugin")
 
         # FIXME: do it dynamically
@@ -491,6 +492,10 @@
 
         chat_widget.messageNew(uid, timestamp, from_jid, target, msg, subject, type_, extra, profile)
 
+    def messageStateHandler(self, uid, status, profile):
+        for widget in self.widgets.getWidgets(quick_chat.QuickChat, profiles=(profile,)):
+            widget.onMessageState(uid, status, profile)
+
     def messageSend(self, to_jid, message, subject=None, mess_type="auto", extra=None, callback=None, errback=None, profile_key=C.PROF_KEY_NONE):
         if subject is None:
             subject = {}