From 65d6de9e4974a27802603d3ee758a15c12f0d0f5 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 9 Oct 2016 13:54:58 -0700 Subject: [PATCH] Fix IDs/capcodes being removed from stubs/notifications by Anonymize. #1129 --- src/classes/Post.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index 968b7d950..272f572be 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -24,7 +24,6 @@ class Post @thread.kill() if @thread.isArchived @info = - nameBlock: if Conf['Anonymize'] then 'Anonymous' else @nodes.nameBlock.textContent.trim() subject: @nodes.subject?.textContent or undefined name: @nodes.name?.textContent tripcode: @nodes.tripcode?.textContent @@ -35,6 +34,13 @@ class Post flag: @nodes.flag?.title date: if @nodes.date then new Date(@nodes.date.dataset.utc * 1000) + if Conf['Anonymize'] + @info.nameBlock = 'Anonymous' + else + @info.nameBlock = "#{@info.name or ''} #{@info.tripcode or ''}".trim() + @info.nameBlock += " ## #{@info.capcode}" if @info.capcode + @info.nameBlock += " (ID: #{@info.uniqueID})" if @info.uniqueID + @parseComment() @parseQuotes() @parseFile()