Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0363.py @ 3219:2ba602aef90e
plugin attach, aesgcm: attachments refactoring:
attachment handling has been simplified, and now use a "register" method similar as the
ones used for download or upload.
A default method (for unencrypted messages) will try a simple upload and will copy the
links to body.
AESGCM plugin has been adapted to be used for encrypted files. If more than one file is
sent with AESGCM plugin, they will be split in several messages as current de-facto
standard (OMEMO media sharing) doesn't support several files per message.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 18 Mar 2020 20:25:02 +0100 |
parents | 883fb4981958 |
children | 163014f09bf4 |
comparison
equal
deleted
inserted
replaced
3218:806a7936a591 | 3219:2ba602aef90e |
---|---|
139 options = {} | 139 options = {} |
140 ignore_tls_errors = options.get("ignore_tls_errors", False) | 140 ignore_tls_errors = options.get("ignore_tls_errors", False) |
141 filename = filename or os.path.basename(filepath) | 141 filename = filename or os.path.basename(filepath) |
142 size = os.path.getsize(filepath) | 142 size = os.path.getsize(filepath) |
143 | 143 |
144 | |
145 size_adjust = [] | 144 size_adjust = [] |
146 #: this trigger can be used to modify the requested size, it is notably useful | 145 #: this trigger can be used to modify the requested size, it is notably useful |
147 #: with encryption. The size_adjust is a list which can be filled by int to add | 146 #: with encryption. The size_adjust is a list which can be filled by int to add |
148 #: to the initial size | 147 #: to the initial size |
149 self.host.trigger.point( | 148 self.host.trigger.point( |