[core] Add origin_id to subgift / submysterygift events

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-02-26 14:48:00 +01:00
parent c950b2c38b
commit ee92cbbb03
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
2 changed files with 9 additions and 5 deletions

2
irc.go
View file

@ -449,6 +449,7 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) {
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
"from": m.Tags["login"],
"gifted_months": m.Tags["msg-param-gift-months"],
"origin_id": m.Tags["msg-param-origin-id"],
"plan": m.Tags["msg-param-sub-plan"],
"to": m.Tags["msg-param-recipient-user-name"],
"user": m.Tags["login"], // Compatibility to plugins.DeriveUser
@ -462,6 +463,7 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) {
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
"from": m.Tags["login"],
"number": m.Tags["msg-param-mass-gift-count"],
"origin_id": m.Tags["msg-param-origin-id"],
"plan": m.Tags["msg-param-sub-plan"],
"user": m.Tags["login"], // Compatibility to plugins.DeriveUser
})

View file

@ -172,6 +172,7 @@ Fields:
- `channel` - The channel the event occurred in
- `gifted_months` - Number of months the user gifted
- `origin_id` - ID unique to the gift-event (can be used to match `subgift` events to corresponding `submysterygift` event)
- `plan` - The sub-plan they are using (`1000` = T1, `2000` = T2, `3000` = T3, `Prime`)
- `to` - The user who received the sub
- `username` - The login-name of the user who gifted the subscription
@ -184,6 +185,7 @@ Fields:
- `channel` - The channel the event occurred in
- `number` - The amount of gifted subs
- `origin_id` - ID unique to the gift-event (can be used to match `subgift` events to corresponding `submysterygift` event)
- `plan` - The sub-plan they are using (`1000` = T1, `2000` = T2, `3000` = T3, `Prime`)
- `username` - The login-name of the user who gifted the subscription