mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 16:30:13 +00:00
make sure that sensitive
is a boolean - fixes #596
Some remote instances may send garbage. If the `sensitive` value passed to `driveService.uploadFromUrl` is not a boolean, eventually we'll get an exception from the database complaining about that. This change avoids that problem.
This commit is contained in:
parent
5496aa27db
commit
58d329e3bd
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ export class ApImageService {
|
||||||
url: image.url,
|
url: image.url,
|
||||||
user: actor,
|
user: actor,
|
||||||
uri: image.url,
|
uri: image.url,
|
||||||
sensitive: image.sensitive,
|
sensitive: !!(image.sensitive),
|
||||||
isLink: !shouldBeCached,
|
isLink: !shouldBeCached,
|
||||||
comment: truncate(image.name ?? undefined, DB_MAX_IMAGE_COMMENT_LENGTH),
|
comment: truncate(image.name ?? undefined, DB_MAX_IMAGE_COMMENT_LENGTH),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue