Changeset

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
parents 672:8ae5317ba032
children 674:699187d18f11
files mod_mam/mod_mam.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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!