diff --git a/lib/hooks/input-state-container-hooks.js b/lib/hooks/input-state-container-hooks.js --- a/lib/hooks/input-state-container-hooks.js +++ b/lib/hooks/input-state-container-hooks.js @@ -129,8 +129,9 @@ ); const threadInfo = threadInfos[messageInfo.threadID]; + const isThickThread = threadInfo && threadTypeIsThick(threadInfo.type); - if (!threadTypeIsThick(threadInfo.type) && isLegacy) { + if (!isThickThread && isLegacy) { const mediaIDs = []; for (const { id } of messageInfo.media) { mediaIDs.push(id); @@ -149,7 +150,7 @@ }; } - if (!threadTypeIsThick(threadInfo.type) && !isLegacy) { + if (!isThickThread && !isLegacy) { const mediaMessageContents = getMediaMessageServerDBContentsFromMedia( messageInfo.media, );