Changeset

619:cade7dac6159

mod_mam: Try to not bork when sending a message to your bare jid
author Kim Alvefur <zash@zash.se>
date Tue, 28 Feb 2012 14:36:05 +0100
parents 618:267548522810
children 620:648e75c9d3e7
files mod_mam/mod_mam.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Tue Feb 28 14:33:35 2012 +0100
+++ b/mod_mam/mod_mam.lua	Tue Feb 28 14:36:05 2012 +0100
@@ -202,6 +202,7 @@
 	if not orig_from and c2s then
 		orig_from = origin.full_jid;
 	end
+	orig_to = orig_to or orig_from; -- Weird corner cases
 
 	-- Don't store messages of these types
 	if orig_type == "error"