mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-10-31 07:34:45 +00:00 
			
		
		
		
	Add support for QuickTime videos
This commit is contained in:
		| @@ -42,7 +42,7 @@ struct ConversationsPolicy { | ||||
|     max_conversation_name_len: usize, | ||||
|     min_message_len: usize, | ||||
|     max_message_len: usize, | ||||
|     allowed_files_type: [&'static str; 17], | ||||
|     allowed_files_type: [&'static str; 18], | ||||
|     files_max_size: usize, | ||||
|     writing_event_interval: u64, | ||||
|     writing_event_lifetime: u64, | ||||
|   | ||||
| @@ -184,11 +184,12 @@ pub mod conversations { | ||||
|     pub const MAX_CONVERSATION_MESSAGE_LENGTH: usize = 16000; | ||||
|  | ||||
|     /// Allowed files type in conversations | ||||
|     pub const ALLOWED_CONVERSATION_FILES_TYPES: [&str; 17] = [ | ||||
|     pub const ALLOWED_CONVERSATION_FILES_TYPES: [&str; 18] = [ | ||||
|         "image/png", "image/jpeg", "image/gif", "image/bmp", | ||||
|         "application/pdf", | ||||
|         "audio/mpeg", | ||||
|         "video/mp4", | ||||
|         "video/quicktime", | ||||
|         "application/zip", | ||||
|  | ||||
|         // MS Office docs | ||||
|   | ||||
| @@ -331,7 +331,7 @@ pub fn send_message(r: &mut HttpRequestHandler) -> RequestResult { | ||||
|             } | ||||
|  | ||||
|             // MP4 | ||||
|             else if mime_type.eq("video/mp4") { | ||||
|             else if mime_type.eq("video/mp4") || mime_type.eq("video/quicktime") { | ||||
|                 path = r.save_post_mp4("file", "conversation")?; | ||||
|             } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user