Skip to content

sync jobs: message_count stays 0 and peer_title shows "Unknown" after successful sync #25

@kfastov

Description

@kfastov

Problem

After adding a sync job and running sync --once, messages are actually downloaded (visible via messages list --source archive), but the job status shows message_count: 0 and peer_title: "Unknown".

Repro

# Add sync job for a forum supergroup
tgcli sync jobs add --chat <supergroup-id> --depth 5000 --json
# → status: pending, message_count: 0

# Run sync
tgcli sync --once

# Check job status
tgcli sync jobs list --json
# → status: in_progress, message_count: 0, peer_title: "Unknown"

# But messages ARE there
tgcli messages list --chat <supergroup-id> --source archive --limit 5 --json
# → returns 5 messages

Expected

  • message_count should reflect actual archived messages
  • peer_title should resolve from cache (other commands like channels show resolve it fine)
  • Clear distinction between "actively syncing" vs "completed a batch but has more to go" vs "done"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions