aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/jingle_file_transfers.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-05-11 12:57:02 +0200
committerfiaxh <git@lightrise.org>2021-05-11 12:57:02 +0200
commitd71604913dd5b3372a823320db83c37c845fac5c (patch)
tree2ffbff97a02c81d48d8aef4a4b7ee870507236e9 /libdino/src/service/jingle_file_transfers.vala
parente92ed27317ae398c867c946cf7206b1f0b32f3b4 (diff)
parent90f9ecf62b2ebfef14de2874e7942552409632bf (diff)
downloaddino-d71604913dd5b3372a823320db83c37c845fac5c.tar.gz
dino-d71604913dd5b3372a823320db83c37c845fac5c.zip
Merge remote-tracking branch 'origin/feature/calls'
Diffstat (limited to 'libdino/src/service/jingle_file_transfers.vala')
-rw-r--r--libdino/src/service/jingle_file_transfers.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdino/src/service/jingle_file_transfers.vala b/libdino/src/service/jingle_file_transfers.vala
index a96c716a..e86f923c 100644
--- a/libdino/src/service/jingle_file_transfers.vala
+++ b/libdino/src/service/jingle_file_transfers.vala
@@ -103,7 +103,7 @@ public class JingleFileProvider : FileProvider, Object {
throw new FileReceiveError.DOWNLOAD_FAILED("Transfer data not available anymore");
}
try {
- jingle_file_transfer.accept(stream);
+ yield jingle_file_transfer.accept(stream);
} catch (IOError e) {
throw new FileReceiveError.DOWNLOAD_FAILED("Establishing connection did not work");
}
@@ -202,8 +202,11 @@ public class JingleFileSender : FileSender, Object {
if (stream == null) throw new FileSendError.UPLOAD_FAILED("No stream available");
JingleFileEncryptionHelper? helper = JingleFileHelperRegistry.instance.get_encryption_helper(file_transfer.encryption);
bool must_encrypt = helper != null && yield helper.can_encrypt(conversation, file_transfer);
+ // TODO(hrxi): Prioritization of transports (and resources?).
foreach (Jid full_jid in stream.get_flag(Presence.Flag.IDENTITY).get_resources(conversation.counterpart)) {
- // TODO(hrxi): Prioritization of transports (and resources?).
+ if (full_jid.equals(stream.get_flag(Bind.Flag.IDENTITY).my_jid)) {
+ continue;
+ }
if (!yield stream.get_module(Xep.JingleFileTransfer.Module.IDENTITY).is_available(stream, full_jid)) {
continue;
}