diff --git a/pkg/handlers.go b/pkg/handlers.go index 203498d..5de0f3f 100644 --- a/pkg/handlers.go +++ b/pkg/handlers.go @@ -480,6 +480,9 @@ func (s *Server) OnOpen(sub *Subscriber, msg messages.Message) { // Look up the other subscriber. other, err := s.GetSubscriber(msg.Username) if err != nil { + sub.ChatServer( + "Could not open that video: %s appears to be offline.", msg.Username, + ) return } diff --git a/src/App.vue b/src/App.vue index 58aecbe..57abfbd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -503,6 +503,14 @@ export default { LocalStorage.set('scrollback', this.scrollback); }, status() { + // Notify if going hidden. + if (this.status === 'hidden' && this.isOp) { + this.ChatClient( + "Your status is now set to 'hidden' which makes it appear as though you have logged out of chat.\n\n" + + "Try not to break the illusion by interacting with chat in this state. For safety, your message " + + "entry box will be disabled in public channels.", + ); + } // Send presence updates to the server. this.sendMe(); }, @@ -1070,6 +1078,12 @@ export default { return; } + // Safety for hidden status. + if (this.status === 'hidden' && !this.isDM) { + this.ChatClient("Your status is currently set to 'hidden' and it would break the illusion to talk in public channels."); + return; + } + // Spammy links. if (this.message.toLowerCase().indexOf("onlyfans.com") > -1 || this.message.toLowerCase().indexOf("justfor.fans") > -1 || @@ -2049,7 +2063,9 @@ export default { this.makeLinksExternal(); // Focus the message entry box. - this.messageBox.focus(); + window.requestAnimationFrame(() => { + this.messageBox.focus(); + }); }, hasAnyUnread() { // Returns total unread count (for mobile responsive view to show in the left drawer button) @@ -2478,6 +2494,12 @@ export default { return; } + // Operator safety when hidden. + if (this.status === 'hidden') { + this.ChatClient("Your chat status is currently set to 'hidden' and you would break the illusion by opening this camera."); + return; + } + // A chat moderation rule? if (this.jwt.rules.IsNoVideoRule) { return this.modalAlert({ @@ -5055,8 +5077,8 @@ export default { + :placeholder="status === 'hidden' ? 'Your status is hidden, be careful not to break the illusion' : 'Write a message'" @keydown="sendTypingNotification()" autocomplete="off" + :disabled="!client.connected || (status === 'hidden' && !isDM)">