Changeset

5129:cde38b7de04a

mod_pubsub_summary: Hide link relation when value is "alternate" Because this is usually the main URL for the post
author Kim Alvefur <zash@zash.se>
date Sat, 07 Jan 2023 17:15:47 +0100
parents 5128:7cc0f68b8715
children 5130:0772facc786f
files mod_pubsub_summary/mod_pubsub_summary.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_summary/mod_pubsub_summary.lua	Thu Jan 05 17:28:06 2023 +0000
+++ b/mod_pubsub_summary/mod_pubsub_summary.lua	Sat Jan 07 17:15:47 2023 +0100
@@ -40,7 +40,7 @@
 	for link in payload:childtags("link") do
 		if link and link.attr.href and link.attr.href ~= content then
 			summary = (summary and summary .. "\n" or "") .. link.attr.href;
-			if link.attr.rel then summary = summary .. " [" .. link.attr.rel .. "]" end
+			if link.attr.rel and link.attr.rel ~= "alternate" then summary = summary .. " [" .. link.attr.rel .. "]" end
 		end
 	end
 	return summary;