fix: emoji shortcodes

This commit is contained in:
trisua 2025-05-05 23:44:10 -04:00
parent 570a290954
commit 24cf61c783
7 changed files with 39 additions and 17 deletions

View file

@ -105,6 +105,11 @@ impl DataManager {
pub async fn create_emoji(&self, data: CustomEmoji) -> Result<()> {
let user = self.get_user_by_id(data.owner).await?;
// check if we can create animated emojis
if !user.permissions.check(FinePermission::SUPPORTER) && data.is_animated {
return Err(Error::RequiresSupporter);
}
// check user permission in community
if data.community != 0 {
let membership = self