#11 - fix password handling
build container aoc / build (push) Successful in 1m0s

This commit is contained in:
2026-10-28 19:03:55 +01:00
parent a0fb7a6a5f
commit 787cea3e7f
2 changed files with 16 additions and 2 deletions
+3 -1
View File
@@ -46,7 +46,8 @@ class MatrixBot:
self.domain = self._config['general']['domain']
self.homeserver = f"https://{self.domain}"
self.username = f"@{self._config['general']['user']}:{self._config['general']['domain']}"
self.__password = self._config['general']['pass']
# get password from env or fallback from config file
self.__password = os.environ.get('MATRIX_BOT_PASSWORD') or self._config['general']['pass']
del self._config['general']['pass']
return True
@@ -154,6 +155,7 @@ class MatrixBot:
async def run(self):
if await self._login():
del self.__password
await self.send_status(f"{self.botname} Online!")
await self._activate_skills()
await self.client.sync_forever(timeout=30000, set_presence='online')