mod_muc_mam: Add mam#extended form fields #1796 (Thanks Rain) 0.12
authorKim Alvefur <zash@zash.se>
Sat, 21 Jan 2023 17:09:22 +0100
branch0.12
changeset 12862 71dc48a89e5a
parent 12861 cc86d77481fc
child 12863 cd738fb8c754
mod_muc_mam: Add mam#extended form fields #1796 (Thanks Rain) Oversight in cabb022f31c0
plugins/mod_muc_mam.lua
--- a/plugins/mod_muc_mam.lua	Sat Jan 21 16:54:43 2023 +0100
+++ b/plugins/mod_muc_mam.lua	Sat Jan 21 17:09:22 2023 +0100
@@ -109,6 +109,16 @@
 	{ 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;