feat(05-01): reconcile matrix rooms before live sync
- rebuild room and user metadata from synced space topology at startup - run reconciliation before sync_forever and persist legacy platform_chat_id backfills
This commit is contained in:
parent
6693d72cbd
commit
8a80d004fd
2 changed files with 152 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ from adapter.matrix.handlers.context_commands import (
|
|||
LOAD_PROMPT,
|
||||
)
|
||||
from adapter.matrix.routed_platform import RoutedPlatformClient
|
||||
from adapter.matrix.reconciliation import reconcile_startup_state
|
||||
from adapter.matrix.room_router import resolve_chat_id
|
||||
from adapter.matrix.store import (
|
||||
add_staged_attachment,
|
||||
|
|
@ -746,6 +747,7 @@ async def main() -> None:
|
|||
await client.login(password=password, device_name="surfaces-bot")
|
||||
|
||||
since_token = await prepare_live_sync(client)
|
||||
await reconcile_startup_state(client, runtime)
|
||||
|
||||
bot = MatrixBot(client, runtime)
|
||||
client.add_event_callback(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue