only add shortcode for custom image reactions
This commit is contained in:
parent
6dcf3a383a
commit
c3040f19c2
1 changed files with 2 additions and 1 deletions
|
@ -26,6 +26,7 @@ async function addReaction(data) {
|
|||
assert.equal(typeof parentID, "string")
|
||||
|
||||
const key = await emojiToKey.emojiToKey(data.emoji)
|
||||
const shortcode = key.startsWith("mxc://") ? `:${data.emoji.name}:` : undefined
|
||||
|
||||
const roomID = await createRoom.ensureRoom(data.channel_id)
|
||||
const senderMxid = await registerUser.ensureSimJoined(user, roomID)
|
||||
|
@ -35,7 +36,7 @@ async function addReaction(data) {
|
|||
event_id: parentID,
|
||||
key
|
||||
},
|
||||
shortcode: `:${data.emoji.name}:`
|
||||
shortcode
|
||||
}, senderMxid)
|
||||
return eventID
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue