From f674735689d708fd33838b83e732a42e83125c16 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 15 Apr 2022 20:20:09 +0200 Subject: [PATCH] [core] Provide message in `announcement`, `bits` and `resub` events for overlays to react on them Signed-off-by: Knut Ahlers --- irc.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irc.go b/irc.go index c7514c5..266a097 100644 --- a/irc.go +++ b/irc.go @@ -376,7 +376,8 @@ func (i ircHandler) handleTwitchPrivmsg(m *irc.Message) { fields := plugins.FieldCollectionFromData(map[string]interface{}{ "bits": bits, "channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel - "user": m.User, // Compatibility to plugins.DeriveUser + "message": m.Trailing(), + "user": m.User, // Compatibility to plugins.DeriveUser }) log.WithFields(log.Fields(fields.Data())).Info("User spent bits in chat message") @@ -403,6 +404,7 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) { evtData := plugins.FieldCollectionFromData(map[string]any{ "channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel "color": m.Tags["msg-param-color"], + "message": m.Trailing(), "user": m.Tags["login"], // Compatibility to plugins.DeriveUser }) log.WithFields(log.Fields(evtData.Data())).Info("Announcement was made") @@ -435,6 +437,7 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) { evtData := plugins.FieldCollectionFromData(map[string]interface{}{ "channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel "from": m.Tags["login"], + "message": m.Trailing(), "subscribed_months": m.Tags["msg-param-cumulative-months"], "plan": m.Tags["msg-param-sub-plan"], "user": m.Tags["login"], // Compatibility to plugins.DeriveUser