From 7d325499c8ad5541ad8bc8fe22e02a1115760fa7 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 18 Mar 2023 02:35:55 -0600 Subject: [PATCH] fixes --- README.md | 2 +- matrix_gpt/bot/chat_functions.py | 19 +++++++++---------- matrixgpt.service | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6a99073..17603ad 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Uses code from [anoadragon453/nio-template](https://github.com/anoadragon453/nio ## Install ```bash -sudo apt install libolm-dev +sudo apt install libolm-dev gcc python3-dev pip install -r requirements.txt ``` diff --git a/matrix_gpt/bot/chat_functions.py b/matrix_gpt/bot/chat_functions.py index 3e13c63..edf2116 100644 --- a/matrix_gpt/bot/chat_functions.py +++ b/matrix_gpt/bot/chat_functions.py @@ -143,15 +143,15 @@ async def react_to_event( async def decryption_failure(self, room: MatrixRoom, event: MegolmEvent) -> None: """Callback for when an event fails to decrypt. Inform the user""" - logger.error( - f"Failed to decrypt event '{event.event_id}' in room '{room.room_id}'!" - f"\n\n" - f"Tip: try using a different device ID in your config file and restart." - f"\n\n" - f"If all else fails, delete your store directory and let the bot recreate " - f"it (your reminders will NOT be deleted, but the bot may respond to existing " - f"commands a second time)." - ) + # logger.error( + # f"Failed to decrypt event '{event.event_id}' in room '{room.room_id}'!" + # f"\n\n" + # f"Tip: try using a different device ID in your config file and restart." + # f"\n\n" + # f"If all else fails, delete your store directory and let the bot recreate " + # f"it (your reminders will NOT be deleted, but the bot may respond to existing " + # f"commands a second time)." + # ) user_msg = ( "Unable to decrypt this message. " @@ -217,7 +217,6 @@ def check_authorized(string, to_check): if to_check != 'all': if '@' not in to_check and ':' not in to_check: # Homeserver - print(string.split(':')[-1], to_check) if string.split(':')[-1] not in to_check: return False elif string not in to_check: diff --git a/matrixgpt.service b/matrixgpt.service index cbb315e..e1df875 100644 --- a/matrixgpt.service +++ b/matrixgpt.service @@ -6,7 +6,7 @@ After=network.target User=flask Environment="ICINGA2KUMA_ICINGA2_PW=[your icinga2 API password]" WorkingDirectory=/opt/icinga2-checks -ExecStart=/opt/matrixgpt/venv/bin/python3 +ExecStart=/opt/MatrixGPT/venv/bin/python3 /opt/MatrixGPT/main.py --config /etc/matrixgpt/config.yaml Restart=always [Install]