Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Drops unused ext_events.lua. #14558

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions resources/prosody-plugins/ext_events.lib.lua

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
local st = require "util.stanza";
local socket = require "socket";
local json = require "util.json";
local ext_events = module:require "ext_events";
local it = require "util.iterators";
local process_host_module = module:require "util".process_host_module;

Expand Down
12 changes: 8 additions & 4 deletions resources/prosody-plugins/mod_muc_call.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
local ext_events = module:require "ext_events"
local jid = require "util.jid"
local extract_subdomain = module:require "util".extract_subdomain;

Expand Down Expand Up @@ -77,13 +76,18 @@ module:hook(

local invite = function()
local url = assert(url_from_room_jid(event.stanza.attr.from))
ext_events.invite(event.stanza, url, call_id)
module:fire_event('jitsi-call-invite', { stanza = event.stanza; url = url; call_id = call_id; });
end

local cancel = function()
local url = assert(url_from_room_jid(event.stanza.attr.from))
local status = event.stanza:get_child_text("status")
ext_events.cancel(event.stanza, url, string.lower(status), call_id)
module:fire_event('jitsi-call-cancel', {
stanza = event.stanza;
url = url;
reason = string.lower(status);
call_id = call_id;
});
end

-- If for any reason call_cancel is set to true then a cancel
Expand All @@ -96,7 +100,7 @@ module:hook(

local missed = function()
cancel()
ext_events.missed(event.stanza, call_id)
module:fire_event('jitsi-call-missed', { stanza = event.stanza; call_id = call_id; });
end

-- All other call flow actions will require a status.
Expand Down
7 changes: 3 additions & 4 deletions resources/prosody-plugins/mod_speakerstats_component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ local room_jid_match_rewrite = util.room_jid_match_rewrite;
local is_healthcheck_room = util.is_healthcheck_room;
local process_host_module = util.process_host_module;
local jid_resource = require "util.jid".resource;
local ext_events = module:require "ext_events"
local st = require "util.stanza";
local socket = require "socket";
local json = require "util.json";
Expand Down Expand Up @@ -314,14 +313,14 @@ function room_destroyed(event)
return;
end

ext_events.speaker_stats(room, room.speakerStats);
module:fire_event("send-speaker-stats", { room = room; roomSpeakerStats = room.speakerStats; });
end

module:hook("message/host", on_message);

function process_main_muc_loaded(main_muc, host_module)
-- the conference muc component
module:log("info", "Hook to muc events on %s", host_module);
module:log("info", "Hook to muc events on %s", host_module.host);
main_muc_service = main_muc;
module:log("info", "Main muc service %s", main_muc_service)
host_module:hook("muc-room-created", room_created, -1);
Expand All @@ -332,7 +331,7 @@ end

function process_breakout_muc_loaded(breakout_muc, host_module)
-- the Breakout muc component
module:log("info", "Hook to muc events on %s", host_module);
module:log("info", "Hook to muc events on %s", host_module.host);
host_module:hook("muc-room-created", breakout_room_created, -1);
host_module:hook("muc-occupant-joined", occupant_joined, -1);
host_module:hook("muc-occupant-pre-leave", occupant_leaving, -1);
Expand Down
Loading