From c6a9c95cc14a9b4f5967da09b753de0039cfc26b Mon Sep 17 00:00:00 2001 From: Conatum Date: Sun, 27 Aug 2023 09:14:00 +0300 Subject: [PATCH] fix (timers): Fix empty notify case. --- src/modules/pomodoro/timer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/pomodoro/timer.py b/src/modules/pomodoro/timer.py index b17c9a5b..e200c590 100644 --- a/src/modules/pomodoro/timer.py +++ b/src/modules/pomodoro/timer.py @@ -530,10 +530,12 @@ class Timer: if with_notify and self.members: # TODO: Handle case with too many members notifyline = ''.join(member.mention for member in self.members if member not in needs_warning) - notifyline = f"||{notifyline}||" else: notifyline = "" + if notifyline: + notifyline = f"||{notifyline}||" + content = "\n".join(string for string in (stageline, warningline, notifyline) if string) elif self.auto_restart: content = t(_p(