aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_muc_mam.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-01-21 17:09:22 +0100
committerKim Alvefur <zash@zash.se>2023-01-21 17:09:22 +0100
commitd0321442c91790342601ae3ea62ec2c1831801b4 (patch)
treeb85e406bd59c48c4ed13216e1394590c59de4a6c /plugins/mod_muc_mam.lua
parent4830568435f6f07e3c3241861cc901adc6b53977 (diff)
downloadprosody-d0321442c91790342601ae3ea62ec2c1831801b4.tar.gz
prosody-d0321442c91790342601ae3ea62ec2c1831801b4.zip
mod_muc_mam: Add mam#extended form fields #1796 (Thanks Rain)
Oversight in cabb022f31c0
Diffstat (limited to 'plugins/mod_muc_mam.lua')
-rw-r--r--plugins/mod_muc_mam.lua10
1 files changed, 10 insertions, 0 deletions
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;