Skip to content

Global message search across all chats (messages.searchGlobal) #29

@kfastov

Description

@kfastov

Problem

messages search without --chat only searches the local archive. There's no way to search across all joined chats for a specific text.

This makes it impossible to find which chat a message came from if you don't already know the chat ID.

Repro

# Search for a known message text without specifying chat
tgcli messages search --query "some unique phrase" --json
# → {"source": "archive", "returned": 0, "messages": []}

# Live search requires --chat
tgcli messages search --query "some unique phrase" --source live --json
# → error: --chat is required for live search

Use case

Agent needs to find a group by a quoted message from it. Without knowing the chat ID, there's no way to locate it.

Telegram API supports messages.searchGlobal which searches across all dialogs — this would solve the problem.

Expected

tgcli messages search --query "some unique phrase" --source live --json
# → returns matches from any chat, with channelId included

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