changeset 10ea2c9b999c in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=10ea2c9b999c description: create a session or use existing one when sending a message through dbus. Fixes #6973
diffstat:
src/remote_control.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r f7c17c4f22b7 -r 10ea2c9b999c src/remote_control.py --- a/src/remote_control.py Tue Sep 13 08:46:47 2011 +0200 +++ b/src/remote_control.py Tue Sep 13 10:18:54 2011 +0200 @@ -433,7 +433,13 @@ connected_account, contact = self._get_account_and_contact(account, jid) if connected_account: connection = gajim.connections[connected_account] - connection.send_message(jid, message, keyID, type_, subject) + sessions = connection.get_sessions(jid) + if sessions: + session = sessions[0] + else: + session = connection.make_new_session(jid) + connection.send_message(jid, message, keyID, type_, subject, + session=session) return DBUS_BOOLEAN(True) return DBUS_BOOLEAN(False)