returngetExternalFilesForMessage(m,false).some(a=>!isEmpty(a)&&isString(a));// when we remove an attachment, we set the path to '' so it should be excluded here
returnhasUserVisibleAttachments(m);
});
returnmessagesWithAttachments;
}
@ -2092,7 +2093,7 @@ function getMessagesWithFileAttachments(conversationId: string, limit: number) {
// Note: always print something so we know if the polling is hanging
window.log.info(
`SwarmPolling: pollNodeForKey of ${ed25519Str(pubkey)} from snode: ${ed25519Str(snode.pubkey_ed25519)} namespaces: ${namespaces} returned: ${thisSnodeResults?.length}`
);
returnthisSnodeResults;
})
);
window.log.info(
`SwarmPolling: pollNodeForKey of ${ed25519Str(pubkey)} from snode: ${ed25519Str(toPollFrom.pubkey_ed25519)} namespaces: ${namespaces} returned: ${resultsFromAllNamespaces?.length}`
`SwarmPolling: pollNodeForKey of ${ed25519Str(pubkey)} namespaces: ${namespaces} returned ${resultsFromAllSnodesSettled.filter(m=>m.status==='fulfilled').length}/${RETRIEVE_SNODES_COUNT} fulfilled promises`
`SwarmPolling: handleSeenMessages: ${newMessages.length} out of ${uniqOtherMsgs.length} are not seen yet about pk:${ed25519Str(pubkey)} snode: ${toPollFrom ?ed25519Str(toPollFrom.pubkey_ed25519):'undefined'}`
`SwarmPolling: handleSeenMessages: ${newMessages.length} out of ${uniqOtherMsgs.length} are not seen yet about pk:${ed25519Str(pubkey)} snode: ${JSON.stringify(toPollFrom.map(m=>ed25519Str(m.pubkey_ed25519)))}`
MAX_GLOBAL_UNREAD_COUNT: 99,// the global one does not look good with 4 digits (999+) so we have a smaller one for it
/** NOTE some existing groups might not have joinedAtSeconds and we need a fallback value that is not falsy in order to poll and show up in the conversations list */