diff --git a/src/common/connection.py b/src/common/connection.py index 95258167a..79d7eddbf 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -829,7 +829,7 @@ class Connection: self.connection.send(p) self.dispatch('STATUS', show) - def send_message(self, jid, msg, keyID): + def send_message(self, jid, msg, keyID, type = 'chat'): if not self.connection: return if not msg: @@ -840,7 +840,7 @@ class Connection: #encrypt msgenc = self.gpg.encrypt(msg, [keyID]) if msgenc: msgtxt = _('[this message is encrypted]') - msg_iq = common.xmpp.Message(to = jid, body = msgtxt, typ = 'chat') + msg_iq = common.xmpp.Message(to = jid, body = msgtxt, typ = type) if msgenc: msg_iq.setTag(common.xmpp.NS_ENCRYPTED + ' x').setData(msgenc) self.to_be_sent.insert(0, msg_iq)