X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/ea2027a385e006ac5186e38f7f391dc20df338e7..e1f6476cdee99a9ec2f7e2cc3c4ad1bba5247e4d:/hotline/client.go?ds=sidebyside diff --git a/hotline/client.go b/hotline/client.go index e812d1d..35a7086 100644 --- a/hotline/client.go +++ b/hotline/client.go @@ -580,8 +580,8 @@ func (c *Client) LogIn(login string, password string) error { TranLogin, nil, NewField(FieldUserName, []byte(c.Pref.Username)), NewField(FieldUserIconID, c.Pref.IconBytes()), - NewField(FieldUserLogin, negateString([]byte(login))), - NewField(FieldUserPassword, negateString([]byte(password))), + NewField(FieldUserLogin, encodeString([]byte(login))), + NewField(FieldUserPassword, encodeString([]byte(password))), ), ) } @@ -625,7 +625,10 @@ func (c *Client) HandleTransaction(ctx context.Context, t *Transaction) error { "IsReply", t.IsReply, "type", binary.BigEndian.Uint16(t.Type), ) - outT, _ := handler(ctx, c, t) + outT, err := handler(ctx, c, t) + if err != nil { + c.Logger.Error("error handling transaction", "err", err) + } for _, t := range outT { if err := c.Send(t); err != nil { return err