From 5359abb46ac51eff797c6ba3cb65458b84180659 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Mon, 10 Dec 2018 20:38:35 +0000 Subject: Don't count a thread as updated if the most recent post was made by the current user. --- telem.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telem.lua b/telem.lua index 33909bd..4e37899 100755 --- a/telem.lua +++ b/telem.lua @@ -114,9 +114,11 @@ function get_threads(board) local posts = get_posts(thread) thread.post_count = #posts thread.updated = 0 + thread.updated_by = "" for _, post in ipairs(posts) do if post.timestamp > thread.updated then thread.updated = post.timestamp + thread.updated_by = post.author end end table.insert(threads, thread) @@ -330,7 +332,7 @@ function do_scan() local threads = get_threads(board) local updated_threads = 0 for _, thread in ipairs(threads) do - if thread.updated > board.last_scanned then + if thread.updated > board.last_scanned and thread.updated_by ~= username then updated_threads = updated_threads + 1 end end -- cgit v1.2.3