Fix ActivityPub attachment url
This commit is contained in:
parent
8ccbabf5ca
commit
f56ec82f6b
|
@ -4,5 +4,5 @@ import { IDriveFile } from '../../../models/drive-file';
|
||||||
export default (file: IDriveFile) => ({
|
export default (file: IDriveFile) => ({
|
||||||
type: 'Document',
|
type: 'Document',
|
||||||
mediaType: file.contentType,
|
mediaType: file.contentType,
|
||||||
url: `${config.drive_url}/${file._id}`
|
url: file.metadata.url || `${config.drive_url}/${file._id}`
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { IDriveFile } from '../../../models/drive-file';
|
||||||
|
|
||||||
export default (file: IDriveFile) => ({
|
export default (file: IDriveFile) => ({
|
||||||
type: 'Image',
|
type: 'Image',
|
||||||
url: `${config.drive_url}/${file._id}`,
|
url: file.metadata.url || `${config.drive_url}/${file._id}`,
|
||||||
sensitive: file.metadata.isSensitive
|
sensitive: file.metadata.isSensitive
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue