diff --git a/worker/src/rebuild.ts b/worker/src/rebuild.ts index 484d1b4..f84748e 100644 --- a/worker/src/rebuild.ts +++ b/worker/src/rebuild.ts @@ -333,6 +333,14 @@ async function scanDestinationChannel( fileSize: BigInt(doc.document.size), date: new Date(msg.date * 1000), }); + } else if (doc?.file_name) { + // Not matched by any pattern in archive/detect.ts, so it is dropped without a + // packages/skipped_packages row. Grep "unrecognized attachment" to find naming + // schemes we do not handle yet. + log.debug( + { chatId: chatId.toString(), messageId: msg.id, fileName: doc.file_name }, + "Skipping unrecognized attachment (no archive/document pattern matched)" + ); } } diff --git a/worker/src/tdlib/download.ts b/worker/src/tdlib/download.ts index 7e155b7..089ca37 100644 --- a/worker/src/tdlib/download.ts +++ b/worker/src/tdlib/download.ts @@ -267,6 +267,15 @@ export async function getChannelMessages( }); continue; } + if (doc?.file_name) { + // Not matched by any pattern in archive/detect.ts, so it is dropped without a + // packages/skipped_packages row. Grep "unrecognized attachment" to find naming + // schemes we do not handle yet. + log.debug( + { chatId: chatId.toString(), messageId: msg.id, fileName: doc.file_name }, + "Skipping unrecognized attachment (no archive/document pattern matched)" + ); + } // Check for photo messages (potential previews) const photo = msg.content?.photo; diff --git a/worker/src/tdlib/topics.ts b/worker/src/tdlib/topics.ts index 6579388..4d313f5 100644 --- a/worker/src/tdlib/topics.ts +++ b/worker/src/tdlib/topics.ts @@ -280,6 +280,15 @@ export async function getTopicMessages( }); continue; } + if (doc?.file_name) { + // Not matched by any pattern in archive/detect.ts, so it is dropped without a + // packages/skipped_packages row. Grep "unrecognized attachment" to find naming + // schemes we do not handle yet. + log.debug( + { chatId: chatId.toString(), topicId: topicId.toString(), messageId: msg.id, fileName: doc.file_name }, + "Skipping unrecognized attachment (no archive/document pattern matched)" + ); + } // Check for photo messages (potential previews) const photo = msg.content?.photo;