Changeset

5573:ed177fa5b54c

mod_pubsub_feeds: Fix mixup between feed object and parsed feed Did the HMAC thing ever work?
author Kim Alvefur <zash@zash.se>
date Sun, 25 Jun 2023 16:42:57 +0200
parents 5572:fd1c535dcb92
children 5574:10b7118bbd8f
files mod_pubsub_feeds/mod_pubsub_feeds.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sun Jun 25 16:41:50 2023 +0200
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sun Jun 25 16:42:57 2023 +0200
@@ -106,11 +106,11 @@
 		if not id then
 			local link = entry:get_child("link");
 			if link then
-				module:log("debug", "Feed %q item %s is missing an id, using <link> instead", feed.url, entry:top_tag());
+				module:log("debug", "Feed %q item %s is missing an id, using <link> instead", item.url, entry:top_tag());
 				id = link and link.attr.href;
 			else
-				module:log("debug", "Feed %q item %s is missing an id, using a HMAC of the item instead", feed.url, entry:top_tag());
-				id = feed.url .. "#" .. hmac_sha1(feed.url, tostring(entry), true) .. "@" .. dt_datetime(timestamp);
+				module:log("debug", "Feed %q item %s is missing an id, using a HMAC of the item instead", item.url, entry:top_tag());
+				id = item.url .. "#" .. hmac_sha1(item.url, tostring(entry), true) .. "@" .. dt_datetime(timestamp);
 			end
 			entry:text_tag("id", id);
 		end