1
0
forked from mirror/misskey
misskey/src/remote/activitypub/renderer/image.ts

9 lines
249 B
TypeScript
Raw Normal View History

2018-06-18 14:28:43 +09:00
import { IDriveFile } from '../../../models/drive-file';
2018-10-31 22:35:02 +09:00
import getDriveFileUrl from '../../../misc/get-drive-file-url';
2018-04-01 19:18:36 +09:00
2018-07-20 02:40:37 +09:00
export default (file: IDriveFile) => ({
2018-04-01 19:18:36 +09:00
type: 'Image',
2018-10-31 22:35:02 +09:00
url: getDriveFileUrl(file),
2018-07-20 02:40:37 +09:00
sensitive: file.metadata.isSensitive
2018-04-01 19:18:36 +09:00
});