mod_pubsub_text_interface/mod_pubsub_text_interface.lua
changeset 4648 bbf9e36db3a9
parent 4493 725768d83830
child 4649 25ce28711fac
equal deleted inserted replaced
4647:df09f9ce0b1b 4648:bbf9e36db3a9
    31 
    31 
    32 	local command, node_arg = body:match("^(%a+)%s+(.*)");
    32 	local command, node_arg = body:match("^(%a+)%s+(.*)");
    33 	command = (command or body):lower();
    33 	command = (command or body):lower();
    34 
    34 
    35 	if command == "help" then
    35 	if command == "help" then
    36 		reply:body(help);
    36 		reply:body(help):up();
    37 		reply:tag("response", { xmlns = xmlns_quick_resp, value = "list", }):up();
    37 		reply:tag("response", { xmlns = xmlns_quick_resp, value = "list", }):up();
    38 		reply:tag("response", { xmlns = xmlns_quick_resp, value = "subscriptions", }):up();
    38 		reply:tag("response", { xmlns = xmlns_quick_resp, value = "subscriptions", }):up();
    39 	elseif command == "list" then
    39 	elseif command == "list" then
    40 		local ok, nodes = pubsub:get_nodes(from);
    40 		local ok, nodes = pubsub:get_nodes(from);
    41 		if ok then
    41 		if ok then