diff --git a/irc.go b/irc.go index c96d505..b7433bf 100644 --- a/irc.go +++ b/irc.go @@ -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 @@ -459,11 +460,12 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) { case "submysterygift": evtData := plugins.FieldCollectionFromData(map[string]interface{}{ - "channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel - "from": m.Tags["login"], - "number": m.Tags["msg-param-mass-gift-count"], - "plan": m.Tags["msg-param-sub-plan"], - "user": m.Tags["login"], // Compatibility to plugins.DeriveUser + "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 }) log.WithFields(log.Fields(evtData.Data())).Info("User gifted subs to the community") diff --git a/wiki/Events.md b/wiki/Events.md index 2d0f931..a3139f5 100644 --- a/wiki/Events.md +++ b/wiki/Events.md @@ -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