From b158ba6b8b0b6eb57836e1257870c4c9f99fe6d5 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 14 Jan 2025 14:57:56 +0200 Subject: [PATCH] capabilities: add default emoji list hash to ID The list can change, so it should change the ID too --- pkg/connector/capabilities.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index 0c70750c..eb40caef 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -173,6 +173,9 @@ func (t *TelegramClient) GetCapabilities(ctx context.Context, portal *bridgev2.P if reactions == nil { baseID += "+reactions_any" feat.AllowedReactions, feat.CustomEmojiReactions = t.getAvailableReactionsForCapability(ctx) + if len(feat.AllowedReactions) > 0 { + baseID += "+any_list_" + hashEmojiList(feat.AllowedReactions) + } } else if len(reactions) == 0 { baseID += "+reactions_none" feat.Reaction = event.CapLevelRejected