From e9c31280a6cdcaa61a8d4df34e770e6dd3e26e22 Mon Sep 17 00:00:00 2001 From: Alexander PapaTutuWawa Date: Thu, 3 Jun 2021 23:07:41 +0200 Subject: [PATCH] mod_mix: Fix some small errors --- mod_mix/mix.lib.lua | 2 +- mod_mix/mod_mix.lua | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mod_mix/mix.lib.lua b/mod_mix/mix.lib.lua index fd9cd0c..cb3c0fc 100644 --- a/mod_mix/mix.lib.lua +++ b/mod_mix/mix.lib.lua @@ -110,7 +110,7 @@ function Channel:get_broadcaster() end for jid in pairs(jids) do - module:log("debug", "Sending notification to %s from %s for node %s", jid, user_bare, node); + module:log("debug", "Sending notification to %s for node %s", jid, node); message.attr.to = jid; module:send(message); end diff --git a/mod_mix/mod_mix.lua b/mod_mix/mod_mix.lua index b94ce0e..af58af7 100644 --- a/mod_mix/mod_mix.lua +++ b/mod_mix/mod_mix.lua @@ -388,7 +388,7 @@ module:hook("iq-set/bare/"..namespaces.mix_core..":join", function(event) -- Prevent the user from joining multiple times local participant = channel:find_participant(from); if participant then - module:send(st.error_reply(stanza, "cancel", "bad-request", "User already joined")); + module:send(st.error_reply(stanza, "cancel", "conflict", "User already joined")); return true; end @@ -418,7 +418,6 @@ module:hook("iq-set/bare/"..namespaces.mix_core..":join", function(event) local nodes = {}; local has_subscribed_once = false; local first_error = nil; - local owner_or_admin = channel:is_admin(from) or channel:is_owner(from); for subscribe in join:childtags("subscribe") do -- May the user subscribe to the node? module:log("debug", "Subscribing user to node %s", subscribe.attr.node); @@ -467,7 +466,6 @@ module:hook("iq-set/bare/"..namespaces.mix_core..":join", function(event) -- We do not reuse nick_tag as it might be nil reply:tag("nick"):text(nick):up(); - reply:add_child(anon.form:form(config, "result")); origin.send(reply); return true end);