From 95f4c6a7496cdf4033985ca6dc539ee3e08874a2 Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Mon, 27 Apr 2020 14:46:15 +0200
Subject: mod_carbons: Check for and strip 'private' tag before stopping

This was explicit previously
---
 plugins/mod_carbons.lua | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/mod_carbons.lua b/plugins/mod_carbons.lua
index 67f345f1..fad47a7c 100644
--- a/plugins/mod_carbons.lua
+++ b/plugins/mod_carbons.lua
@@ -92,13 +92,14 @@ local function message_handler(event, c2s)
 
 	if not should then
 		module:log("debug", "Not copying stanza: %s (%s)", stanza:top_tag(), why);
-		return;
-	elseif why == "private" and not c2s then
+		if why == "private" and not c2s then
 			stanza:maptags(function(tag)
 				if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then
 					return tag;
 				end
 			end);
+		end
+		return;
 	end
 
 	local carbon;
-- 
cgit v1.2.3