diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-07-03 20:40:45 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-07-03 20:40:45 -0700 |
| commit | d29edb0a25c577f6490f21844fa13e13ba3e731e (patch) | |
| tree | cf39b5767f7bd744ecf180e7e448a4fd1353f496 /hotline | |
| parent | edcafb1c0673218fb7c17d96c81bb9db4f806e58 (diff) | |
Fix refuse private chat error messaging
Diffstat (limited to 'hotline')
| -rw-r--r-- | hotline/transaction_handlers.go | 4 | ||||
| -rw-r--r-- | hotline/transaction_handlers_test.go | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index 2dc5e06..46fe362 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -1704,8 +1704,6 @@ func HandleInviteNewChat(cc *ClientConn, t *Transaction) (res []Transaction, err targetID := t.GetField(fieldUserID).Data newChatID := cc.Server.NewPrivateChat(cc) - // Halcyon does not accept private chats. - // Check if target user has "Refuse private chat" flag binary.BigEndian.Uint16(targetID) targetClient := cc.Server.Clients[binary.BigEndian.Uint16(targetID)] @@ -1716,7 +1714,7 @@ func HandleInviteNewChat(cc *ClientConn, t *Transaction) (res []Transaction, err *NewTransaction( tranServerMsg, cc.ID, - NewField(fieldData, []byte(string(targetClient.UserName)+" does not accept private messages.")), + NewField(fieldData, []byte(string(targetClient.UserName)+" does not accept private chats.")), NewField(fieldUserName, targetClient.UserName), NewField(fieldUserID, *targetClient.ID), NewField(fieldOptions, []byte{0, 2}), diff --git a/hotline/transaction_handlers_test.go b/hotline/transaction_handlers_test.go index cb9e21f..e141c78 100644 --- a/hotline/transaction_handlers_test.go +++ b/hotline/transaction_handlers_test.go @@ -3429,7 +3429,7 @@ func TestHandleInviteNewChat(t *testing.T) { ID: []byte{0, 0, 0, 0}, ErrorCode: []byte{0, 0, 0, 0}, Fields: []Field{ - NewField(fieldData, []byte("UserB does not accept private messages.")), + NewField(fieldData, []byte("UserB does not accept private chats.")), NewField(fieldUserName, []byte("UserB")), NewField(fieldUserID, []byte{0, 2}), NewField(fieldOptions, []byte{0, 2}), |