diff --git a/main.go b/main.go index 791e79b..d69e4d8 100644 --- a/main.go +++ b/main.go @@ -233,7 +233,9 @@ func main() { for k := range v.Subs { subs += k.String() + " " } - client.SendText(room, fmt.Sprintf("Pinging %v", subs)) + if len(v.Subs) > 0 { + client.SendText(room, fmt.Sprintf("Pinging %v", subs)) + } resp, err := client.SendStateEvent(room, event.NewEventType("im.vector.modular.widgets"), "dimension-m.video-simp-"+v.Name, NewYT(v.Name+"'s stream", v.CurrentStream, string(room))) if err != nil { log.Println("error embeding video")