msg := t.GetField(fieldData)
ID := t.GetField(fieldUserID)
- reply := *NewTransaction(
+ reply := NewTransaction(
tranServerMsg,
&ID.Data,
NewField(fieldData, msg.Data),
reply.Fields = append(reply.Fields, NewField(fieldQuotingMsg, t.GetField(fieldQuotingMsg).Data))
}
- res = append(res, reply)
+ res = append(res, *reply)
id, _ := byteToInt(ID.Data)
- otherClient := cc.Server.Clients[uint16(id)]
- if otherClient == nil {
- return res, errors.New("ohno")
+ otherClient, ok := cc.Server.Clients[uint16(id)]
+ if !ok {
+ return res, errors.New("invalid client ID")
}
// Respond with auto reply if other client has it enabled