diff --git a/lib/selectors/socket-selectors.js b/lib/selectors/socket-selectors.js --- a/lib/selectors/socket-selectors.js +++ b/lib/selectors/socket-selectors.js @@ -131,31 +131,13 @@ } const { failUnmentioned } = serverRequest; - if (failUnmentioned && failUnmentioned.threadInfos) { - for (const threadID in convertedInfos[ - stateSyncSpecs.threads.hashKey - ]) { - const key = `threadInfo|${threadID}`; - const hashResult = hashResults[key]; - if (hashResult === null || hashResult === undefined) { - hashResults[key] = false; - } + for (const spec of values(specPerInnerHashKey)) { + const innerHashKey = spec.innerHashSpec?.hashKey; + if (!failUnmentioned?.[spec.hashKey] || !innerHashKey) { + continue; } - } - if (failUnmentioned && failUnmentioned.entryInfos) { - for (const entryID in convertedInfos[ - stateSyncSpecs.entries.hashKey - ]) { - const key = `entryInfo|${entryID}`; - const hashResult = hashResults[key]; - if (hashResult === null || hashResult === undefined) { - hashResults[key] = false; - } - } - } - if (failUnmentioned && failUnmentioned.userInfos) { - for (const userID in convertedInfos[stateSyncSpecs.users.hashKey]) { - const key = `userInfo|${userID}`; + for (const id in convertedInfos[spec.hashKey]) { + const key = `${innerHashKey}|${id}`; const hashResult = hashResults[key]; if (hashResult === null || hashResult === undefined) { hashResults[key] = false;