diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -397,7 +397,7 @@ ): string { let pendingThreadKey; if (sourceMessageID && threadTypeIsThick(threadType)) { - pendingThreadKey = `thick_sidebar/${sourceMessageID}`; + pendingThreadKey = `dm_sidebar/${sourceMessageID}`; } else if (sourceMessageID) { pendingThreadKey = `sidebar/${sourceMessageID}`; } else { @@ -425,7 +425,7 @@ const [threadTypeString, threadKey] = pendingThreadIDMatches[1].split('/'); let threadType; - if (threadTypeString === 'thick_sidebar') { + if (threadTypeString === 'dm_sidebar') { threadType = threadTypes.THICK_SIDEBAR; } else if (threadTypeString === 'sidebar') { threadType = threadTypes.SIDEBAR; @@ -434,7 +434,7 @@ } const threadTypeStringIsSidebar = - threadTypeString === 'sidebar' || threadTypeString === 'thick_sidebar'; + threadTypeString === 'sidebar' || threadTypeString === 'dm_sidebar'; const memberIDs = threadTypeStringIsSidebar ? [] : threadKey.split('+'); const sourceMessageID = threadTypeStringIsSidebar ? threadKey : null; return { diff --git a/lib/shared/thread-utils.test.js b/lib/shared/thread-utils.test.js --- a/lib/shared/thread-utils.test.js +++ b/lib/shared/thread-utils.test.js @@ -36,7 +36,7 @@ memberIDs: [], sourceMessageID: '12345', }; - expect(parsePendingThreadID('pending/thick_sidebar/12345')).toStrictEqual( + expect(parsePendingThreadID('pending/dm_sidebar/12345')).toStrictEqual( thickSidebarResult, ); @@ -210,6 +210,6 @@ it('should return correct ID from thick sidebar input', () => { expect( getPendingThreadID(threadTypes.THICK_SIDEBAR, [], '12345'), - ).toStrictEqual('pending/thick_sidebar/12345'); + ).toStrictEqual('pending/dm_sidebar/12345'); }); }); diff --git a/lib/utils/validation-utils.js b/lib/utils/validation-utils.js --- a/lib/utils/validation-utils.js +++ b/lib/utils/validation-utils.js @@ -112,7 +112,7 @@ '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; const idSchemaRegex = `(?:(?:[0-9]+|${uuidRegex})\\|)?(?:[0-9]+|${uuidRegex})`; -const pendingThreadIDRegex = `pending/(type[0-9]+/[0-9]+(\\+[0-9]+)*|(sidebar|thick_sidebar)/${idSchemaRegex})`; +const pendingThreadIDRegex = `pending/(type[0-9]+/[0-9]+(\\+[0-9]+)*|(sidebar|dm_sidebar)/${idSchemaRegex})`; const thickThreadIDRegex: RegExp = new RegExp(`^${uuidRegex}$`); const chatNameMaxLength = 191;