feat(userbot,api,frontend): file links, media downloads, story hold-pause, drop scheduled dupes
This commit is contained in:
1 parent
683b9a31a3
commit
3e08698b62
38 files changed
+2889
-134
No files matched your search
@@ -20,6 +20,7 @@ export type InlineMedia =
|
||||
|
||||
export interface ViewerItem {
|
||||
downloaded: boolean;
|
||||
fileName: string | null;
|
||||
kind: string;
|
||||
mediaId: number | null;
|
||||
messageId: number;
|
||||
@@ -30,13 +31,16 @@ export function viewerItemsFrom(
|
||||
media: MediaRef[]
|
||||
): ViewerItem[] {
|
||||
if (media.length === 0) {
|
||||
return [{ messageId, mediaId: null, kind: "", downloaded: false }];
|
||||
return [
|
||||
{ messageId, mediaId: null, kind: "", downloaded: false, fileName: null },
|
||||
];
|
||||
}
|
||||
return media.map((item) => ({
|
||||
messageId: item.message_id,
|
||||
mediaId: item.id,
|
||||
kind: item.kind,
|
||||
downloaded: item.downloaded,
|
||||
fileName: item.file_name,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user