mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-21 15:51:52 -05:00
Fixed the NotifyPlugin
The watchlist notify plugin is supposed to send an APRS message to the configured callsign. This patch makes sure that the message is sent to the notify_callsign
This commit is contained in:
parent
ff8bf02e26
commit
055835cb3c
@ -1,6 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from aprsd import packets, plugin
|
from aprsd import messaging, packets, plugin
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger("APRSD")
|
LOG = logging.getLogger("APRSD")
|
||||||
@ -37,7 +37,14 @@ class NotifySeenPlugin(plugin.APRSDWatchListPluginBase):
|
|||||||
packet_type = packets.get_packet_type(packet)
|
packet_type = packets.get_packet_type(packet)
|
||||||
# we shouldn't notify the alert user that they are online.
|
# we shouldn't notify the alert user that they are online.
|
||||||
if fromcall != notify_callsign:
|
if fromcall != notify_callsign:
|
||||||
return f"{fromcall} was just seen by type:'{packet_type}'"
|
msg = messaging.TextMessage(
|
||||||
|
self.config["aprs"]["login"],
|
||||||
|
notify_callsign,
|
||||||
|
f"{fromcall} was just seen by type:'{packet_type}'",
|
||||||
|
# We don't need to keep this around if it doesn't go thru
|
||||||
|
allow_delay=False,
|
||||||
|
)
|
||||||
|
return msg
|
||||||
else:
|
else:
|
||||||
LOG.debug(
|
LOG.debug(
|
||||||
"Not old enough to notify callsign '{}' : {} < {}".format(
|
"Not old enough to notify callsign '{}' : {} < {}".format(
|
||||||
|
Loading…
Reference in New Issue
Block a user