]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers.go
Improve Gtkhx compatability
[rbdr/mobius] / hotline / transaction_handlers.go
index 6816456805f39ac414539226c843a8277e4fd510..7f8cbef4e99a6afc3e269875418432c40b1e1470 100644 (file)
@@ -248,8 +248,9 @@ func HandleChatSend(cc *ClientConn, t *Transaction) (res []Transaction, err erro
 
        // By holding the option key, Hotline chat allows users to send /me formatted messages like:
        // *** Halcyon does stuff
-       // This is indicated by the presence of the optional field fieldChatOptions in the transaction payload
-       if t.GetField(fieldChatOptions).Data != nil {
+       // This is indicated by the presence of the optional field fieldChatOptions set to a value of 1.
+       // Most clients do not send this option for normal chat messages.
+       if t.GetField(fieldChatOptions).Data != nil && bytes.Equal(t.GetField(fieldChatOptions).Data, []byte{0, 1}) {
                formattedMsg = fmt.Sprintf("\r*** %s %s", cc.UserName, t.GetField(fieldData).Data)
        }