mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-02 17:18:31 +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:
commit
8abab6a36e
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