From 24d0d4687a4800bb98e8a7044649b6625ebb027a Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Wed, 21 Aug 2024 22:43:55 -0600 Subject: [PATCH] connector/tomatrix: fix NPE with unsupported media Signed-off-by: Sumner Evans --- pkg/connector/tomatrix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/connector/tomatrix.go b/pkg/connector/tomatrix.go index 845cf831..eb3ee528 100644 --- a/pkg/connector/tomatrix.go +++ b/pkg/connector/tomatrix.go @@ -139,7 +139,7 @@ func (c *TelegramClient) convertToMatrix(ctx context.Context, portal *bridgev2.P cm.MergeCaption() contentURI = mediaPart.Content.URL - if contentURI == "" { + if contentURI == "" && mediaPart.Content.File != nil { contentURI = mediaPart.Content.File.URL }