Software /
code /
prosody-modules
Comparison
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 |
comparison
equal
deleted
inserted
replaced
4454:8862a80cbd00 | 4455:89e54247ade6 |
---|---|
9 local uh = require "util.http"; | 9 local uh = require "util.http"; |
10 local jid = require "util.jid"; | 10 local jid = require "util.jid"; |
11 local json = require "util.json"; | 11 local json = require "util.json"; |
12 local st = require "util.stanza"; | 12 local st = require "util.stanza"; |
13 | 13 |
14 local render = require "util.interpolation".new("%b{}", uh.urlencode); | 14 local funcs = {jid_bare = jid.bare; jid_host = jid.host; jid_node = jid.node}; |
15 local render = require"util.interpolation".new("%b{}", uh.urlencode, funcs); | |
15 | 16 |
16 module:depends"muc"; | 17 module:depends"muc"; |
17 | 18 |
18 local url_template = assert(module:get_option_string("muc_create_api_url", nil), "'muc_create_api_url' is a required option"); | 19 local url_template = assert(module:get_option_string("muc_create_api_url", nil), "'muc_create_api_url' is a required option"); |
19 local apiauth = module:get_option_string("muc_create_api_auth", nil); | 20 local apiauth = module:get_option_string("muc_create_api_auth", nil); |