diff --git a/desktop/src/features/messages/ui/WaveMessageAttachment.tsx b/desktop/src/features/messages/ui/WaveMessageAttachment.tsx index a585cb7bb..a68c686e7 100644 --- a/desktop/src/features/messages/ui/WaveMessageAttachment.tsx +++ b/desktop/src/features/messages/ui/WaveMessageAttachment.tsx @@ -53,16 +53,26 @@ export function WaveMessageAttachment({ return true; }); }, [huddleMemberPubkeys, targetAgentPubkey]); + const resolvedIncludesTarget = + normalizedTargetPubkey !== null && + resolvedHuddleMemberPubkeys.some( + (pubkey) => normalizePubkey(pubkey) === normalizedTargetPubkey, + ); const targetAgentLookupPending = - targetIsAgent && normalizedTargetPubkey !== null && huddleMemberPubkeysPending && targetAgentPubkey === null && - !resolvedHuddleMemberPubkeys.some( - (pubkey) => normalizePubkey(pubkey) === normalizedTargetPubkey, - ); + !resolvedIncludesTarget; + const legacyAgentLookupPending = + normalizedTargetPubkey === null && + !targetIsAgent && + huddleMemberPubkeysPending && + resolvedHuddleMemberPubkeys.length === 0; const startHuddleDisabled = - !channelId || isStarting || targetAgentLookupPending; + !channelId || + isStarting || + targetAgentLookupPending || + legacyAgentLookupPending; const handleStartHuddle = React.useCallback( async (event: React.MouseEvent) => {