fix: allow posts to be made with empty content if an image is uploaded

fix: chats websocket message delete
This commit is contained in:
trisua 2025-05-12 18:46:24 -04:00
parent d3c696026a
commit f3b605e30e
2 changed files with 3 additions and 2 deletions

View file

@ -836,7 +836,7 @@ impl DataManager {
};
if !is_reposting {
if data.content.len() < 2 {
if data.content.len() < 2 && data.uploads.len() == 0 {
return Err(Error::DataTooShort("content".to_string()));
} else if data.content.len() > 4096 {
return Err(Error::DataTooLong("content".to_string()));