Fix IDs/capcodes being removed from stubs/notifications by Anonymize. #1129

This commit is contained in:
ccd0 2016-10-09 13:54:58 -07:00
parent 313ec30cd8
commit 65d6de9e49

View File

@ -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()