Use send_message instead of pushing an event and print at own when sending remotely (when possibe). Fixes #7457

This commit is contained in:
noonien 2013-09-02 14:35:54 +02:00
parent fa6d3c16dd
commit 841c774d23
1 changed files with 3 additions and 5 deletions

View File

@ -442,11 +442,9 @@ class SignalObject(dbus.service.Object):
ctrl = gajim.interface.msg_win_mgr.search_control(jid,
connected_account)
if ctrl:
ctrl.print_conversation(message, frm='outgoing')
gajim.nec.push_outgoing_event(MessageOutgoingEvent(None,
account=connected_account, jid=jid, message=message,
keyID=keyID, type_=type_, control=ctrl))
ctrl.send_message(message)
else:
gajim.nec.push_outgoing_event(MessageOutgoingEvent(None, account=connected_account, jid=jid, message=message, keyID=keyID, type_=type_, control=ctrl))
return DBUS_BOOLEAN(True)
return DBUS_BOOLEAN(False)