mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
Fix case where you could send larger strings as emoji
This commit is contained in:
@@ -213,10 +213,17 @@ export const ReactionsProvider = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const emoji = content.emoji?.split(/(?:)/u)?.[0];
|
||||||
|
|
||||||
|
if (!emoji) {
|
||||||
|
logger.warn(`Reaction had no emoji from ${reactionEventId}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// One of our custom reactions
|
// One of our custom reactions
|
||||||
const reaction = {
|
const reaction = {
|
||||||
...GenericReaction,
|
...GenericReaction,
|
||||||
emoji: content.emoji,
|
emoji,
|
||||||
// If we don't find a reaction, we can fallback to the generic sound.
|
// If we don't find a reaction, we can fallback to the generic sound.
|
||||||
...ReactionSet.find((r) => r.name === content.name),
|
...ReactionSet.find((r) => r.name === content.name),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user