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:
dakkar 2024-08-05 10:12:27 +01:00
parent 5496aa27db
commit 58d329e3bd

View file

@ -82,7 +82,7 @@ export class ApImageService {
url: image.url,
user: actor,
uri: image.url,
sensitive: image.sensitive,
sensitive: !!(image.sensitive),
isLink: !shouldBeCached,
comment: truncate(image.name ?? undefined, DB_MAX_IMAGE_COMMENT_LENGTH),
});