Skip to content

Remove legacy dialog-cache seeding (refreshChannelsFromDialogs) and the auth/sync conflation #51

Description

@kfastov

Two likely-legacy bits to investigate/remove:

  • Dialog-cache seeding. seedArchiveInBackground() (mcp-server.js) calls messageSyncService.refreshChannelsFromDialogs()telegramClient.listDialogs(0), iterating ALL dialogs (1358 on a large account) and upserting them into a channels registry at startup. It's slow on large accounts (it was the cold-start culprit, now backgrounded). Is this cache still needed? The archive already stores + watches dialogs, and ops fetch dialogs live. Investigate dropping it (rely on archive + live), or making it incremental/on-demand.
  • auth/sync conflation. auth --follow (plus auth's --idle-exit / --download-media) makes auth run a sync worker after login — conflating authentication with syncing. Auth should only log in + write the session (bootstrap); syncing is the server's job. Remove auth --follow and the auth-time sync.

Refs: mcp-server.js (seedArchiveInBackground), message-sync-service.js (refreshChannelsFromDialogs/listDialogs), cli.js (auth). Ties into the writer-consolidation (#45 Step 2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions