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:
parent
3b730721eb
commit
c5915d1dcb
1 changed files with 14 additions and 6 deletions
|
|
@ -75,6 +75,9 @@ class AttachPlugin:
|
|||
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 @@ class AttachPlugin:
|
|||
client,
|
||||
filepath=path,
|
||||
filename=name,
|
||||
options=options,
|
||||
)
|
||||
uploads_d.append(upload_d)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue