From 303274acb644971b65a23b4cf3f8b33f36c7ffc9 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Wed, 6 Nov 2024 03:07:36 -0700 Subject: [PATCH] connector/matrix: send UNSUPPORTED MSS for invalid reactions Signed-off-by: Sumner Evans --- pkg/connector/matrix.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/connector/matrix.go b/pkg/connector/matrix.go index 75ee4a63..3916ed30 100644 --- a/pkg/connector/matrix.go +++ b/pkg/connector/matrix.go @@ -428,6 +428,12 @@ func (t *TelegramClient) HandleMatrixReaction(ctx context.Context, msg *bridgev2 MsgID: targetMessageID, Reaction: newReactions, }) + if tg.IsReactionInvalid(err) { + return nil, bridgev2.WrapErrorInStatus(err). + WithErrorReason(event.MessageStatusUnsupported). + WithIsCertain(true). + WithMessage("Unsupported reaction") + } return &database.Reaction{}, err }