From 05045c2a8ecd8bbaf8e71e2173ad780e3318a2a2 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Fri, 31 Dec 2021 18:21:56 +0000 Subject: [PATCH] Simplify dashboard --- handler/agora.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/handler/agora.py b/handler/agora.py index 83240c2..08fbab2 100644 --- a/handler/agora.py +++ b/handler/agora.py @@ -44,7 +44,7 @@ class Agora(object): self.lc_dash = LoopingCall(self.dashboard) self.lc_dash.start(int(settings.Agora.RefreshSec)) - def dashboard(self, send_irc=True, formatted=False): + def dashboard(self, send_irc=True): """ Returns a dict for the dashboard. Calls hooks to parse dashboard info and get all contact messages. @@ -60,10 +60,10 @@ class Agora(object): for contact in dash["response"]["data"]["contact_list"]: contact_id = contact["data"]["contact_id"] dash_tmp[contact_id] = contact - fmt = self.dashboard_hook(dash_tmp) + + # Call hook function + self.dashboard_hook(dash_tmp, send_irc=send_irc) self.get_recent_messages() - if formatted: - return fmt return dash_tmp def dashboard_hook(self, dash, send_irc=True):