fix: Fix log messages in end_conference module. (#12369)

* fix: Fix log message.

From `general error No muc_component specified` to `endconference.meet.damencho.net:end_conference error No muc_component specified`

* squash: more.
This commit is contained in:
Дамян Минков 2022-10-12 13:31:06 -05:00 committed by GitHub
parent 935f95a3d5
commit 40e1f28fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ local END_CONFERENCE_REASON = 'The meeting has been terminated';
local end_conference_component = module:get_option_string('end_conference_component', 'endconference.'..module.host);
if end_conference_component == nil then
log('error', 'No end_conference_component specified.');
module:log('error', 'No end_conference_component specified.');
return;
end
@ -26,7 +26,7 @@ module:depends("jitsi_session");
local muc_component_host = module:get_option_string('muc_component');
if muc_component_host == nil then
log('error', 'No muc_component specified. No muc to operate on!');
module:log('error', 'No muc_component specified. No muc to operate on!');
return;
end
@ -61,17 +61,17 @@ function on_message(event)
local from = event.stanza.attr.from;
local occupant = room:get_occupant_by_real_jid(from);
if not occupant then
log('warn', 'No occupant %s found for %s', from, room.jid);
module:log('warn', 'No occupant %s found for %s', from, room.jid);
return false;
end
if occupant.role ~= 'moderator' then
log('warn', 'Occupant %s is not moderator and not allowed this operation for %s', from, room.jid);
module:log('warn', 'Occupant %s is not moderator and not allowed this operation for %s', from, room.jid);
return false;
end
-- destroy the room
room:destroy(nil, END_CONFERENCE_REASON);
log('info', 'Room %s destroyed by occupant %s', room.jid, from);
module:log('info', 'Room %s destroyed by occupant %s', room.jid, from);
return true;
end