From 55696424ce978acb045f4dbf8ba8b2a493aa8d06 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Tue, 15 Sep 2026 16:51:31 +0100 Subject: [PATCH] handlelinkedin: guard against nil reacted-to message Realtime reaction summaries for a message with no local part crashed the process: GetFirstPartByID returns (nil, nil) on not-found but the handler only checked the error before dereferencing messageData.Room. Return early when the reacted-to message isn't found, matching the seen receipt handler. --- pkg/connector/handlelinkedin.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/connector/handlelinkedin.go b/pkg/connector/handlelinkedin.go index 326d554..dab2217 100644 --- a/pkg/connector/handlelinkedin.go +++ b/pkg/connector/handlelinkedin.go @@ -217,6 +217,9 @@ func (l *LinkedInClient) onRealtimeReactionSummaries(ctx context.Context, summar if err != nil { zerolog.Ctx(ctx).Err(err).Msg("failed to get reacted to message") return + } else if messageData == nil { + zerolog.Ctx(ctx).Warn().Msg("couldn't find reacted to message") + return } meta := simplevent.EventMeta{