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.
This commit is contained in:
Goffi 2020-02-23 17:48:26 +01:00
commit c5915d1dcb

View file

@ -160,7 +160,8 @@ class XEP_0363(object):
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