1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-03 01:28:30 +00:00

Merge pull request #251 from riking/opt-send

Don't re-marshal if we already have the JSON
This commit is contained in:
Mike 2017-09-26 18:12:12 -04:00 committed by GitHub
commit 8abab6a36e

View file

@ -586,7 +586,9 @@ func MarshalClientMessage(clientMessage interface{}) (int, []byte, error) {
msg.MessageID = -1
}
if msg.Arguments != nil {
if msg.origArguments != "" {
dataStr = fmt.Sprintf("%d %s %s", msg.MessageID, msg.Command, msg.origArguments)
} else if msg.Arguments != nil {
argBytes, err := json.Marshal(msg.Arguments)
if err != nil {
return 0, nil, err