From d120f00fb5eaa7c49619dee4b280345676157400 Mon Sep 17 00:00:00 2001 From: Eva Date: Fri, 19 May 2023 18:25:20 +0200 Subject: [PATCH] client/upload: send state of image's anonymous checkbox as boolean Anonymous checkbox on images would not actually do anything, when the global checkbox was unchecked. The value of anonymous becomes a node, and it fails the anonymous === true check in save(). I don't understand why anonymous is treated differently from other post parameters and supplied as an argument to save(). Keeping it the way it is, I guess... --- client/js/views/post_upload_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/js/views/post_upload_view.js b/client/js/views/post_upload_view.js index f1dbe2d5..77eee672 100644 --- a/client/js/views/post_upload_view.js +++ b/client/js/views/post_upload_view.js @@ -322,8 +322,8 @@ class PostUploadView extends events.EventTarget { } let anonymous = this._uploadAllAnonymous.checked; - if (!anonymous) { - anonymous = rowNode.querySelector(".anonymous input:checked"); + if (!anonymous && rowNode.querySelector(".anonymous input:checked")) { + anonymous = true; } uploadable.anonymous = anonymous;