diff options
author | Solderpunk <solderpunk@sdf.org> | 2018-12-10 20:38:35 +0000 |
---|---|---|
committer | Solderpunk <solderpunk@sdf.org> | 2018-12-10 20:38:35 +0000 |
commit | 5359abb46ac51eff797c6ba3cb65458b84180659 (patch) | |
tree | 65e581ff358c18ec04420b093f8a9c618a8c7ffc /telem.lua | |
parent | Initial implementation of coloured output. (diff) |
Don't count a thread as updated if the most recent post was made by the current user.
Diffstat (limited to 'telem.lua')
-rwxr-xr-x | telem.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |