Skip to content

Commit

Permalink
feat: send request access to errors room
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed Jun 19, 2024
1 parent 1d10f94 commit 5d8bef2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ async def albert_answer(ep: EventParser, matrix_client: MatrixClient):
await matrix_client.send_markdown_message(
ep.room.room_id, command_registry.get_help(config)
)
# Redirect the error message to the errors room if it exists
if config.errors_room_id:
await matrix_client.send_markdown_message(
config.errors_room_id,
f"\u26a0\ufe0f **New Albert Tchap user access request**\n\n{ep.sender}\n\nMatrix server: {config.matrix_home_server}",
)

user_prompt = ep.event.body
if user_prompt.startswith(COMMAND_PREFIX):
Expand Down

0 comments on commit 5d8bef2

Please sign in to comment.