Mercurial > libervia-backend
diff sat/plugins/plugin_xep_0363.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 | 3a8755fdc78d |
children | 883fb4981958 |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0363.py Sun Feb 23 17:48:26 2020 +0100 +++ b/sat/plugins/plugin_xep_0363.py Sun Feb 23 17:48:26 2020 +0100 @@ -160,7 +160,8 @@ else: log.debug(f"Got upload slot: {slot}") sat_file = self.host.plugins["FILE"].File( - self.host, client, filepath, size=size, auto_end_signals=False + self.host, client, filepath, uid=options.get("progress_id"), size=size, + auto_end_signals=False ) progress_id = sat_file.uid