1
0
Fork 1
mirror of https://example.com synced 2024-11-24 07:46:39 +09:00

update file sensitivity on note edit

This commit is contained in:
Kaity A 2023-05-02 18:22:42 +10:00
parent 61dde4c0b0
commit 389c531b2c
No known key found for this signature in database
GPG key ID: 5A797B97C2A490AD

View file

@ -589,6 +589,12 @@ export async function updateNote(value: string | IObject, resolver?: Resolver) {
update.comment = altText;
}
// Don't unmark previously marked sensitive files,
// but if edited post contains sensitive marker, update it.
if (post.sensitive && !file.isSensitive) {
update.isSensitive = post.sensitive;
}
if (notEmpty(update)) {
await DriveFiles.update(file.id, update);
publishing = true;