mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 22:29:45 +00:00
Isolate conversations server settings
This commit is contained in:
@@ -164,37 +164,40 @@ pub const CLEAN_UP_INTERVAL: Duration = Duration::from_secs(60 * 60);
|
||||
/// Minimal mobile version supported
|
||||
pub const MIN_SUPPORTED_MOBILE_VERSION: &str = "1.1.2";
|
||||
|
||||
/// Minimum message length
|
||||
pub const MIN_CONVERSATION_MESSAGE_LENGTH: usize = 1;
|
||||
pub const MAX_CONVERSATION_MESSAGE_LENGTH: usize = 16000;
|
||||
/// Conversations constants
|
||||
pub mod conversations {
|
||||
/// Minimum message length
|
||||
pub const MIN_CONVERSATION_MESSAGE_LENGTH: usize = 1;
|
||||
pub const MAX_CONVERSATION_MESSAGE_LENGTH: usize = 16000;
|
||||
|
||||
/// Allowed files type in conversations
|
||||
pub const ALLOWED_CONVERSATION_FILES_TYPES: [&str; 17] = [
|
||||
"image/png", "image/jpeg", "image/gif", "image/bmp",
|
||||
"application/pdf",
|
||||
"audio/mpeg",
|
||||
"video/mp4",
|
||||
"application/zip",
|
||||
/// Allowed files type in conversations
|
||||
pub const ALLOWED_CONVERSATION_FILES_TYPES: [&str; 17] = [
|
||||
"image/png", "image/jpeg", "image/gif", "image/bmp",
|
||||
"application/pdf",
|
||||
"audio/mpeg",
|
||||
"video/mp4",
|
||||
"application/zip",
|
||||
|
||||
// MS Office docs
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
// MS Office docs
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
|
||||
// Open Office docs
|
||||
"application/vnd.oasis.opendocument.text",
|
||||
"application/vnd.oasis.opendocument.presentation",
|
||||
"application/vnd.oasis.opendocument.spreadsheet",
|
||||
// Open Office docs
|
||||
"application/vnd.oasis.opendocument.text",
|
||||
"application/vnd.oasis.opendocument.presentation",
|
||||
"application/vnd.oasis.opendocument.spreadsheet",
|
||||
|
||||
// Source code docs (UTF-8 encoded)
|
||||
"text/x-csrc", "text/plain", "text/x-c++src"
|
||||
];
|
||||
// Source code docs (UTF-8 encoded)
|
||||
"text/x-csrc", "text/plain", "text/x-c++src"
|
||||
];
|
||||
|
||||
/// File maximum size in conversations (10 Mb)
|
||||
pub const CONVERSATION_FILES_MAX_SIZE: usize = 10 * 1024 * 1024;
|
||||
/// File maximum size in conversations (10 Mb)
|
||||
pub const CONVERSATION_FILES_MAX_SIZE: usize = 10 * 1024 * 1024;
|
||||
|
||||
/// Minimum interval before notifying again that someone is writing
|
||||
pub const CONVERSATION_WRITING_EVENT_INTERVAL: u64 = 1;
|
||||
/// Minimum interval before notifying again that someone is writing
|
||||
pub const CONVERSATION_WRITING_EVENT_INTERVAL: u64 = 1;
|
||||
|
||||
/// Lifetime of conversation writing event
|
||||
pub const CONVERSATION_WRITING_EVENT_LIFETIME: u64 = 3;
|
||||
/// Lifetime of conversation writing event
|
||||
pub const CONVERSATION_WRITING_EVENT_LIFETIME: u64 = 3;
|
||||
}
|
Reference in New Issue
Block a user