You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tg send takes an unknown positive ID as a basic group #47
Found while fixing #18. A positive number that the cache doesn't know as a user, a private chat or a 0.2.0 group or channel ID becomes basic group N in resolveUncachedId (src/commands/send/peer-resolver.ts), unless it has 10 or more digits (then it is a phone number). Every tg command now prints basic groups as -N, and a positive marked ID is a user, so tg send --to 4242 with an uncached user ID or a typo sends to basic group 4242 or fails with PEER_ID_INVALID.
Fix: take an uncached positive number as a user ID (with access hash 0, as for a known user without one), or fail with INVALID_ARGS and suggest -N for a basic group. Update docs/api-design.md and docs/cli-commands.md.
Done when unit tests show resolvePeer('4242') with an empty cache doesn't build inputPeerChat, and -4242 still does.
Activity
fix(send): resolve a bare chat row from an older binary as that chat
fix(send): take an unknown positive ID as a user, not a basic group
docs: add the changelog entries for the 0.4.0 bug fixes
test(send): keep one owner per send and message content contract