This commit is contained in:
Cyberes 2023-03-18 02:35:55 -06:00
parent c90ecf3fcd
commit 7d325499c8
3 changed files with 11 additions and 12 deletions

View File

@ -7,7 +7,7 @@ Uses code from [anoadragon453/nio-template](https://github.com/anoadragon453/nio
## Install ## Install
```bash ```bash
sudo apt install libolm-dev sudo apt install libolm-dev gcc python3-dev
pip install -r requirements.txt pip install -r requirements.txt
``` ```

View File

@ -143,15 +143,15 @@ async def react_to_event(
async def decryption_failure(self, room: MatrixRoom, event: MegolmEvent) -> None: async def decryption_failure(self, room: MatrixRoom, event: MegolmEvent) -> None:
"""Callback for when an event fails to decrypt. Inform the user""" """Callback for when an event fails to decrypt. Inform the user"""
logger.error( # logger.error(
f"Failed to decrypt event '{event.event_id}' in room '{room.room_id}'!" # f"Failed to decrypt event '{event.event_id}' in room '{room.room_id}'!"
f"\n\n" # f"\n\n"
f"Tip: try using a different device ID in your config file and restart." # f"Tip: try using a different device ID in your config file and restart."
f"\n\n" # f"\n\n"
f"If all else fails, delete your store directory and let the bot recreate " # 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"it (your reminders will NOT be deleted, but the bot may respond to existing "
f"commands a second time)." # f"commands a second time)."
) # )
user_msg = ( user_msg = (
"Unable to decrypt this message. " "Unable to decrypt this message. "
@ -217,7 +217,6 @@ def check_authorized(string, to_check):
if to_check != 'all': if to_check != 'all':
if '@' not in to_check and ':' not in to_check: if '@' not in to_check and ':' not in to_check:
# Homeserver # Homeserver
print(string.split(':')[-1], to_check)
if string.split(':')[-1] not in to_check: if string.split(':')[-1] not in to_check:
return False return False
elif string not in to_check: elif string not in to_check:

View File

@ -6,7 +6,7 @@ After=network.target
User=flask User=flask
Environment="ICINGA2KUMA_ICINGA2_PW=[your icinga2 API password]" Environment="ICINGA2KUMA_ICINGA2_PW=[your icinga2 API password]"
WorkingDirectory=/opt/icinga2-checks 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 Restart=always
[Install] [Install]