Diff

mod_mam/mod_mam.lua @ 673:9dcf98018644

mod_mam: Break when the message is more recent than the range requested
author Kim Alvefur <zash@zash.se>
date Thu, 24 May 2012 22:56:12 +0200
parent 672:8ae5317ba032
child 674:699187d18f11
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Thu May 24 22:37:14 2012 +0200
+++ b/mod_mam/mod_mam.lua	Thu May 24 22:56:12 2012 +0200
@@ -157,6 +157,8 @@
 				orig_stanza.attr.xmlns = "jabber:client";
 				fwd_st:add_child(orig_stanza);
 				origin.send(fwd_st);
+			elseif qend and when > qend then
+				break -- We have passed into messages more recent than requested
 			end
 		end
 		-- That's all folks!