misskey/src/remote/activitypub/renderer/document.ts

9 lines
243 B
TypeScript
Raw Normal View History

2018-06-18 07:28:43 +02:00
import { IDriveFile } from '../../../models/drive-file';
2018-10-31 14:35:02 +01:00
import getDriveFileUrl from '../../../misc/get-drive-file-url';
2018-04-01 12:18:36 +02:00
2018-06-18 07:28:43 +02:00
export default (file: IDriveFile) => ({
2018-04-01 12:18:36 +02:00
type: 'Document',
2018-06-18 07:28:43 +02:00
mediaType: file.contentType,
2018-10-31 14:35:02 +01:00
url: getDriveFileUrl(file)
2018-04-01 12:18:36 +02:00
});