From 05b481ec89cf10d6ca94775afdb199c15f13c3b9 Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Sun, 6 Jan 2019 21:09:50 +0100
Subject: mod_csi_simple: Unpack Carbons-forwarded messages (fixes part of
 #1250)

---
 plugins/mod_csi_simple.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index 3f0560ca..cf03ef48 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -66,6 +66,10 @@ module:hook("csi-is-stanza-important", function (event)
 		if stanza:get_child("sent", "urn:xmpp:carbons:2") then
 			return true;
 		end
+		local forwarded = stanza:find("{urn:xmpp:carbons:2}received/{urn:xmpp:forward:0}/{jabber:client}message");
+		if forwarded then
+			stanza = forwarded;
+		end
 		if stanza:get_child("body") then
 			return true;
 		end
-- 
cgit v1.2.3