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

A/V moderation #734

Merged
merged 26 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b1bf86a
hack: Read Message-s with JsonMessageExtension.
bgrozev Apr 29, 2021
8a775ee
feat: Implements av moderation.
damencho Apr 29, 2021
41ed4d4
squash: Validates from address for av moderation messages.
damencho Apr 29, 2021
c603415
squash: Drop unnecessary semicolons.
damencho Apr 29, 2021
568a78e
squash: Fixes comments.
damencho Apr 29, 2021
9db7d65
squash: Fixes comments.
damencho Apr 30, 2021
1785727
squash: Move kept component address as DomainBareJid.
damencho Apr 30, 2021
e0c8ddc
squash: Move value to boolean.
damencho Apr 30, 2021
3ce1480
squash: Fixes logic around unmuting.
damencho May 1, 2021
0b2da64
squash: Allow unmutinng for moderators when av moderation is on.
damencho May 2, 2021
9db7caf
squash: Parse mediaType when enabled/disabled.
damencho May 7, 2021
3d0055f
squash: Force mute participants when av moderation is enabled.
damencho May 7, 2021
8a9fdc5
squash: Fixes post-build checks.
damencho May 11, 2021
23235ef
squash: Fixes comments.
damencho May 11, 2021
da45a70
squash: Moves AvModerationHandler to a file of its own.
damencho May 11, 2021
abee48f
fix: Fixes tests.
damencho May 11, 2021
e99631f
squash: Removes handling of actor for AV moderation.
damencho May 11, 2021
3edf5cd
squash: Fixes a log line.
damencho May 11, 2021
521bb07
squash: Fixes comments.
damencho May 11, 2021
89b3205
squash: Move discoverInfo to XmppProvider, provide a mock.
bgrozev May 11, 2021
eabca1b
feat: Handles mute state for channels.
damencho May 12, 2021
7c0faed
fix: Updates participant's channel info with mute state.
damencho May 12, 2021
da3e72e
fix: Fixes direction when updating channels.
damencho May 12, 2021
fc2d1ee
fix: Handle MuteIq and MuteVideoIq async.
bgrozev May 12, 2021
29d5b8c
squash: Remove unused import.
bgrozev May 12, 2021
4707b2c
squash: Fixes comments.
damencho May 12, 2021
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
Prev Previous commit
Next Next commit
squash: Fixes comments.
  • Loading branch information
damencho committed May 11, 2021
commit 521bb079024689bd7704ede0ae602a103600e2ce
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ public MuteResult handleMuteRequest(Jid muterJid, Jid toBeMutedJid, boolean doMu
if (!doMute)
{
// do not allow unmuting other participants even for the moderator
if (muterJid != null && !muterJid.equals(toBeMutedJid))
if (muterJid == null || !muterJid.equals(toBeMutedJid))
{
logger.warn("Unmute not allowed, muterJid=" + muterJid + ", toBeMutedJid=" + toBeMutedJid);
return MuteResult.NOT_ALLOWED;
Expand Down
4 changes: 3 additions & 1 deletion src/main/kotlin/org/jitsi/jicofo/xmpp/AvModerationHandler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AvModerationHandler(val xmppProvider: XmppProvider) : RegistrationListener
private var avModerationAddress: DomainBareJid? = null

init {
xmppProvider.xmppConnection.addAsyncStanzaListener(
xmppProvider.xmppConnection.addSyncStanzaListener(
StanzaListener { stanza -> TaskPools.ioPool.submit { processStanza(stanza) } },
MessageTypeFilter.NORMAL
)
Expand Down Expand Up @@ -83,6 +83,8 @@ class AvModerationHandler(val xmppProvider: XmppProvider) : RegistrationListener
val oldEnabledValue = conference.chatRoom.isAvModerationEnabled(mediaType)
bgrozev marked this conversation as resolved.
Show resolved Hide resolved
conference.chatRoom.setAvModerationEnabled(mediaType, enabled)
if (oldEnabledValue != enabled && enabled) {
logger.info("Moderation had been enabled for conferenceJid=$conferenceJid, by=${
incomingJson["actor"] as String}, for mediaType=${mediaType}")
// let's mute everyone
conference.muteAllNonModeratorParticipants(mediaType)
}
Expand Down