From b0ed58805ab2f1ab8f9adc003617d0e5678af6c0 Mon Sep 17 00:00:00 2001 From: poiuty Date: Mon, 22 May 2023 15:39:40 +0300 Subject: [PATCH] update --- app/worker.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/worker.go b/app/worker.go index d826385..1f771b3 100644 --- a/app/worker.go +++ b/app/worker.go @@ -221,9 +221,7 @@ func xWorker(workerData Info, u url.URL) { if input.Channel == "room:enter_leave:"+workerData.Id { type Message struct { - Messages []struct { - Data string `json:"data"` - } `json:"messages,omitempty"` + Data string `json:"data"` } type Data struct { User struct { @@ -233,7 +231,7 @@ func xWorker(workerData Info, u url.URL) { } `json:"user"` Action string `json:"action"` } - topmsg := &Message{} + var topmsg []*Message if err := json.Unmarshal(input.Messages, &topmsg); err != nil { fmt.Println(err.Error(), workerData.room) continue