Skip to content
Snippets Groups Projects
Commit 64bfb68c authored by nkour's avatar nkour
Browse files

send_message now accepts type of message

parent 3b347a9b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment