Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
FIX: prosody jibri queue handle iq properly
Aaron van Meerten51fd10278b3e
diff --git a/resources/prosody-plugins/mod_jibri_queue_component.lua b/resources/prosody-plugins/mod_jibri_queue_component.luaindex 5ae62cb4ce..720bebb37b 100644--- a/resources/prosody-plugins/mod_jibri_queue_component.lua+++ b/resources/prosody-plugins/mod_jibri_queue_component.lua@@ -180,37 +180,42 @@ local function sendEvent(type,room_address,participant,edetails)}, cb);end--- receives messages from client currently connected to the room--- clients indicates their own dominant speaker events-function on_message(event)+-- receives iq from client currently connected to the room+function on_iq(event)-- Check the type of the incoming stanza to avoid loops:if event.stanza.attr.type == "error" thenreturn; -- We do not want to reply to these, so leave.end-- local jibriQueue- = jibriQueue.stanza:get_child('jibriqueue', 'http://jitsi.org/jitmeet');- if jibriQueue then- local roomAddress = jibriQueue.attr.room;- local room = get_room_from_jid(room_jid_match_rewrite(roomAddress));-- if not room then- log("warn", "No room found %s", roomAddress);- return false;- end-- 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, roomAddress);- return false;+ if event.stanza.attr.to == module:get_host() then+ if event.stanza.attr.type == "set" then+ log("info", "Jibri Queue Messsage Event found: %s ",inspect(event.stanza));++ local jibriQueue+ = event.stanza:get_child('jibriqueue', 'http://jitsi.org/protocol/jibri-queue');+ if jibriQueue then+ log("info", "Jibri Queue: %s ",inspect(jibriQueue));+ local roomAddress = jibriQueue.attr.room;+ local room = get_room_from_jid(room_jid_match_rewrite(roomAddress));++ if not room then+ log("warn", "No room found %s", roomAddress);+ return false;+ end++ 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, roomAddress);+ return false;+ end+ -- now handle new jibri queue message+ local edetails = {+ ["foo"] = "bar"+ }+ sendEvent('JoinQueue',room.jid,occupant.jid,edetails)+ endend- -- now handle new jibri queue message- local edetails = {- ["foo"] = "bar"- }- sendEvent('Message',roomAddress,from,edetails)endreturn trueend@@ -232,7 +237,7 @@ function occupant_joined(event)sendEvent('Join',room.jid,occupant.jid,edetails)end-module:hook("message/host", on_message);+module:hook("iq/host", on_iq);-- executed on every host added internally in prosody, including componentsfunction process_host(host)