From 73ecc49d49f36004498906475a3be71e49e3f1dd Mon Sep 17 00:00:00 2001 From: Midgard Date: Wed, 9 Dec 2020 18:11:36 +0100 Subject: [PATCH] Fix bug when --since is missing, add more number emoji --- read_mattermost.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/read_mattermost.py b/read_mattermost.py index 1b804cd..ce02308 100755 --- a/read_mattermost.py +++ b/read_mattermost.py @@ -38,6 +38,7 @@ PASSWORD = os.getenv("MM_PASSWORD") CONFIRMATION_EMOJI = True +since_arg_i = None try: since_arg_i = sys.argv.index("--since") except ValueError: @@ -222,8 +223,11 @@ def get_posts_for_channel(mmapi, channel_id, since, **kwargs): after = order[-1] -CONFIRMATION_EMOJI_NAMES = \ - "one,two,three,four,five,six,seven,eight,nine,keycap_ten,asterisk".split(",") +CONFIRMATION_EMOJI_NAMES = [ + *("one,two,three,four,five,six,seven,eight,nine,keycap_ten".split(",")), + *(f"num{i}" for i in range(11, 99 + 1)), + "heavy_plus_sign" +] def confirmation_emoji_name(count): if count < 0: return "exclamation"