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

fix: Fix detecting transcriber (the extension is not added on initial join). #1205

Merged
merged 1 commit into from
Jan 14, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import org.jitsi.xmpp.extensions.jitsimeet.JitsiParticipantCodecList
import org.jitsi.xmpp.extensions.jitsimeet.JitsiParticipantRegionPacketExtension
import org.jitsi.xmpp.extensions.jitsimeet.StartMutedPacketExtension
import org.jitsi.xmpp.extensions.jitsimeet.StatsId
import org.jitsi.xmpp.extensions.jitsimeet.TranscriptionStatusExtension
import org.jitsi.xmpp.extensions.jitsimeet.VideoMutedExtension
import org.jivesoftware.smack.packet.Presence
import org.jivesoftware.smack.packet.StandardExtensionElement
Expand Down Expand Up @@ -162,9 +161,13 @@ class ChatRoomMemberImpl(
val jidTrusted = domain != null && XmppConfig.config.trustedDomains.contains(domain)
val jibriSignaled = features.featureExtensions.any { it.`var` == "http://jitsi.org/protocol/jibri" }
val jigasiSignaled = features.featureExtensions.any { it.`var` == "http://jitsi.org/protocol/jigasi" }
val transcriberSignaled = features.featureExtensions.any {
it.`var` == "http://jitsi.org/protocol/transcriber"
}

isJibri = jibriSignaled && jidTrusted
isJigasi = jigasiSignaled && jidTrusted
isTranscriber = transcriberSignaled && jidTrusted

if (jibriSignaled && !jidTrusted) {
logger.warn(
Expand All @@ -181,6 +184,7 @@ class ChatRoomMemberImpl(
} else {
isJigasi = false
isJibri = false
isTranscriber = false
}

var newRole: MemberRole = MemberRole.VISITOR
Expand All @@ -195,8 +199,6 @@ class ChatRoomMemberImpl(
role = newRole
}

isTranscriber = isJigasi && presence.getExtension(TranscriptionStatusExtension::class.java) != null

presence.getExtension(JitsiParticipantRegionPacketExtension::class.java)?.let {
region = it.regionId
}
Expand Down
8 changes: 0 additions & 8 deletions jicofo/src/main/kotlin/org/jitsi/jicofo/xmpp/Smack.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import org.jitsi.xmpp.extensions.jitsimeet.MuteIqProvider
import org.jitsi.xmpp.extensions.jitsimeet.MuteVideoIqProvider
import org.jitsi.xmpp.extensions.jitsimeet.StartMutedProvider
import org.jitsi.xmpp.extensions.jitsimeet.StatsId
import org.jitsi.xmpp.extensions.jitsimeet.TranscriptionStatusExtension
import org.jitsi.xmpp.extensions.jitsimeet.UserInfoPacketExt
import org.jitsi.xmpp.extensions.jitsimeet.VideoMutedExtension
import org.jitsi.xmpp.extensions.rayo.RayoIqProvider
Expand Down Expand Up @@ -128,13 +127,6 @@ fun registerXmppExtensions() {
DefaultPacketExtensionProvider(JitsiParticipantCodecList::class.java)
)

// The extension used for detecting a transcriber
ProviderManager.addExtensionProvider(
TranscriptionStatusExtension.ELEMENT,
TranscriptionStatusExtension.NAMESPACE,
DefaultPacketExtensionProvider(TranscriptionStatusExtension::class.java)
)

// register Jingle
ProviderManager.addIQProvider(
JingleIQ.ELEMENT,
Expand Down
Loading