diff mod_mam/mod_mam.lua @ 671:74efb2db00a6

mod_mam: From the spec: servers SHOULD NOT archive messages that do not have a <body/> child tag.
author Thijs Alkemade <thijsalkemade@gmail.com>
date Thu, 24 May 2012 22:29:17 +0200
parents b42b75f3bda0
children 8ae5317ba032
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Wed May 23 21:52:14 2012 +0200
+++ b/mod_mam/mod_mam.lua	Thu May 24 22:29:17 2012 +0200
@@ -206,7 +206,8 @@
 	-- Don't store messages of these types
 	if orig_type == "error"
 	or orig_type == "headline"
-	or orig_type == "groupchat" then
+	or orig_type == "groupchat"
+	or not stanza:get_child("body") then
 		return;
 		-- TODO Maybe headlines should be configurable?
 		-- TODO Write a mod_mam_muc for groupchat messages.