S

[PATCH] Allow getting enclosure data out of feed items

diff -r 2c9e95796371 sat/plugins/plugin_xep_0277.py
--- a/sat/plugins/plugin_xep_0277.py    Fri Jun 11 17:39:59 2021 +0200
+++ b/sat/plugins/plugin_xep_0277.py    Tue Aug 17 14:37:49 2021 +0000
@@ -423,6 +423,10 @@
                     comments_data["service"] = service.full()
                     comments_data["node"] = node
                 comments.append(comments_data)
+            elif link_elt.getAttribute("rel") == "enclosure":
+                if not "enclosure" in microblog_data:
+                    microblog_data["enclosure"] = []
+                microblog_data["enclosure"].append({ "href": link_elt["href"], "type": link_elt["type"], "title": link_elt["title"] })
             else:
                 rel = link_elt.getAttribute("rel", "")
id

397

author

Singpolyma

created

17/08/2021, 14:38

updated

17/08/2021, 14:38

labels
libervia-backend
type
feature request
status
queued
priority
normal
milestone
0.7
severity
normal