# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1612969590 -3600
# Node ID 09657f758f53f9069e176652baaeb12c9caf1d5c
# Parent  07529dba102d277625e40164f10a618cc6c1fa85
mod_pubsub_summary: Skip adding title if already part of summary

diff -r 07529dba102d -r 09657f758f53 mod_pubsub_summary/mod_pubsub_summary.lua
--- a/mod_pubsub_summary/mod_pubsub_summary.lua	Wed Feb 10 16:05:14 2021 +0100
+++ b/mod_pubsub_summary/mod_pubsub_summary.lua	Wed Feb 10 16:06:30 2021 +0100
@@ -31,7 +31,7 @@
 			});
 	end
 	local summary;
-	if title and content then
+	if title and content and content:sub(1, #title) ~= title then
 		summary = title .. "\n\n" .. content;
 	elseif title or content then
 		summary = content or title;