Changeset

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 670:9d8efb804a00
children 672:8ae5317ba032
files mod_mam/mod_mam.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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.