aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0166_jingle
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-04-01 12:03:04 +0200
committerfiaxh <git@lightrise.org>2021-04-01 12:03:04 +0200
commit3454201e5a3da058ccbef0bbaf467599912a8c38 (patch)
tree6ff60c4d923e468135a86a9e8a5fae926c349b41 /xmpp-vala/src/module/xep/0166_jingle
parentb63a20f9189026a77ccc1769a4ab366d48f63233 (diff)
downloaddino-3454201e5a3da058ccbef0bbaf467599912a8c38.tar.gz
dino-3454201e5a3da058ccbef0bbaf467599912a8c38.zip
Use outgoing JMI if contact has supporting device
Diffstat (limited to 'xmpp-vala/src/module/xep/0166_jingle')
-rw-r--r--xmpp-vala/src/module/xep/0166_jingle/jingle_module.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/xep/0166_jingle/jingle_module.vala b/xmpp-vala/src/module/xep/0166_jingle/jingle_module.vala
index 1e8a36d1..7314ca6c 100644
--- a/xmpp-vala/src/module/xep/0166_jingle/jingle_module.vala
+++ b/xmpp-vala/src/module/xep/0166_jingle/jingle_module.vala
@@ -102,7 +102,7 @@ namespace Xmpp.Xep.Jingle {
return (yield is_jingle_available(stream, full_jid)) && (yield select_transport(stream, type, components, full_jid, Set.empty())) != null;
}
- public async Session create_session(XmppStream stream, Gee.List<Content> contents, Jid receiver_full_jid, string sid = random_uuid()) throws Error {
+ public async Session create_session(XmppStream stream, Gee.List<Content> contents, Jid receiver_full_jid, string? sid = null) throws Error {
if (!yield is_jingle_available(stream, receiver_full_jid)) {
throw new Error.NO_SHARED_PROTOCOLS("No Jingle support");
}
@@ -111,7 +111,7 @@ namespace Xmpp.Xep.Jingle {
throw new Error.GENERAL("Couldn't determine own JID");
}
- Session session = new Session.initiate_sent(stream, sid, my_jid, receiver_full_jid);
+ Session session = new Session.initiate_sent(stream, sid ?? random_uuid(), my_jid, receiver_full_jid);
session.terminated.connect((session, stream, _1, _2, _3) => { stream.get_flag(Flag.IDENTITY).remove_session(session.sid); });
foreach (Content content in contents) {