diff --git a/src/CONST.ts b/src/CONST.ts index a50d79947aa3..dd85fee354d4 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -843,7 +843,7 @@ const CONST = { }, RESERVED_ROOM_NAMES: ['#admins', '#announce'], MAX_PREVIEW_AVATARS: 4, - MAX_ROOM_NAME_LENGTH: 79, + MAX_ROOM_NAME_LENGTH: 99, LAST_MESSAGE_TEXT_MAX_LENGTH: 200, OWNER_EMAIL_FAKE: '__FAKE__', OWNER_ACCOUNT_ID_FAKE: 0, @@ -1856,7 +1856,7 @@ const CONST = { CARD_NUMBER: /^[0-9]{15,16}$/, CARD_SECURITY_CODE: /^[0-9]{3,4}$/, CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/, - ROOM_NAME: /^#[\p{Ll}0-9-]{1,80}$/u, + ROOM_NAME: /^#[\p{Ll}0-9-]{1,100}$/u, // eslint-disable-next-line max-len, no-misleading-character-class EMOJI: /[\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, diff --git a/tests/unit/ValidationUtilsTest.ts b/tests/unit/ValidationUtilsTest.ts index a14d71136b22..fc5dacee2cf2 100644 --- a/tests/unit/ValidationUtilsTest.ts +++ b/tests/unit/ValidationUtilsTest.ts @@ -241,8 +241,8 @@ describe('ValidationUtils', () => { expect(ValidationUtils.isValidRoomName('#')).toBe(false); }); - test('room name with 81 characters', () => { - expect(ValidationUtils.isValidRoomName('#123456789012345678901234567890123456789012345678901234567890123456789012345678901')).toBe(false); + test('room name with 101 characters', () => { + expect(ValidationUtils.isValidRoomName('#12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901')).toBe(false); }); test('room name with lowercase letters, numbers, and dashes', () => {