From 44a2dfe737abf5dae9d5a5a2bbb9e81eef02aa05 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 26 Apr 2015 10:41:52 -0700 Subject: [PATCH] Only run filters on thread watcher replies quoting you. --- src/Monitoring/ThreadWatcher.coffee | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 73f8a367e..9a029947f 100755 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -214,10 +214,12 @@ ThreadWatcher = for postObj in @response.posts continue unless postObj.no > lastReadPost continue if QR.db?.get {boardID, threadID, postID: postObj.no} - continue if Filter.isHidden(Build.parseJSON postObj, boardID) unread++ + continue unless QR.db and postObj.com + + quotesYou = false regexp = /]*\bhref="(?:\/([^\/]+)\/thread\/(\d+))?(?:#p(\d+))?"/g while match = regexp.exec postObj.com if QR.db.get { @@ -225,8 +227,10 @@ ThreadWatcher = threadID: match[2] or threadID postID: match[3] or match[2] or threadID } - quotingYou++ - continue + quotesYou = true + break + if quotesYou and not Filter.isHidden(Build.parseJSON postObj, boardID) + quotingYou++ if isDead isnt data.isDead or unread isnt data.unread or quotingYou isnt data.quotingYou data.isDead = isDead