Software /
code /
prosody
Comparison
plugins/mod_pubsub/commands.lib.lua @ 13623:e226f9632a48
mod_pubsub: Remove duplicate create_node command
Removed the one without error handling.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 14 Jan 2025 12:26:14 +0000 |
parent | 13585:8091c1b8023e |
comparison
equal
deleted
inserted
replaced
13622:4e908958660e | 13623:e226f9632a48 |
---|---|
2 local st = require "prosody.util.stanza"; | 2 local st = require "prosody.util.stanza"; |
3 | 3 |
4 local pubsub_lib = module:require("mod_pubsub/pubsub"); | 4 local pubsub_lib = module:require("mod_pubsub/pubsub"); |
5 | 5 |
6 local function add_commands(get_service) | 6 local function add_commands(get_service) |
7 module:add_item("shell-command", { | |
8 section = "pubsub"; | |
9 section_desc = "Manage publish/subscribe nodes"; | |
10 name = "create_node"; | |
11 desc = "Create a node with the specified name"; | |
12 args = { | |
13 { name = "service_jid", type = "string" }; | |
14 { name = "node_name", type = "string" }; | |
15 }; | |
16 host_selector = "service_jid"; | |
17 | |
18 handler = function (self, service_jid, node_name) --luacheck: ignore 212/self | |
19 return get_service(service_jid):create(node_name, true); | |
20 end; | |
21 }); | |
22 | |
23 module:add_item("shell-command", { | 7 module:add_item("shell-command", { |
24 section = "pubsub"; | 8 section = "pubsub"; |
25 section_desc = "Manage publish/subscribe nodes"; | 9 section_desc = "Manage publish/subscribe nodes"; |
26 name = "list_nodes"; | 10 name = "list_nodes"; |
27 desc = "List nodes on a pubsub service"; | 11 desc = "List nodes on a pubsub service"; |