mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2024-11-09 22:24:06 -08:00
commit
33020e8ec5
18
utils.py
18
utils.py
|
@ -16,12 +16,18 @@ def send_message(message, destination, interface):
|
||||||
max_payload_size = 200
|
max_payload_size = 200
|
||||||
for i in range(0, len(message), max_payload_size):
|
for i in range(0, len(message), max_payload_size):
|
||||||
chunk = message[i:i + max_payload_size]
|
chunk = message[i:i + max_payload_size]
|
||||||
interface.sendText(
|
try:
|
||||||
text=chunk,
|
d = interface.sendText(
|
||||||
destinationId=destination,
|
text=chunk,
|
||||||
wantAck=False,
|
destinationId=destination,
|
||||||
wantResponse=False
|
wantAck=False,
|
||||||
)
|
wantResponse=False
|
||||||
|
)
|
||||||
|
logging.info(f"REPLY SEND ID={d.id}")
|
||||||
|
except Exception as e:
|
||||||
|
logging.info(f"REPLY SEND ERROR {e.message}")
|
||||||
|
|
||||||
|
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue