diff --git a/pkg/handlers.go b/pkg/handlers.go index 7133045..71cf95f 100644 --- a/pkg/handlers.go +++ b/pkg/handlers.go @@ -104,7 +104,10 @@ func (s *Server) OnLogin(sub *Subscriber, msg Message) { // OnMessage handles a chat message posted by the user. func (s *Server) OnMessage(sub *Subscriber, msg Message) { - log.Info("[%s] %s", sub.Username, msg.Message) + if !strings.HasPrefix(msg.Channel, "@") { + log.Info("[%s to #%s] %s", sub.Username, msg.Channel, msg.Message) + } + if sub.Username == "" { sub.ChatServer("You must log in first.") return diff --git a/web/static/js/BareRTC.js b/web/static/js/BareRTC.js index 21b7440..9259533 100644 --- a/web/static/js/BareRTC.js +++ b/web/static/js/BareRTC.js @@ -1760,6 +1760,10 @@ const app = Vue.createApp({ // The image upload button handler. uploadFile() { + if (this.isDM) { + return; + } + let input = document.createElement('input'); input.type = 'file'; input.accept = 'image/*'; diff --git a/web/templates/chat.html b/web/templates/chat.html index aa61891..fface72 100644 --- a/web/templates/chat.html +++ b/web/templates/chat.html @@ -923,7 +923,8 @@
-
+
-
+