# HG changeset patch # User Goffi # Date 1546596811 -3600 # Node ID ec9445c04a361c67b7899e936def0f9ccd4c77a0 # Parent 6487b8855c9a583c248ff728f395003fb37b8419 core (xmpp): added "extra" argument to client.feedback diff -r 6487b8855c9a -r ec9445c04a36 sat/core/xmpp.py --- a/sat/core/xmpp.py Fri Jan 04 09:26:57 2019 +0100 +++ b/sat/core/xmpp.py Fri Jan 04 11:13:31 2019 +0100 @@ -700,14 +700,18 @@ 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 @@ message={u"": message}, subject={}, mess_type=C.MESS_TYPE_INFO, - extra={}, + extra=extra, profile=self.profile, )