Add sounds.

This commit is contained in:
Half-Shot
2024-11-01 14:49:00 +00:00
parent edc4142fb1
commit fd46f8ad46
9 changed files with 42 additions and 25 deletions

View File

@@ -214,10 +214,13 @@ export const ReactionsProvider = ({
}
// One of our custom reactions
const reaction = ReactionSet.find((r) => r.name === content.name) ?? {
const reaction = {
...GenericReaction,
emoji: content.emoji,
// If we don't find a reaction, we can fallback to the generic sound.
...ReactionSet.find((r) => r.name === content.name),
};
setReactions((reactions) => {
if (reactions[sender]) {
// We've still got a reaction from this user, ignore it to prevent spamming