Comparison

mod_pubsub_text_interface/mod_pubsub_text_interface.lua @ 4489:725768d83830

mod_pubsub_text_interface: Pass node object to broadcaster for config access Otherwise certain node settings have no effect when asking for the last item
author Kim Alvefur <zash@zash.se>
date Tue, 02 Mar 2021 19:20:41 +0100
parent 4234:f31eac6b2e9c
child 4644:bbf9e36db3a9
comparison
equal deleted inserted replaced
4488:eea62d30ae08 4489:725768d83830
75 elseif not item_id then 75 elseif not item_id then
76 reply:body("node is empty"); 76 reply:body("node is empty");
77 else 77 else
78 pubsub.config.broadcaster("items", node_arg, { 78 pubsub.config.broadcaster("items", node_arg, {
79 [from] = { ["pubsub#include_body"] = true } 79 [from] = { ["pubsub#include_body"] = true }
80 }, item); 80 }, item, nil, pubsub.nodes[node_arg]);
81 reply:body("OK"); 81 reply:body("OK");
82 end 82 end
83 else 83 else
84 reply:body("Unknown command. `help` to list commands."); 84 reply:body("Unknown command. `help` to list commands.");
85 reply:tag("response", { xmlns = xmlns_quick_resp, value = "help", }):up(); 85 reply:tag("response", { xmlns = xmlns_quick_resp, value = "help", }):up();