fix: allow reacting with existing emojis when at limit

This commit is contained in:
TheBobBobs
2023-12-02 11:45:23 +00:00
committed by Paul Makles
parent 219c16a69c
commit 1f593a1708
@@ -192,7 +192,7 @@ impl Message {
/// Add a reaction to a message
pub async fn add_reaction(&self, db: &Database, user: &User, emoji: &str) -> Result<()> {
// Check how many reactions are already on the message
if self.reactions.len() >= 20 {
if self.reactions.len() >= 20 && !self.reactions.contains_key(emoji) {
return Err(Error::InvalidOperation);
}