Promise resolving to message metadata or null if fewer than depth+1 messages exist
Example
// Get the 100th most recent message (start import from there) constboundary = awaitgetNthMostRecentBoundary("19175769740@s.whatsapp.net", 100); if (boundary) { console.log(`Importing from message ${boundary.message_id} onwards`); }
Gets metadata about the Nth most recent message in a specific chat.
This function is used to implement "depth-based" filtering, where you want to import only the most recent N messages from a chat. It's useful for: