diff --git a/go.mod b/go.mod index a0700cb..0cf60cb 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/sahilm/fuzzy v0.1.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.9.1 - github.com/yuin/goldmark v1.7.12 + github.com/yuin/goldmark v1.7.13 github.com/zalando/go-keyring v0.2.6 ) diff --git a/go.sum b/go.sum index bef8a70..69f2c8f 100644 --- a/go.sum +++ b/go.sum @@ -168,6 +168,8 @@ github.com/twmb/murmur3 v1.1.8/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.12 h1:YwGP/rrea2/CnCtUHgjuolG/PnMxdQtPMO5PvaE2/nY= github.com/yuin/goldmark v1.7.12/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +github.com/yuin/goldmark v1.7.13 h1:GPddIs617DnBLFFVJFgpo1aBfe/4xcvMc3SB5t/D0pA= +github.com/yuin/goldmark v1.7.13/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= github.com/zalando/go-keyring v0.2.6 h1:r7Yc3+H+Ux0+M72zacZoItR3UDxeWfKTcabvkI8ua9s= github.com/zalando/go-keyring v0.2.6/go.mod h1:2TCrxYrbUNYfNS/Kgy/LSrkSQzZ5UPVH85RwfczwvcI= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= diff --git a/internal/notifications/notifications.go b/internal/notifications/notifications.go index 3157b4d..33f10e9 100644 --- a/internal/notifications/notifications.go +++ b/internal/notifications/notifications.go @@ -44,13 +44,8 @@ func HandleIncomingMessage(state *ningen.State, msg *gateway.MessageCreateEvent, return fmt.Errorf("failed to get guild from state: %w", err) } - member, err := state.Cabinet.Member(guild.ID, msg.Author.ID) - if err != nil { - slog.Info("failed to get member from state", "err", err, "guild_id", channel.GuildID, "user_id", msg.Author.ID) - } else { - if member.Nick != "" { - title = member.Nick - } + if member := msg.Member; member != nil && member.Nick != "" { + title = member.Nick } title += " (#" + channel.Name + ", " + guild.Name + ")"