reactions: support custom emojis

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-06-28 10:41:28 -06:00
parent 33dc5bad03
commit a63f264804
16 changed files with 244 additions and 228 deletions
+2
View File
@@ -193,6 +193,8 @@ func (t *TelegramClient) PreHandleMatrixReaction(ctx context.Context, msg *bridg
if strings.HasPrefix(msg.Content.RelatesTo.Key, "mxc://") {
if file, err := t.main.Store.TelegramFile.GetByMXC(ctx, msg.Content.RelatesTo.Key); err != nil {
return resp, err
} else if file == nil {
return resp, fmt.Errorf("reaction MXC URI %s does not correspond with any known Telegram files", msg.Content.RelatesTo.Key)
} else if documentID, err := strconv.ParseInt(string(file.LocationID), 10, 64); err != nil {
return resp, err
} else {