Skip to content

Inconsistent peer ID format between channels list and other commands #24

@kfastov

Description

@kfastov

Problem

channels list returns bare numeric IDs (e.g. 1234567890), but all other commands (messages list/search, topics list, sync jobs add, etc.) require the full prefixed format (-100XXXXXXXXXX).

Repro

# Get channel ID from list
tgcli channels list --json | jq '.[0].id'
# → "1234567890"

# Try to use it
tgcli messages list --chat 1234567890 --source live --limit 5
# → error: Peer not found in local cache

# Have to guess the -100 prefix
tgcli messages list --chat -1001234567890 --source live --limit 5
# → works

Expected

Either:

  1. channels list returns the full prefixed ID that works everywhere, or
  2. All commands accept both formats and normalize internally

Option 2 is more robust — the user shouldn't need to know about Telegram's internal ID prefixing scheme.

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