From 4cbc9197930e72c5bb1f5b75eef5c85dfffeb892 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 29 Aug 2023 07:56:43 +0700 Subject: [PATCH] Small tweaks --- web/static/js/BareRTC.js | 4 +++- web/static/js/sounds.js | 2 +- web/templates/chat.html | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web/static/js/BareRTC.js b/web/static/js/BareRTC.js index 73a4fca..28a356a 100644 --- a/web/static/js/BareRTC.js +++ b/web/static/js/BareRTC.js @@ -2114,7 +2114,9 @@ const app = Vue.createApp({ // Are we ignoring DMs? if (this.prefs.closeDMs && channel.indexOf('@') === 0) { // Don't allow an (incoming) DM to initialize a new chat room for us. - if (username !== this.username && this.channels[channel] == undefined) return; + // Unless the user is an operator. + let isSenderOp = this.whoMap[username] != undefined && this.whoMap[username].op; + if (username !== this.username && this.channels[channel] == undefined && !isSenderOp) return; } // Initialize this channel's history? diff --git a/web/static/js/sounds.js b/web/static/js/sounds.js index 1fa2c42..f237ecc 100644 --- a/web/static/js/sounds.js +++ b/web/static/js/sounds.js @@ -40,6 +40,6 @@ var DefaultSounds = { DM: "Trill", Enter: "Quiet", Leave: "Quiet", - Watch: "Up Chime", + Watch: "Quiet", Unwatch: "Quiet", }; diff --git a/web/templates/chat.html b/web/templates/chat.html index 3ab836f..7dbed71 100644 --- a/web/templates/chat.html +++ b/web/templates/chat.html @@ -1123,7 +1123,7 @@ @click="openDMs({username: msg.username})" :title="isUsernameDND(msg.username) ? 'This person is not accepting new DMs' : 'Open a Direct Message (DM) thread'" :disabled="isUsernameDND(msg.username)"> - + @@ -1433,9 +1433,10 @@