use GED to send messages via gajim-remote. Fixes #7321

This commit is contained in:
Yann Leboulanger 2013-03-19 10:25:10 +01:00
parent 6cb4f446ed
commit 1c977b8045
1 changed files with 6 additions and 3 deletions

View File

@ -37,6 +37,7 @@ from common import helpers
from time import time from time import time
from dialogs import AddNewContactWindow, NewChatDialog, JoinGroupchatWindow from dialogs import AddNewContactWindow, NewChatDialog, JoinGroupchatWindow
from common import ged from common import ged
from common.connection_handlers_events import MessageOutgoingEvent
from common import dbus_support from common import dbus_support
if dbus_support.supported: if dbus_support.supported:
@ -441,8 +442,10 @@ class SignalObject(dbus.service.Object):
if ctrl: if ctrl:
ctrl.print_conversation(message, frm='outgoing') ctrl.print_conversation(message, frm='outgoing')
connection.send_message(jid, message, keyID, type_, subject, gajim.nec.push_outgoing_event(MessageOutgoingEvent(None,
session=session) account=connected_account, jid=jid, message=message,
keyID=keyID, type_=type_, control=ctrl))
return DBUS_BOOLEAN(True) return DBUS_BOOLEAN(True)
return DBUS_BOOLEAN(False) return DBUS_BOOLEAN(False)
@ -462,7 +465,7 @@ class SignalObject(dbus.service.Object):
keyID is specified, encrypt the message with the pgp key keyID is specified, encrypt the message with the pgp key
""" """
jid = self._get_real_jid(jid, account) jid = self._get_real_jid(jid, account)
return self._send_message(jid, message, keyID, account, type, subject) return self._send_message(jid, message, keyID, account, 'normal', subject)
@dbus.service.method(INTERFACE, in_signature='sss', out_signature='b') @dbus.service.method(INTERFACE, in_signature='sss', out_signature='b')
def send_groupchat_message(self, room_jid, message, account): def send_groupchat_message(self, room_jid, message, account):