# HG changeset patch # User Kim Alvefur # Date 1337892972 -7200 # Node ID 9dcf98018644fc7f318dc010fea79efce644375c # Parent 8ae5317ba03226558f0db2caf00d016c73933a6c mod_mam: Break when the message is more recent than the range requested diff -r 8ae5317ba032 -r 9dcf98018644 mod_mam/mod_mam.lua --- 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!