Software /
code /
prosody-modules
Comparison
mod_pubsub_feeds/mod_pubsub_feeds.lua @ 5574:10b7118bbd8f
mod_pubsub_feeds: Remove broken attempt to generate an ID from content
This seems to never have worked correctly and now the timestamp is out
of scope anyway.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 25 Jun 2023 16:45:25 +0200 |
parent | 5573:ed177fa5b54c |
child | 5575:372e59bd45d7 |
comparison
equal
deleted
inserted
replaced
5573:ed177fa5b54c | 5574:10b7118bbd8f |
---|---|
107 local link = entry:get_child("link"); | 107 local link = entry:get_child("link"); |
108 if link then | 108 if link then |
109 module:log("debug", "Feed %q item %s is missing an id, using <link> instead", item.url, entry:top_tag()); | 109 module:log("debug", "Feed %q item %s is missing an id, using <link> instead", item.url, entry:top_tag()); |
110 id = link and link.attr.href; | 110 id = link and link.attr.href; |
111 else | 111 else |
112 module:log("debug", "Feed %q item %s is missing an id, using a HMAC of the item instead", item.url, entry:top_tag()); | 112 module:log("error", "Feed %q item %s is missing both id and link, this feed is unusable", item.url, entry:top_tag()); |
113 id = item.url .. "#" .. hmac_sha1(item.url, tostring(entry), true) .. "@" .. dt_datetime(timestamp); | 113 return; |
114 end | 114 end |
115 entry:text_tag("id", id); | 115 entry:text_tag("id", id); |
116 end | 116 end |
117 | 117 |
118 if items[id] then | 118 if items[id] then |