diff --git a/lib/push/send-utils.js b/lib/push/send-utils.js --- a/lib/push/send-utils.js +++ b/lib/push/send-utils.js @@ -51,6 +51,7 @@ import { type GetENSNames } from '../utils/ens-helpers.js'; import { type GetFCNames } from '../utils/farcaster-helpers.js'; import { promiseAll } from '../utils/promises.js'; +import invariant from 'invariant'; export type Device = { +platformDetails: PlatformDetails, @@ -134,6 +135,11 @@ for (const threadID of threadsToMessageIndices.keys()) { const threadInfo = rawThreadInfos[threadID]; for (const memberInfo of threadInfo.members) { + // TODO: `getPushUserInfo` needs to be typed to only accept `ThickRawThreadInfo`. + invariant( + memberInfo && memberInfo.permissions, + 'memberInfo must be set in getPushUserInfo', + ); if ( !isMemberActive(memberInfo) || !hasPermission(memberInfo.permissions, 'visible') ||