aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/file_manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-04-29 21:31:23 +0200
committerfiaxh <git@lightrise.org>2020-06-03 21:50:40 +0200
commit71be2abb6a007fd9b4ed3164d70f5cb95d49ce69 (patch)
treef4dcdb63e08ce6dc0e4933e30e18cec27c604719 /libdino/src/service/file_manager.vala
parentb5066e0e2f4b482204f43402c797d8bf9f7ef582 (diff)
downloaddino-71be2abb6a007fd9b4ed3164d70f5cb95d49ce69.tar.gz
dino-71be2abb6a007fd9b4ed3164d70f5cb95d49ce69.zip
Store last read content item for conversations
fixes #495
Diffstat (limited to 'libdino/src/service/file_manager.vala')
-rw-r--r--libdino/src/service/file_manager.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala
index 00abe517..abeaabc7 100644
--- a/libdino/src/service/file_manager.vala
+++ b/libdino/src/service/file_manager.vala
@@ -216,9 +216,10 @@ public class FileManager : StreamInteractionModule, Object {
}
public bool is_sender_trustworthy(FileTransfer file_transfer, Conversation conversation) {
+ if (file_transfer.direction == FileTransfer.DIRECTION_SENT) return true;
Jid relevant_jid = stream_interactor.get_module(MucManager.IDENTITY).get_real_jid(file_transfer.from, conversation.account) ?? conversation.counterpart;
bool in_roster = stream_interactor.get_module(RosterManager.IDENTITY).get_roster_item(conversation.account, relevant_jid) != null;
- return file_transfer.direction == FileTransfer.DIRECTION_SENT || in_roster;
+ return in_roster;
}
private async FileMeta get_file_meta(FileProvider file_provider, FileTransfer file_transfer, Conversation conversation, FileReceiveData receive_data_) throws FileReceiveError {