From e8ae3807db87880ec65923854b07e5cc225a72c3 Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 26 Nov 2024 10:00:59 -0500 Subject: [PATCH] Webchat: Don't automatically fetch location KISS this patch changes webchat to not call REPEAT automatically to fetch the location of a remote callsign if the client is on kiss. Only fetch the location if the user clicks the button to fetch the location. --- aprsd/cmds/webchat.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aprsd/cmds/webchat.py b/aprsd/cmds/webchat.py index 8ce38ba..62be140 100644 --- a/aprsd/cmds/webchat.py +++ b/aprsd/cmds/webchat.py @@ -38,7 +38,7 @@ socketio = None # List of callsigns that we don't want to track/fetch their location callsign_no_track = [ - "REPEAT", "WB4BOR-11", "APDW16", "WXNOW", "WXBOT", "BLN0", "BLN1", "BLN2", + "APDW16", "BLN0", "BLN1", "BLN2", "BLN3", "BLN4", "BLN5", "BLN6", "BLN7", "BLN8", "BLN9", ] @@ -319,6 +319,7 @@ class WebChatProcessPacketThread(rx.APRSDProcessPacketThread): elif ( from_call not in callsign_locations and from_call not in callsign_no_track + and client_factory.create().transport() in [client.TRANSPORT_APRSIS, client.TRANSPORT_FAKE] ): # We have to ask aprs for the location for the callsign # We send a message packet to wb4bor-11 asking for location. @@ -377,7 +378,8 @@ def _get_transport(stats): @flask_app.route("/location/", methods=["POST"]) def location(callsign): LOG.debug(f"Fetch location for callsign {callsign}") - populate_callsign_location(callsign) + if not callsign in callsign_no_track: + populate_callsign_location(callsign) @auth.login_required @@ -542,7 +544,8 @@ class SendMessageNamespace(Namespace): def on_get_callsign_location(self, data): LOG.debug(f"on_callsign_location {data}") - populate_callsign_location(data["callsign"]) + if data["callsign"] not in callsign_no_track: + populate_callsign_location(data["callsign"]) @trace.trace