From ebf06e71a3e28a800bf0a4cd5f2a30c203ae45a2 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Fri, 24 May 2024 18:56:56 -0700 Subject: [PATCH] beemo: fix silly nil embed panic --- cmd/beemo/notify_mentions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/beemo/notify_mentions.go b/cmd/beemo/notify_mentions.go index b0b0fde8..a4f09c33 100644 --- a/cmd/beemo/notify_mentions.go +++ b/cmd/beemo/notify_mentions.go @@ -42,7 +42,7 @@ func (mc *MentionChecker) ProcessPost(ctx context.Context, did syntax.DID, rkey return err } msg := fmt.Sprintf("Mention of `@%s` by `@%s` ():\n```%s```", targetIdent.Handle, authorIdent.Handle, did, rkey, post.Text) - if post.Embed.EmbedImages != nil || post.Embed.EmbedRecordWithMedia != nil || post.Embed.EmbedRecord != nil || post.Embed.EmbedExternal != nil { + if post.Embed != nil && (post.Embed.EmbedImages != nil || post.Embed.EmbedRecordWithMedia != nil || post.Embed.EmbedRecord != nil || post.Embed.EmbedExternal != nil) { msg += "\n(post also contains an embed/quote/media)" } return sendSlackMsg(ctx, msg, mc.slackWebhookURL) -- 2.51.2