NonExplicit Cams can not watch Explicit cams

This commit is contained in:
Noah 2025-03-12 21:20:49 -07:00
parent 8a1b609d13
commit 066993a68e

View File

@ -2579,6 +2579,14 @@ export default {
return;
}
// Conversely: if we are NonExplicit we should not open NSFW videos.
if (this.webcam.active && this.webcam.nonExplicit && (theirVideo & VideoFlag.Active) && (theirVideo & VideoFlag.NSFW)) {
this.ChatClient(
`You have said you do not want to see Explicit videos and <strong>${user.username}</strong> has an Explicit camera.`
);
return;
}
// If this user requests mutual viewership...
if (this.isVideoNotAllowed(user) && !this.isOp) {
this.ChatClient(
@ -2769,11 +2777,24 @@ export default {
if (this.webcam.nsfw) {
for (let username of Object.keys(this.WebRTC.streams)) {
let user = this.whoMap[username];
// Our video is Explicit and theirs is NonExplicit.
if ((user.video & VideoFlag.Active) && (user.video & VideoFlag.NonExplicit)) {
this.closeVideo(username);
}
}
}
// Conversely: if we are NonExplicit we do not watch Explicit videos.
if (this.webcam.nonExplicit) {
for (let username of Object.keys(this.WebRTC.streams)) {
let user = this.whoMap[username];
if ((user.video & VideoFlag.Active) && (user.video & VideoFlag.NSFW)) {
this.closeVideo(username);
}
}
}
},
webcamIconClass(user) {
// Return the icon to show on a video button.
@ -2850,6 +2871,11 @@ export default {
return true;
}
// Conversely: if we are NonExplicit we should not be able to watch Explicit videos.
if (this.webcam.active && this.webcam.nonExplicit && (user.video & VideoFlag.Active) && (user.video & VideoFlag.NSFW)) {
return true;
}
return false;
},