فهرست منبع

Add new field to reactions

Tulir Asokan 2 سال پیش
والد
کامیت
2937c3ea2e
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  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
 		}
 	}