Skip to content

Commit

Permalink
fix: don't exceed the max emoji limit by one
Browse files Browse the repository at this point in the history
closes #295
  • Loading branch information
amycatgirl committed Dec 7, 2023
1 parent 25016ef commit 6639f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/delta/src/routes/customisation/emoji_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub async fn create_emoji(

// Check that we haven't hit the emoji limit
let emojis = db.fetch_emoji_by_parent_id(&server.id).await?;
if emojis.len() > config.features.limits.default.server_emoji {
if emojis.len() >= config.features.limits.default.server_emoji {
return Err(create_error!(TooManyEmoji {
max: config.features.limits.default.server_emoji,
}));
Expand Down

0 comments on commit 6639f08

Please sign in to comment.