changeset 7c2418809bdc in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=7c2418809bdc
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 3813e4548503 -r 7c2418809bdc 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
@@ -432,7 +432,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)
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits