aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_mam/mod_mam.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index d8555ec1..b57fc030 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -249,8 +249,7 @@ module:hook("iq-get/self/"..xmlns_mam..":metadata", function (event)
return true;
end
- local id, _, when = first();
- if id then
+ for id, _, when in first do
reply:tag("start", { id = id, timestamp = timestamp(when) }):up();
end
end
@@ -262,8 +261,7 @@ module:hook("iq-get/self/"..xmlns_mam..":metadata", function (event)
return true;
end
- local id, _, when = last();
- if id then
+ for id, _, when in last do
reply:tag("end", { id = id, timestamp = timestamp(when) }):up();
end
end