Fixed
tg messages search --chat mesearches Saved Messages and--sender mefinds your own
messages:me(any case) is the account's own user ID, read from the account without a
Telegram call. Before, both returned nothing and still succeeded. When the account doesn't
know its user ID yet,meisINVALID_ARGS(exit 3) with a hint to runtg meonce. A
--chator--sendervalue that is neither an ID, a username norme(a typo such as
12abc) isINVALID_ARGSnaming the flag, instead of an empty success.tg apitypes its arguments by the method's TL schema, so the documented examples work:
tg api messages.getHistory --peer me --limit 1and
tg api messages.sendMessage --json '{"peer":"@user","message":"Hi"}'failed with
Unknown object undefined. A chat given as a string or number where the method takes an
InputPeer, InputUser or InputChannel (peer,idofusers.getFullUser,channel…)
resolves liketg send --to(me,@username,+phone, a marked ID; cache first); a long
given as a number or decimal string becomes a Long (before,--hash 123went out as 0); a
required int or long left out is 0 (offsetId,maxId,hash…), a requiredrandomIdis
random and a requiredoffsetPeerisinputPeerEmpty. A chat of the wrong kind (a group as
a user) isINVALID_ARGS. Full TL objects go as before.