Pārlūkot izejas kodu

Add new field to reactions

Tulir Asokan 2 gadi atpakaļ
vecāks
revīzija
2937c3ea2e
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      portal.go

+ 3 - 1
portal.go

@@ -1854,8 +1854,10 @@ func (portal *Portal) handleDiscordReaction(user *User, reaction *discordgo.Mess
 			"name": reaction.Emoji.Name,
 			"mxc":  matrixReaction,
 		}
+		wrappedShortcode := fmt.Sprintf(":%s:", reaction.Emoji.Name)
+		extraContent["com.beeper.reaction.shortcode"] = wrappedShortcode
 		if !portal.bridge.Config.Bridge.CustomEmojiReactions {
-			content.RelatesTo.Key = fmt.Sprintf(":%s:", reaction.Emoji.Name)
+			content.RelatesTo.Key = wrappedShortcode
 		}
 	}