# HG changeset patch # User Kim Alvefur # Date 1376163455 -7200 # Node ID 9fa89dc7a86f335d45757b0b21068a287306f7b8 # Parent 5a00f9bec6e78a767763c0dcd089a27bf261acf5 mod_mam_muc: Search the rooms archive correctly (copypaste error from mod_mam) diff -r 5a00f9bec6e7 -r 9fa89dc7a86f mod_mam_muc/mod_mam_muc.lua --- a/mod_mam_muc/mod_mam_muc.lua Sat Aug 10 21:32:21 2013 +0200 +++ b/mod_mam_muc/mod_mam_muc.lua Sat Aug 10 21:37:35 2013 +0200 @@ -61,6 +61,7 @@ module:hook("iq-get/bare/"..xmlns_mam..":query", function(event) local origin, stanza = event.origin, event.stanza; local room = stanza.attr.to; + local room_node = jid_split(room); local query = stanza.tags[1]; local room_obj = rooms[room]; @@ -101,7 +102,7 @@ if type(before) ~= "string" then before = nil; end -- Load all the data! - local data, err = archive:find(origin.username, { + local data, err = archive:find(room_node, { start = qstart; ["end"] = qend; -- Time range limit = qmax; before = before; after = after;