mirror of https://github.com/jitsi/jitsi-meet
fix(transcriptions,recording): Allows non moderators with features to dial, record or transcribe. (#15074)
* fix(transcriptions): Uses dial command to invite transcriber. * fix(transcriptions,recording): Allows non moderators with features to dial, record or transcribe. * sqaush: Make sure filtering works when only is a moderator. It works now and without a token and no features, but being moderator. * squash: Rename constant. * squash: Checks features first before defaulting to moderator when filtering metadata service. * squash: Checks features first before defaulting to moderator in UI. * squash: Fixes lint and one other check. * squash: Moves more logic to is_feature_allowed. * squash: Drops unnecessary check. * squash: Uses constant coming from ljm. * squash: Toggles back captions button on error. * squash: Fix comment. * squash: Reverting back isLiveStreamingButtonVisible. * squash: Fix imports.pull/15123/head jitsi-meet_9731
parent
262cb0422c
commit
b3742a3438
@ -1,31 +0,0 @@ |
||||
--This module performs features checking when a transcription is requested. |
||||
--If the transcription feature is not allowed, the tag indicating that a |
||||
--transcription is being requested will be stripped from the presence stanza. |
||||
--The module must be enabled under the muc component. |
||||
local is_feature_allowed = module:require "util".is_feature_allowed; |
||||
|
||||
module:log("info", "Loading mod_muc_transcription_filter!"); |
||||
local filtered_tag_name = "jitsi_participant_requestingTranscription"; |
||||
|
||||
function filter_transcription_tag(event) |
||||
local stanza = event.stanza; |
||||
local session = event.origin; |
||||
if stanza and stanza.name == "presence" then |
||||
if not is_feature_allowed(session.jitsi_meet_context_features,'transcription') then |
||||
stanza:maptags(function(tag) |
||||
if tag and tag.name == filtered_tag_name then |
||||
module:log("info", "Removing %s tag from presence stanza!", filtered_tag_name); |
||||
return nil; |
||||
else |
||||
return tag; |
||||
end |
||||
end) |
||||
end |
||||
end |
||||
end |
||||
|
||||
module:hook("presence/bare", filter_transcription_tag); |
||||
module:hook("presence/full", filter_transcription_tag); |
||||
module:hook("presence/host", filter_transcription_tag); |
||||
|
||||
module:log("info", "Loaded mod_muc_transcription_filter!"); |
Loading…
Reference in new issue