diff options
author | Kim Alvefur <zash@zash.se> | 2019-12-23 21:16:10 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-12-23 21:16:10 +0100 |
commit | 0c9d47f6ff0bfae6f16040c64c15f041794bc08e (patch) | |
tree | 2efa7875bfb36b057c33997eb05bab1b9eb24967 /util/pubsub.lua | |
parent | 14d66d84121f2ff5a90da95d6b713d91910a9aa7 (diff) | |
download | prosody-0c9d47f6ff0bfae6f16040c64c15f041794bc08e.tar.gz prosody-0c9d47f6ff0bfae6f16040c64c15f041794bc08e.zip |
util.pubsub: Silence luacheck warnings, leaving notes on future proper fix
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r-- | util/pubsub.lua | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index 2e9df0e7..cfac7a68 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -281,7 +281,8 @@ function service:set_affiliation(node, actor, jid, affiliation) --> ok, err node_obj.affiliations[jid] = affiliation; if self.config.nodestore then - local ok, err = save_node_to_store(self, node_obj); + -- TODO pass the error from storage to caller eg wrapped in an util.error + local ok, err = save_node_to_store(self, node_obj); -- luacheck: ignore 211/err if not ok then node_obj.affiliations[jid] = old_affiliation; return ok, "internal-server-error"; @@ -345,7 +346,8 @@ function service:add_subscription(node, actor, jid, options) --> ok, err end if self.config.nodestore then - local ok, err = save_node_to_store(self, node_obj); + -- TODO pass the error from storage to caller eg wrapped in an util.error + local ok, err = save_node_to_store(self, node_obj); -- luacheck: ignore 211/err if not ok then node_obj.subscribers[jid] = old_subscription; self.subscriptions[normal_jid][jid][node] = old_subscription and true or nil; @@ -397,7 +399,8 @@ function service:remove_subscription(node, actor, jid) --> ok, err end if self.config.nodestore then - local ok, err = save_node_to_store(self, node_obj); + -- TODO pass the error from storage to caller eg wrapped in an util.error + local ok, err = save_node_to_store(self, node_obj); -- luacheck: ignore 211/err if not ok then node_obj.subscribers[jid] = old_subscription; self.subscriptions[normal_jid][jid][node] = old_subscription and true or nil; @@ -455,7 +458,8 @@ function service:create(node, actor, options) --> ok, err }; if self.config.nodestore then - local ok, err = save_node_to_store(self, self.nodes[node]); + -- TODO pass the error from storage to caller eg wrapped in an util.error + local ok, err = save_node_to_store(self, self.nodes[node]); -- luacheck: ignore 211/err if not ok then self.nodes[node] = nil; return ok, "internal-server-error"; @@ -774,7 +778,8 @@ function service:set_node_config(node, actor, new_config) --> ok, err node_obj.config = new_config; if self.config.nodestore then - local ok, err = save_node_to_store(self, node_obj); + -- TODO pass the error from storage to caller eg wrapped in an util.error + local ok, err = save_node_to_store(self, node_obj); -- luacheck: ignore 211/err if not ok then node_obj.config = old_config; return ok, "internal-server-error"; |