Allow custom emojis with image/webp media type
This commit is contained in:
parent
9768fc6228
commit
b9fdb1ccf4
2 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Increase maximum number of custom emojis per post to 50.
|
||||
- Validate actor aliases before saving into database.
|
||||
- Process incoming `Move()` activities in background.
|
||||
- Allow custom emojis with `image/webp` media type.
|
||||
|
||||
## [1.19.1] - 2023-03-31
|
||||
|
||||
|
|
|
@ -5,10 +5,11 @@ use crate::errors::ValidationError;
|
|||
const EMOJI_NAME_RE: &str = r"^[a-zA-Z0-9._-]+$";
|
||||
pub const EMOJI_MAX_SIZE: usize = 500 * 1000; // 500 kB
|
||||
pub const EMOJI_LOCAL_MAX_SIZE: usize = 50 * 1000; // 50 kB
|
||||
pub const EMOJI_MEDIA_TYPES: [&str; 3] = [
|
||||
pub const EMOJI_MEDIA_TYPES: [&str; 4] = [
|
||||
"image/apng",
|
||||
"image/gif",
|
||||
"image/png",
|
||||
"image/webp",
|
||||
];
|
||||
|
||||
pub fn validate_emoji_name(emoji_name: &str) -> Result<(), ValidationError> {
|
||||
|
|
Loading…
Reference in a new issue