mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-30 08:31:16 +00:00
[core] Fix: EventSub messages had misformatted channel
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
084c849fbb
commit
a4b6036da0
1 changed files with 5 additions and 5 deletions
|
@ -101,7 +101,7 @@ func (t *twitchWatcher) handleEventSubChannelFollow(m json.RawMessage) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
fields := plugins.FieldCollectionFromData(map[string]interface{}{
|
fields := plugins.FieldCollectionFromData(map[string]interface{}{
|
||||||
"channel": payload.BroadcasterUserLogin,
|
"channel": "#" + payload.BroadcasterUserLogin,
|
||||||
"followed_at": payload.FollowedAt,
|
"followed_at": payload.FollowedAt,
|
||||||
"user_id": payload.UserID,
|
"user_id": payload.UserID,
|
||||||
"user": payload.UserLogin,
|
"user": payload.UserLogin,
|
||||||
|
@ -120,7 +120,7 @@ func (t *twitchWatcher) handleEventSubChannelPointCustomRewardRedemptionAdd(m js
|
||||||
}
|
}
|
||||||
|
|
||||||
fields := plugins.FieldCollectionFromData(map[string]interface{}{
|
fields := plugins.FieldCollectionFromData(map[string]interface{}{
|
||||||
"channel": payload.BroadcasterUserLogin,
|
"channel": "#" + payload.BroadcasterUserLogin,
|
||||||
"reward_cost": payload.Reward.Cost,
|
"reward_cost": payload.Reward.Cost,
|
||||||
"reward_id": payload.Reward.ID,
|
"reward_id": payload.Reward.ID,
|
||||||
"reward_title": payload.Reward.Title,
|
"reward_title": payload.Reward.Title,
|
||||||
|
@ -335,7 +335,7 @@ func (t *twitchWatcher) triggerUpdate(channel string, title, category *string, o
|
||||||
"category": *category,
|
"category": *category,
|
||||||
}).Debug("Twitch metadata changed")
|
}).Debug("Twitch metadata changed")
|
||||||
go handleMessage(ircHdl.Client(), nil, eventTypeTwitchCategoryUpdate, plugins.FieldCollectionFromData(map[string]interface{}{
|
go handleMessage(ircHdl.Client(), nil, eventTypeTwitchCategoryUpdate, plugins.FieldCollectionFromData(map[string]interface{}{
|
||||||
"channel": channel,
|
"channel": "#" + channel,
|
||||||
"category": *category,
|
"category": *category,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ func (t *twitchWatcher) triggerUpdate(channel string, title, category *string, o
|
||||||
"title": *title,
|
"title": *title,
|
||||||
}).Debug("Twitch metadata changed")
|
}).Debug("Twitch metadata changed")
|
||||||
go handleMessage(ircHdl.Client(), nil, eventTypeTwitchTitleUpdate, plugins.FieldCollectionFromData(map[string]interface{}{
|
go handleMessage(ircHdl.Client(), nil, eventTypeTwitchTitleUpdate, plugins.FieldCollectionFromData(map[string]interface{}{
|
||||||
"channel": channel,
|
"channel": "#" + channel,
|
||||||
"title": *title,
|
"title": *title,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
@ -365,7 +365,7 @@ func (t *twitchWatcher) triggerUpdate(channel string, title, category *string, o
|
||||||
}
|
}
|
||||||
|
|
||||||
go handleMessage(ircHdl.Client(), nil, evt, plugins.FieldCollectionFromData(map[string]interface{}{
|
go handleMessage(ircHdl.Client(), nil, evt, plugins.FieldCollectionFromData(map[string]interface{}{
|
||||||
"channel": channel,
|
"channel": "#" + channel,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue