From fb1c6c0dc6f9277f1bfbef6dc09f7c54ce5adb13 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Wed, 27 Dec 2023 11:32:02 +0100 Subject: [PATCH] don't announce talks that have started more than 25 minutes ago --- node.lua | 2 -- tile.lua | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/node.lua b/node.lua index 5627bcb..bb7f74f 100644 --- a/node.lua +++ b/node.lua @@ -73,8 +73,6 @@ local function check_next_talks() all_next_talks = {} - local min_start = time - 25 * 60 - for idx = 1, #schedule do local talk = schedule[idx] diff --git a/tile.lua b/tile.lua index 411cb32..1bd72e8 100644 --- a/tile.lua +++ b/tile.lua @@ -122,9 +122,9 @@ local function check_next_talks() -- Ignore all talks that have already ended here. We don't want -- to announce these. - if talk.end_ts > time then + if talk.end_ts > time and talk.start_ts > min_start then -- is this in *this* room, or somewhere else? - if current_room and talk.room == current_room and talk.start_ts > min_start then + if current_room and talk.room == current_room then room_next_talks[#room_next_talks+1] = talk end all_next_talks[#all_next_talks+1] = talk