diff options
author | hrxi <hrrrxi@gmail.com> | 2019-06-23 14:51:33 +0200 |
---|---|---|
committer | hrxi <hrrrxi@gmail.com> | 2019-07-09 11:21:40 +0200 |
commit | 82e7cf4447d72c24af04c64c05eed35338455f35 (patch) | |
tree | 3766c40dc3e030aa6a2c092545af17e5c998aa9c /libdino/src/service/file_manager.vala | |
parent | 877c46628fa2836f9226e24a3d0a84b9a3f821e6 (diff) | |
download | dino-82e7cf4447d72c24af04c64c05eed35338455f35.tar.gz dino-82e7cf4447d72c24af04c64c05eed35338455f35.zip |
Add file receiving via Jingle
This currently follows the same rules as HTTP file download for
accepting files.
Diffstat (limited to 'libdino/src/service/file_manager.vala')
-rw-r--r-- | libdino/src/service/file_manager.vala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala index 9873539a..049239f7 100644 --- a/libdino/src/service/file_manager.vala +++ b/libdino/src/service/file_manager.vala @@ -65,8 +65,8 @@ public class FileManager : StreamInteractionModule, Object { foreach (FileSender file_sender in file_senders) { if (file_sender.can_send(conversation, file_transfer)) { - // TODO(hrxi): Currently, this tries to send the file with every transfer available, but it should probably only select one. file_sender.send_file(conversation, file_transfer); + return; } } received_file(file_transfer, conversation); @@ -121,7 +121,9 @@ public class FileManager : StreamInteractionModule, Object { } public void add_sender(FileSender file_sender) { - file_senders.add(file_sender); + // Order file_senders in reverse order of adding them -- HTTP is added + // later than Jingle. + file_senders.insert(0, file_sender); file_sender.upload_available.connect((account) => { upload_available(account); }); |