This commit is contained in:
poiuty 2023-05-11 14:40:18 +03:00
parent 8bbd54aa5a
commit 0ca280b452
5 changed files with 31 additions and 104 deletions

View file

@ -81,8 +81,12 @@ func announceCount() {
rooms.Count <- 0
l := <-rooms.Count
msg, err := json.Marshal(struct {
Count int `json:"count"`
}{Count: l})
Chanel string `json:"chanel"`
Count int `json:"count"`
}{
Chanel: "bongacams",
Count: l,
})
if err == nil {
ws.Send <- msg
}