Use new event API

This commit is contained in:
2021-11-20 20:52:08 +09:00
parent df5f0c0f65
commit 9368689019
8 changed files with 38 additions and 50 deletions

View File

@ -13,6 +13,7 @@ import (
"time"
"github.com/aerogo/aero"
"github.com/aerogo/aero/event"
"github.com/aerogo/mirror"
"github.com/akyoto/color"
"github.com/animenotifier/kitsu"
@ -201,9 +202,9 @@ func DateToSeason(date time.Time) string {
}
// BroadcastEvent sends the given event to the event streams of all users.
func BroadcastEvent(event *aero.Event) {
func BroadcastEvent(evt *event.Event) {
for user := range StreamUsers() {
user.BroadcastEvent(event)
user.BroadcastEvent(evt)
}
}