mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-20 16:41:13 -05:00
Allow passing in aprsis_client
When the admin user users the web ui to send a message a new client instance is created with login credentials for that particular message. This patch ensures that send_direct uses that client.
This commit is contained in:
parent
8ada789d4d
commit
62ce84b315
@ -162,7 +162,6 @@ class SendMessageThread(threads.APRSDThread):
|
||||
def run(self):
|
||||
LOG.debug("Starting")
|
||||
from_call = self.request["from"]
|
||||
self.request["password"]
|
||||
to_call = self.request["to"]
|
||||
message = self.request["message"]
|
||||
LOG.info(
|
||||
|
@ -381,7 +381,10 @@ class TextMessage(Message):
|
||||
|
||||
def send_direct(self, aprsis_client=None):
|
||||
"""Send a message without a separate thread."""
|
||||
cl = self.get_transport()
|
||||
if aprsis_client:
|
||||
cl = aprsis_client
|
||||
else:
|
||||
cl = self.get_transport()
|
||||
log_message(
|
||||
"Sending Message Direct",
|
||||
str(self).rstrip("\n"),
|
||||
@ -501,7 +504,10 @@ class AckMessage(Message):
|
||||
|
||||
def send_direct(self, aprsis_client=None):
|
||||
"""Send an ack message without a separate thread."""
|
||||
cl = self.get_transport()
|
||||
if aprsis_client:
|
||||
cl = aprsis_client
|
||||
else:
|
||||
cl = self.get_transport()
|
||||
log_message(
|
||||
"Sending ack",
|
||||
str(self).rstrip("\n"),
|
||||
|
Loading…
Reference in New Issue
Block a user