From d0321442c91790342601ae3ea62ec2c1831801b4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 21 Jan 2023 17:09:22 +0100 Subject: mod_muc_mam: Add mam#extended form fields #1796 (Thanks Rain) Oversight in cabb022f31c0 --- plugins/mod_muc_mam.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugins/mod_muc_mam.lua') diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua index 15780d41..6195b081 100644 --- a/plugins/mod_muc_mam.lua +++ b/plugins/mod_muc_mam.lua @@ -109,6 +109,16 @@ local query_form = dataform { { name = "end"; type = "text-single"; datatype = "xs:dateTime" }; }; +if archive.caps and archive.caps.full_id_range then + table.insert(query_form, { name = "before-id"; type = "text-single"; }); + table.insert(query_form, { name = "after-id"; type = "text-single"; }); +end + +if archive.caps and archive.caps.ids then + table.insert(query_form, { name = "ids"; type = "list-multi"; }); +end + + -- Serve form module:hook("iq-get/bare/"..xmlns_mam..":query", function(event) local origin, stanza = event.origin, event.stanza; -- cgit v1.2.3