From a44d683956086fd1756ee5bb7807c52b8f9e0d13 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 13 Jul 2020 23:54:10 -0400 Subject: [PATCH] Show all power level changes for initial event --- src/backend/nio_callbacks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/nio_callbacks.py b/src/backend/nio_callbacks.py index ef8c621d..b7466c3c 100644 --- a/src/backend/nio_callbacks.py +++ b/src/backend/nio_callbacks.py @@ -362,7 +362,7 @@ class NioCallbacks: old = previous.get(default, levels.defaults.users_default) - if level != old: + if level != old or not previous: changes.append(f"{default} | {lvl(old)} | {lvl(level)}") # Minimum level to send event changes @@ -376,7 +376,7 @@ class NioCallbacks: levels.defaults.events_default, ) - if level != old: + if level != old or not previous: event_changes.append(f"{ev_type} | {lvl(old)} | {lvl(level)}") # User level changes @@ -384,7 +384,7 @@ class NioCallbacks: for user_id, level in levels.users.items(): old = users_previous.get(user_id, levels.defaults.users_default) - if level != old: + if level != old or not previous: user_changes.append(f"{user_id} | {lvl(old)} | {lvl(level)}") # Gather and format changes