fix: emoji shortcodes
This commit is contained in:
parent
570a290954
commit
24cf61c783
7 changed files with 39 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue