From daf4c721a356cf9b8afaa6fda80188326a65c33e Mon Sep 17 00:00:00 2001 From: Jeremiah K Date: Wed, 26 Apr 2023 19:53:10 -0500 Subject: [PATCH] Fixed plugin bug properly (I think) --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 05162a7..2fd22e6 100644 --- a/main.py +++ b/main.py @@ -247,7 +247,10 @@ def on_meshtastic_message(packet, loop=None): # Plugin functionality for plugin in plugins: plugin.configure(matrix_client, meshtastic_interface) - plugin.handle_meshtastic_message(packet, formatted_message, longname, meshnet_name) + asyncio.run_coroutine_threadsafe( + plugin.handle_meshtastic_message(packet, formatted_message, longname, meshnet_name), + loop=loop, + ) for room in matrix_rooms: if room["meshtastic_channel"] == channel: