Raise MAX_CONTENT_TYPE_BYTES to 80, lower MAX_PRIVATE_MESSAGE_TEXT_LENGTH.

In case we ever want to send "application/vnd.openxmlformats-officedocument.wordprocessingml.document" attachments.
This commit is contained in:
akwizgran
2021-03-11 17:22:03 +00:00
parent 74447b8ec3
commit 43740777d4
4 changed files with 19 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ public interface MediaConstants {
/**
* The maximum length of an attachment's content type in UTF-8 bytes.
*/
int MAX_CONTENT_TYPE_BYTES = 50;
int MAX_CONTENT_TYPE_BYTES = 80;
/**
* The maximum allowed size of image attachments.

View File

@@ -7,7 +7,17 @@ public interface MessagingConstants {
/**
* The maximum length of a private message's text in UTF-8 bytes.
*/
int MAX_PRIVATE_MESSAGE_TEXT_LENGTH = MAX_MESSAGE_BODY_LENGTH - 1024;
int MAX_PRIVATE_MESSAGE_TEXT_LENGTH = MAX_MESSAGE_BODY_LENGTH - 2048;
/**
* The maximum length of an incoming private message's text in UTF-8 bytes.
* This is higher than MAX_PRIVATE_MESSAGE_TEXT_LENGTH for compatibility
* with older peers.
* <p>
* TODO: Remove after a reasonable migration period (added 2021-03-12).
*/
int MAX_PRIVATE_MESSAGE_INCOMING_TEXT_LENGTH =
MAX_MESSAGE_BODY_LENGTH - 1024;
/**
* The maximum number of attachments per private message.