Skip to content

Commit

Permalink
Change matrix access to password
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainIRS committed Sep 25, 2024
1 parent bfe5cec commit 9b04d04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TELEGRAM_NEWS=0
#matrix
MATRIX_HOMESERVER=
MATRIX_USER=
MATRIX_TOKEN=
MATRIX_PASSWORD=

MATRIX_FUN_REDDIT=
MATRIX_SERIOUS_REDDIT=
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def run_matrix_bot(queue: JoinableQueue):
creds = botlib.Creds(
os.getenv('MATRIX_HOMESERVER'),
os.getenv('MATRIX_USER'),
access_token=os.getenv('MATRIX_TOKEN'))
password=os.getenv('MATRIX_PASSWORD'))
bot = botlib.Bot(creds)

@bot.listener.on_startup
Expand Down Expand Up @@ -387,7 +387,7 @@ def message_sender(message_queue: JoinableQueue):
queues.append(reddit_queue)
reddit_process = Process(target=run_reddit_bot, args=(reddit_queue,))
reddit_process.start()
if os.getenv('MATRIX_USER') and os.getenv('MATRIX_TOKEN'):
if os.getenv('MATRIX_USER') and os.getenv('MATRIX_PASSWORD'):
logging.info('Starting matrix bot')
matrix_queue = JoinableQueue()
queues.append(matrix_queue)
Expand Down

0 comments on commit 9b04d04

Please sign in to comment.