aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-04-22 15:44:12 +0200
committerfiaxh <git@lightrise.org>2020-04-22 15:44:12 +0200
commit51a23728694a3f1312cc9396fc093ca178457c3c (patch)
tree321771ae3d807d19387a8656805a648d75347994 /plugins/http-files/src
parent7c4260eed718961874fc0ea665263ea2ce59338b (diff)
downloaddino-51a23728694a3f1312cc9396fc093ca178457c3c.tar.gz
dino-51a23728694a3f1312cc9396fc093ca178457c3c.zip
Add file upload preview
fixes #756
Diffstat (limited to 'plugins/http-files/src')
-rw-r--r--plugins/http-files/src/file_sender.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/http-files/src/file_sender.vala b/plugins/http-files/src/file_sender.vala
index 3d250c1f..cb8839f3 100644
--- a/plugins/http-files/src/file_sender.vala
+++ b/plugins/http-files/src/file_sender.vala
@@ -63,6 +63,14 @@ public class HttpFileSender : FileSender, Object {
return file_transfer.size < max_file_sizes[conversation.account];
}
+ public long get_file_size_limit(Conversation conversation) {
+ long? max_size = max_file_sizes[conversation.account];
+ if (max_size != null) {
+ return max_size;
+ }
+ return -1;
+ }
+
public bool can_encrypt(Conversation conversation, FileTransfer file_transfer) {
return false;
}