aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_muc.lua3
-rw-r--r--plugins/mod_presence.lua2
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_muc.lua b/plugins/mod_muc.lua
index ca8e9cb7..ffa0bb85 100644
--- a/plugins/mod_muc.lua
+++ b/plugins/mod_muc.lua
@@ -23,7 +23,7 @@ if module:get_host_type() ~= "component" then
end
local muc_domain = module:get_host();
-local muc_name = "MUCMUCMUC!!!";
+local muc_name = "Chatrooms";
local history_length = 20;
-- room_name -> room
@@ -276,6 +276,7 @@ function handle_to_occupant(origin, stanza) -- PM, vCards, etc
log("debug", "%s joining as %s", from, to);
local data;
if not rooms:get(room) and not rooms_info:get(room) then -- new room
+ rooms_info:set(room, 'name', (jid_split(room)));
data = {affiliation='owner', role='moderator', jid=from, sessions={[from]=get_filtered_presence(stanza)}};
end
if not data then -- new occupant
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index 135d1c67..2fb976b5 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -65,7 +65,7 @@ function handle_normal_presence(origin, stanza, core_route_stanza)
end
local node, host = jid_split(stanza.attr.from);
for _, res in pairs(hosts[host].sessions[node].sessions) do -- broadcast to all resources
- if res ~= origin and res.full_jid then -- to resource. FIXME is res.full_jid the correct check? Maybe it should be res.presence
+ if res ~= origin and res.presence then -- to resource
stanza.attr.to = res.full_jid;
core_route_stanza(origin, stanza);
end