component file sharing: comments metadata:
new <comments> element is added to file metadata, it contains the URL to the comments virtual node and the count of comments (this way client knows if it make sense to request comments or not). Fixed triggers in plugin XEP-0264 (return value was missing). New trigger in plugin XEP-0329 to allow component to add metadata (used here for comments url).
This commit is contained in:
parent
07fa89be84
commit
76f39ca0c4
1 changed files with 56 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ class XEP_0264(object):
|
|||
width, height = thumbnail['size']
|
||||
thumbnail_elt['width'] = unicode(width)
|
||||
thumbnail_elt['height'] = unicode(height)
|
||||
return True
|
||||
|
||||
def _getFileThumbnails(self, file_elt, file_data):
|
||||
thumbnails = []
|
||||
|
|
@ -113,6 +114,7 @@ class XEP_0264(object):
|
|||
|
||||
if thumbnails:
|
||||
file_data.setdefault('extra', {})[C.KEY_THUMBNAILS] = thumbnails
|
||||
return True
|
||||
|
||||
## thumbnails generation ##
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue