]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers.go
Fix string negation bug
[rbdr/mobius] / hotline / transaction_handlers.go
index b06297dc6926169d2dceebcb69e96ad699b1e746..0ae6071e35963b3616dd3b4868c917fb9f18cd70 100644 (file)
@@ -625,7 +625,6 @@ func HandleSetUser(cc *ClientConn, t *Transaction) (res []Transaction, err error
 
 func HandleGetUser(cc *ClientConn, t *Transaction) (res []Transaction, err error) {
        userLogin := string(t.GetField(fieldUserLogin).Data)
 
 func HandleGetUser(cc *ClientConn, t *Transaction) (res []Transaction, err error) {
        userLogin := string(t.GetField(fieldUserLogin).Data)
-       decodedUserLogin := NegatedUserString(t.GetField(fieldUserLogin).Data)
        account := cc.Server.Accounts[userLogin]
        if account == nil {
                errorT := cc.NewErrReply(t, "Account does not exist.")
        account := cc.Server.Accounts[userLogin]
        if account == nil {
                errorT := cc.NewErrReply(t, "Account does not exist.")
@@ -635,7 +634,7 @@ func HandleGetUser(cc *ClientConn, t *Transaction) (res []Transaction, err error
 
        res = append(res, cc.NewReply(t,
                NewField(fieldUserName, []byte(account.Name)),
 
        res = append(res, cc.NewReply(t,
                NewField(fieldUserName, []byte(account.Name)),
-               NewField(fieldUserLogin, []byte(decodedUserLogin)),
+               NewField(fieldUserLogin, negateString(t.GetField(fieldUserLogin).Data)),
                NewField(fieldUserPassword, []byte(account.Password)),
                NewField(fieldUserAccess, *account.Access),
        ))
                NewField(fieldUserPassword, []byte(account.Password)),
                NewField(fieldUserAccess, *account.Access),
        ))