diff --git a/sat/core/xmpp.py b/sat/core/xmpp.py index 80998f49..c8a7fd4a 100644 --- a/sat/core/xmpp.py +++ b/sat/core/xmpp.py @@ -700,14 +700,18 @@ class SatXMPPClient(SatXMPPEntity, wokkel_client.XMPPClient): self.send(mess_data[u"xml"]) defer.returnValue(mess_data) - def feedback(self, to_jid, message): + def feedback(self, to_jid, message, extra=None): """Send message to frontends This message will be an info message, not recorded in history. It can be used to give feedback of a command @param to_jid(jid.JID): destinee jid @param message(unicode): message to send to frontends + @param extra(None, dict): extra data to use + in particular, info subtype can be specified with MESS_EXTRA_INFO """ + if extra is None: + extra = {} self.host_app.bridge.messageNew( uid=unicode(uuid.uuid4()), timestamp=time.time(), @@ -716,7 +720,7 @@ class SatXMPPClient(SatXMPPEntity, wokkel_client.XMPPClient): message={u"": message}, subject={}, mess_type=C.MESS_TYPE_INFO, - extra={}, + extra=extra, profile=self.profile, )