From 599f549ab92a78c6ec284fd766091930c8958a62 Mon Sep 17 00:00:00 2001 From: KF7EEL Date: Wed, 3 Mar 2021 16:36:25 -0800 Subject: [PATCH] add dashboard APRS message hook --- scripts/dashboard/dashboard.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/dashboard/dashboard.py b/scripts/dashboard/dashboard.py index c322b67..b9b75d5 100644 --- a/scripts/dashboard/dashboard.py +++ b/scripts/dashboard/dashboard.py @@ -448,7 +448,7 @@ def mailbox(): if not recipient: mail_content = """

The Mailbox is a place where users can leave messages via DMR SMS. A user can leave a message for someone else by sending a specially formatted SMS to """ + data_call_id + """. - The message recipient can then use the mailbox to check for messages. Enter your call sign below to check for messages. See the help page for more information.

+ The message recipient can then use the mailbox to check for messages. You can also check for APRS mesages addressed to your DMR radio. Enter your call sign below to check for messages. See the help page for more information.

@@ -478,10 +478,23 @@ def mailbox(): ''' for messages in mailbox_file: if messages['recipient'] == recipient.upper(): + sender = """ + + + + + """ if type(messages['time']) == str: loc_time = str(messages['time']) if type(messages['time']) == int or type(messages['time']) == float: loc_time = datetime.fromtimestamp(messages['time']).strftime(time_format) + if type(messages['dmr_id']) == str: + sender = """ + + + + + """ mail_content = mail_content + """
DMR ID:""" + str(messages['dmr_id']) + """
APRS Call:""" + str(messages['dmr_id']) + """
@@ -489,10 +502,7 @@ def mailbox(): - - - - + """ + sender + """
From: """ + messages['call'] + """
DMR ID:""" + str(messages['dmr_id']) + """
Time: """ + loc_time + """