Increase max emoji size to 250 kB

This commit is contained in:
silverpill 2023-01-17 20:47:34 +00:00
parent fcb6554ebb
commit 0e68ea263c
2 changed files with 3 additions and 3 deletions

View file

@ -371,8 +371,8 @@ pub async fn handle_note(
} else if tag_type == EMOJI {
let tag: EmojiTag = match serde_json::from_value(tag_value) {
Ok(tag) => tag,
Err(_) => {
log::warn!("invalid emoji tag");
Err(error) => {
log::warn!("invalid emoji tag: {}", error);
continue;
},
};

View file

@ -2,7 +2,7 @@ use crate::errors::ValidationError;
use crate::utils::html::clean_html_strict;
pub const ATTACHMENTS_MAX_NUM: usize = 15;
pub const EMOJI_MAX_SIZE: u64 = 100 * 1000; // 100 kB
pub const EMOJI_MAX_SIZE: u64 = 250 * 1000; // 250 kB
pub const EMOJI_MEDIA_TYPE: &str = "image/png";
pub const EMOJIS_MAX_NUM: usize = 20;