From a1edbcf974e10986ec15613563b7f00080f66143 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 8 May 2018 14:01:04 -0600 Subject: [PATCH] disallow adding a tag to a deleted comment --- services/tags.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/tags.js b/services/tags.js index b4e70cb29..18cf5869f 100644 --- a/services/tags.js +++ b/services/tags.js @@ -163,6 +163,11 @@ class TagsService { }, }; + if (item_type === 'COMMENT') { + // Don't allow adding tags to deleted comments. + query.deleted_at = null; + } + // If ownership verification is required, ensure that the person that is // assigning the tag is the same person that owns the comment. if (ownershipCheck) {