# HG changeset patch # User Kim Alvefur # Date 1440603341 -7200 # Node ID dbce8a7726effce983a0118e7438aa8229b3cd21 # Parent d2b82b90c41365f858af1b3b71788a5d2c30639d mod_carbons: Carbon chat messages or normal messages that have a body diff -r d2b82b90c413 -r dbce8a7726ef mod_carbons/mod_carbons.lua --- a/mod_carbons/mod_carbons.lua Wed Aug 26 17:22:14 2015 +0200 +++ b/mod_carbons/mod_carbons.lua Wed Aug 26 17:35:41 2015 +0200 @@ -28,14 +28,12 @@ local function message_handler(event, c2s) local origin, stanza = event.origin, event.stanza; - local orig_type = stanza.attr.type; + local orig_type = stanza.attr.type or "normal"; local orig_from = stanza.attr.from; local orig_to = stanza.attr.to; - if not (orig_type == nil - or orig_type == "normal" - or orig_type == "chat") then - return -- No carbons for messages of type error or headline + if not(orig_type == "chat" or orig_type == "normal" and standard:get_child("body")) then + return -- Only chat type messages end -- Stanza sent by a local client