Diff

mod_muc_http_defaults/mod_muc_http_defaults.lua @ 4455:89e54247ade6

mod_muc_http_defaults: Add template filters to let you extract room JID parts
author Kim Alvefur <zash@zash.se>
date Sun, 21 Feb 2021 16:15:21 +0100
parent 4450:5f27bda5de80
child 5339:6d99ddd99694
line wrap: on
line diff
--- a/mod_muc_http_defaults/mod_muc_http_defaults.lua	Mon Jan 25 08:41:37 2021 +0100
+++ b/mod_muc_http_defaults/mod_muc_http_defaults.lua	Sun Feb 21 16:15:21 2021 +0100
@@ -11,7 +11,8 @@
 local json = require "util.json";
 local st = require "util.stanza";
 
-local render = require "util.interpolation".new("%b{}", uh.urlencode);
+local funcs = {jid_bare = jid.bare; jid_host = jid.host; jid_node = jid.node};
+local render = require"util.interpolation".new("%b{}", uh.urlencode, funcs);
 
 module:depends"muc";