Mercurial > libervia-backend
diff sat/plugins/plugin_misc_attach.py @ 3182:f2bb57348587
plugin attach, XEP-0363: progress id can now be specified:
progress id can be specified in options, using the "progress_id" option, this can be
more handy for frontends to keep track of attachments progresses.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 23 Feb 2020 17:48:26 +0100 |
parents | 5ff2cf7f0aba |
children | 883fb4981958 |
line wrap: on
line diff
--- a/sat/plugins/plugin_misc_attach.py Sun Feb 23 17:48:26 2020 +0100 +++ b/sat/plugins/plugin_misc_attach.py Sun Feb 23 17:48:26 2020 +0100 @@ -75,6 +75,9 @@ name = attachment["name"] = path.name options = {} + progress_id = attachment.get("progress_id") + if progress_id: + options["progress_id"] = attachment["progress_id"] if client.encryption.isEncryptionRequested(data): # FIXME: we should not use implementation specific value here # but for not it's the only file encryption method available with @@ -85,6 +88,7 @@ client, filepath=path, filename=name, + options=options, ) uploads_d.append(upload_d)