This commit is contained in:
poiuty 2023-05-22 15:39:40 +03:00
parent 07075823b2
commit b0ed58805a

View file

@ -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"`
}
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