Mercurial > prosody-hg
comparison plugins/mod_invites.lua @ 13892:c83fdee8efda 13.0
mod_invites: Accept --admin flag as shortcut for --role prosody:admin
The code was there, but the flag was not included in the command description
so it was rejected during validation.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 02 Jun 2025 12:50:57 +0100 |
| parents | ecafafec7806 |
| children | 17b5a10bd9c9 |
comparison
equal
deleted
inserted
replaced
| 13890:8769ca1b4c0f | 13892:c83fdee8efda |
|---|---|
| 257 { name = "user_jid", type = "string" }; | 257 { name = "user_jid", type = "string" }; |
| 258 }; | 258 }; |
| 259 host_selector = "user_jid"; | 259 host_selector = "user_jid"; |
| 260 flags = { | 260 flags = { |
| 261 array_params = { role = true, group = have_group_invites }; | 261 array_params = { role = true, group = have_group_invites }; |
| 262 value_params = { expires_after = true }; | 262 value_params = { expires_after = true, admin = true }; |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 handler = function (self, user_jid, opts) --luacheck: ignore 212/self | 265 handler = function (self, user_jid, opts) --luacheck: ignore 212/self |
| 266 local username = jid_split(user_jid); | 266 local username = jid_split(user_jid); |
| 267 local roles = opts and opts.role or {}; | 267 local roles = opts and opts.role or {}; |
