Software /
code /
prosody-modules
Diff
mod_pubsub_summary/mod_pubsub_summary.lua @ 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 |
parent | 4609:fcfe691d6322 |
child | 5131:82e7251d4f52 |
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;