fix sending zeroconf messages
This commit is contained in:
parent
7af365edda
commit
da5bfa74c6
|
@ -337,12 +337,14 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
|
||||||
if obj.account != self.name:
|
if obj.account != self.name:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def cb(jid, msg, keyID, forward_from, session, original_message, subject,
|
||||||
|
type_, msg_iq, xhtml):
|
||||||
def on_send_ok(msg_id):
|
def on_send_ok(msg_id):
|
||||||
gajim.nec.push_incoming_event(MessageSentEvent(None, conn=self,
|
gajim.nec.push_incoming_event(MessageSentEvent(None, conn=self,
|
||||||
jid=obj.jid, message=obj.message, keyID=obj.keyID,
|
jid=obj.jid, message=obj.message, keyID=obj.keyID,
|
||||||
chatstate=None))
|
chatstate=None))
|
||||||
if obj.callback:
|
if obj.callback:
|
||||||
obj.callback(obj.msg_id, *obj.callback_args)
|
obj.callback(msg_iq, *obj.callback_args)
|
||||||
|
|
||||||
if not obj.is_loggable:
|
if not obj.is_loggable:
|
||||||
return
|
return
|
||||||
|
@ -355,8 +357,6 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
|
||||||
fjid=obj.jid, error_code=-1, error_msg=reason, msg=None,
|
fjid=obj.jid, error_code=-1, error_msg=reason, msg=None,
|
||||||
time_=None, session=obj.session))
|
time_=None, session=obj.session))
|
||||||
|
|
||||||
def cb(jid, msg, keyID, forward_from, session, original_message, subject,
|
|
||||||
type_, msg_iq, xhtml):
|
|
||||||
ret = self.connection.send(msg_iq, msg is not None, on_ok=on_send_ok,
|
ret = self.connection.send(msg_iq, msg is not None, on_ok=on_send_ok,
|
||||||
on_not_ok=on_send_not_ok)
|
on_not_ok=on_send_not_ok)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue