feat(matrix): create real rooms for new chats

This commit is contained in:
Mikhail Putilovskij 2026-04-01 01:12:56 +03:00
parent 82eb711844
commit 14c091b5f5
4 changed files with 89 additions and 8 deletions

View file

@ -3,7 +3,7 @@ from __future__ import annotations
from adapter.matrix.handlers.chat import (
handle_archive,
handle_list_chats,
handle_new_chat,
make_handle_new_chat,
handle_rename,
)
from adapter.matrix.handlers.confirm import handle_cancel, handle_confirm
@ -22,8 +22,8 @@ from core.handler import EventDispatcher
from core.protocol import IncomingCallback, IncomingCommand
def register_matrix_handlers(dispatcher: EventDispatcher) -> None:
dispatcher.register(IncomingCommand, "new", handle_new_chat)
def register_matrix_handlers(dispatcher: EventDispatcher, client=None, store=None) -> None:
dispatcher.register(IncomingCommand, "new", make_handle_new_chat(client, store))
dispatcher.register(IncomingCommand, "chats", handle_list_chats)
dispatcher.register(IncomingCommand, "rename", handle_rename)
dispatcher.register(IncomingCommand, "archive", handle_archive)