mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 05:15:54 +00:00
Don't re-marshal if we already have the JSON
This commit is contained in:
parent
7816a33e5d
commit
a4f0f4867a
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue