mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-11 06:11:15 +00:00
feat: capture media_album_id from TDLib messages during scanning
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,7 @@ interface TdPhotoSize {
|
|||||||
interface TdMessage {
|
interface TdMessage {
|
||||||
id: number;
|
id: number;
|
||||||
date: number;
|
date: number;
|
||||||
|
media_album_id?: string;
|
||||||
content: {
|
content: {
|
||||||
_: string;
|
_: string;
|
||||||
document?: {
|
document?: {
|
||||||
@@ -211,6 +212,7 @@ export async function getChannelMessages(
|
|||||||
fileId: String(doc.document.id),
|
fileId: String(doc.document.id),
|
||||||
fileSize: BigInt(doc.document.size),
|
fileSize: BigInt(doc.document.size),
|
||||||
date: new Date(msg.date * 1000),
|
date: new Date(msg.date * 1000),
|
||||||
|
mediaAlbumId: msg.media_album_id && msg.media_album_id !== "0" ? msg.media_album_id : undefined,
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -227,6 +229,7 @@ export async function getChannelMessages(
|
|||||||
caption,
|
caption,
|
||||||
fileId: String(smallest.photo.id),
|
fileId: String(smallest.photo.id),
|
||||||
fileSize: smallest.photo.size || smallest.photo.expected_size,
|
fileSize: smallest.photo.size || smallest.photo.expected_size,
|
||||||
|
mediaAlbumId: msg.media_album_id && msg.media_album_id !== "0" ? msg.media_album_id : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ export async function getTopicMessages(
|
|||||||
messages?: {
|
messages?: {
|
||||||
id: number;
|
id: number;
|
||||||
date: number;
|
date: number;
|
||||||
|
media_album_id?: string;
|
||||||
content: {
|
content: {
|
||||||
_: string;
|
_: string;
|
||||||
document?: {
|
document?: {
|
||||||
@@ -248,6 +249,7 @@ export async function getTopicMessages(
|
|||||||
fileId: String(doc.document.id),
|
fileId: String(doc.document.id),
|
||||||
fileSize: BigInt(doc.document.size),
|
fileSize: BigInt(doc.document.size),
|
||||||
date: new Date(msg.date * 1000),
|
date: new Date(msg.date * 1000),
|
||||||
|
mediaAlbumId: msg.media_album_id && msg.media_album_id !== "0" ? msg.media_album_id : undefined,
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -263,6 +265,7 @@ export async function getTopicMessages(
|
|||||||
caption,
|
caption,
|
||||||
fileId: String(smallest.photo.id),
|
fileId: String(smallest.photo.id),
|
||||||
fileSize: smallest.photo.size || smallest.photo.expected_size,
|
fileSize: smallest.photo.size || smallest.photo.expected_size,
|
||||||
|
mediaAlbumId: msg.media_album_id && msg.media_album_id !== "0" ? msg.media_album_id : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user