Sharkey/src/remote/activitypub/renderer/image.ts

9 lines
256 B
TypeScript
Raw Normal View History

2018-04-02 07:15:53 +03:00
import config from '../../../config';
2018-06-18 08:28:43 +03:00
import { IDriveFile } from '../../../models/drive-file';
2018-04-01 13:18:36 +03:00
2018-07-19 20:40:37 +03:00
export default (file: IDriveFile) => ({
2018-04-01 13:18:36 +03:00
type: 'Image',
2018-08-11 22:27:32 +03:00
url: file.metadata.url || `${config.drive_url}/${file._id}`,
2018-07-19 20:40:37 +03:00
sensitive: file.metadata.isSensitive
2018-04-01 13:18:36 +03:00
});