Commit graph

1057 commits

Author SHA1 Message Date
02a6a0e133
fix(core): proper exit cleanup in json file 2023-12-19 02:24:19 +03:00
8e07d7f552
fix(client): do not propagate Conversation updates 2023-12-19 00:13:30 +03:00
c278599612
feat(client): allow disabling updates manager 2023-12-19 00:08:10 +03:00
d56fb16fc1 v0.3.0 2023-12-18 11:51:40 +00:00
4f7fd24dd9
chore(core): expose init params in .params field 2023-12-16 20:00:31 +03:00
dfed3c2761
chore(core)!: disallow passing api id as string 2023-12-16 19:55:29 +03:00
7a0d8ecef2
chore(core): various improvements 2023-12-16 19:52:44 +03:00
886858d9de
refactor(client): isSelfPeer method 2023-12-16 19:10:59 +03:00
712c1e8348
fix(client): added true assertions to methods returning Bool 2023-12-16 19:00:13 +03:00
69f59ab97e
feat(client): openChat method 2023-12-16 02:54:06 +03:00
2728166727
refactor(client)!: extracted inline callback query into a separate update
breaking: `CallbackQuery` -> `CallbackQuery` and `InlineCallbackQuery`
also removed some redundant fields
2023-12-14 00:34:51 +03:00
e259701837
fix(client): new codegen issues with .run method 2023-12-13 23:02:04 +03:00
b261a661d2
chore(node): allow omitting input params 2023-12-13 21:43:46 +03:00
38358622e7
feat(core): allow passing rpc call options by proxy 2023-12-13 18:30:28 +03:00
1ce52d66ff
chore(client): reworked codegen, use prototype methods instead of fields 2023-12-13 18:29:54 +03:00
314bfa0fec
fix(core): export MemoryStorage 2023-12-13 17:19:10 +03:00
56c2085190
feat(core)!: future salts storage
breaking: `ITelegramStorage` interface changed
2023-12-12 00:23:34 +03:00
f4ee1f599f
chore(client)!: improved translate* methods
breaking: both methods now return `TextWithEntities`
2023-12-11 21:52:48 +03:00
987de6571a
feat(core): handle future salts 2023-12-11 06:15:31 +03:00
ee9e2e35c4
feat(client): sequential message sending 2023-12-11 01:55:58 +03:00
ce2d1b0a9a
fix(core): getState requests not scheduling properly 2023-12-11 01:03:19 +03:00
d1e4a15f81
feat(core): requests chaining 2023-12-11 00:07:41 +03:00
aaa2875fe1
fix(core): support opting out of -503 resending 2023-12-08 20:33:41 +03:00
b6fac0785c
fix(core): cleanly close connection on inactivity timeout 2023-12-08 06:31:17 +03:00
ce3cebff66
fix(tl): repalce %d in descriptions 2023-12-08 05:35:01 +03:00
8050f8c586
fix(client): use inputMessageCallbackQuery
levin said this has better rate-limits, who am i to judge
2023-12-08 04:36:00 +03:00
1cdb75a0a9
feat(client): accept online as schedule date 2023-12-06 20:15:51 +03:00
9ed587209c
fix(client): use quoteOffset for quotes 2023-12-04 23:37:44 +03:00
799fce4152 v0.2.3 2023-12-04 14:11:30 +00:00
e42a73fd07
fix(core): session exporting while on default dc 2023-12-04 16:28:25 +03:00
465da7aa9d v0.2.2 2023-12-04 12:58:37 +00:00
d4555f107e
fix(core): apparently re-export from tl
apparently due to some issue in vite `export *` from cjs module doesnt export shit
2023-12-04 15:40:17 +03:00
7a89e5049e
fix(client): save storage after each api call
idk might rollback later
2023-12-04 15:10:13 +03:00
2eb4d307cb
fix(client): fixed typings 2023-12-04 15:08:05 +03:00
78aae6ac78
test: sendText tests 2023-12-03 01:34:58 +03:00
cbf065af8d v0.2.1 2023-12-02 18:44:00 +00:00
389b3cfae0
fix(client): updateShortSentMessage handling
oops
2023-12-02 21:12:16 +03:00
e335a6cf10
fix: accept sync function in editMessageWith 2023-12-02 21:01:39 +03:00
72dd8f5b2c v0.2.0 2023-12-02 17:38:41 +00:00
895163c126
chore(client)!: renamed some peer utils
breaking: `normalizeToInput*` -> `toInput*`
2023-12-02 19:10:49 +03:00
8b2debb0aa
feat(client): support Story message media 2023-12-02 19:04:18 +03:00
893a15d111
chore(client)!: better parsed peer handling
breaking: anonymous sender is now represented with `AnonymousSender` interface and not `string`
2023-12-02 17:48:01 +03:00
9db9411c27
chore(client)!: improved replied-to message handling
breaking:
  - `MessageReplyInfo` renamed to `RepliedMessageInfo`
  - some types were changed
2023-12-02 07:56:13 +03:00
af34f1e5ca
chore(client)!: some MessageMedia fixes
breaking: `WebPage#type`: `web_page` -> `webpage` for consistency
2023-12-02 07:26:35 +03:00
e9d6cfc39d
feat(client): getMessageByLink method 2023-12-02 06:08:31 +03:00
0b2ae3aac6
fix: import compatibility with ts-node/esm
see https://github.com/TypeStrong/ts-node/issues/1934
2023-12-02 04:10:31 +03:00
392ff5ad2d
feat(client): getSimilarChannels method 2023-12-01 19:52:48 +03:00
4d27ca56d1
feat!: updated to layer 167
breaking:
 - `User#color`: type changed `number -> ChatColors`
 - `User#replyBackgroundEmojiId` removed (moved to `color.backgroundEmojiId`)
 - same for `Chat`
2023-12-01 17:29:36 +03:00
c42c629475
feat(client): allow implicit storage usage 2023-11-30 23:53:33 +03:00
93ddc6a58c
chore!: do not default to MemoryStorage 2023-11-30 22:57:10 +03:00
8214750055
chore: deprecated json-based storages 2023-11-30 22:40:38 +03:00
1f53923dfc
feat(core): indexeddb storage 2023-11-30 22:20:16 +03:00
b43070e3df
fix(client): wrong missing peer handling
im actually very dumb
2023-11-30 20:26:50 +03:00
8e548d2aa5
fix(sqlite): do not reset on destroy
am i actually retarded or something????
2023-11-30 01:27:51 +03:00
a36cdf1d20
test: run tests in browser 2023-11-30 00:20:37 +03:00
51e67a5113
fix(dispatcher): proper lifetime management for state storage 2023-11-27 14:58:48 +03:00
ec0865c746
fix(sqlite): reset before destroying
should fix client not closing properly
2023-11-27 14:55:27 +03:00
945872e2fd
fix(client): do not quote simple replies 2023-11-27 14:05:07 +03:00
ba3d02ac94
fix(tl): do not codegen for mtcute.* 2023-11-27 07:06:32 +03:00
b25f9dddfa
feat!: support min updates
breaking: changed `ITelegramStorage` interface, changed tl schema a bit
2023-11-27 06:33:32 +03:00
48411323af
fix(core): fixes for highload bots 2023-11-25 18:15:34 +03:00
bb31dc80b0
feat(dispatcher): CallbackQueryContext#editMessageWith 2023-11-23 22:12:00 +03:00
1dcbf277ef
feat(client): Message#textWithEntities 2023-11-23 22:11:23 +03:00
8249bd2ea4
feat(client)!: batched queries
breaking: getUsers may now return null
2023-11-23 19:11:00 +03:00
238ef7c826
test(dispatcher): some more tests 2023-11-19 22:53:39 +03:00
8965273172
test(dispatcher): some tests 2023-11-19 04:30:16 +03:00
2ef401a5c7 v0.1.3 2023-11-17 16:26:58 +00:00
6a47889cdb
fix(client): rollback: dont use access_hash=0 for bots
apparently it doesn't work well in some cases 🙄
2023-11-17 19:14:07 +03:00
77c46736da v0.1.2 2023-11-17 15:27:10 +00:00
0d3c18b885
fix(core): some dumb null checks 2023-11-17 18:09:35 +03:00
a0a22554cb
feat(tl): updated layer 166
gotta love telegram versioning
also made docs downloading faster
2023-11-17 17:26:45 +03:00
42c3b2c809
test(client): high-level methods and types tests 2023-11-17 00:17:03 +03:00
4a027d5498
test(client): test coverage for client utils 2023-11-16 02:42:02 +03:00
dbe5ff190e
fix(dispatcher): allow empty filter in callback data builder 2023-11-16 02:42:02 +03:00
71a3a05c9a
fix(create-bot): fixed no-linters template and dockerfile 2023-11-16 02:42:01 +03:00
007c98205d
fix(client): _parsedStatus is no longer inspectable 2023-11-16 02:42:01 +03:00
207dc5f15a
fix(client): false negatives in automatic forward detection 2023-11-16 02:42:01 +03:00
484149eae9
test(core): more tests! 2023-11-14 04:37:00 +03:00
13be8482e0
refactor: moved test utils to @mtcute/test 2023-11-13 20:14:32 +03:00
9d12b715c7
chore: moved most configs to .config 2023-11-13 13:28:11 +03:00
08d3afadd8
test(core): more transport tests 2023-11-13 10:43:56 +03:00
6e3394316e v0.1.1 2023-11-12 16:36:12 +00:00
ec1154fdef
build: fixed tl versioning + changelog generation 2023-11-12 19:19:02 +03:00
f525c12f83
fix: auth storage fixes
- .reset() no longer resets auth keys by default
- auth keys are stored immediately in sqlite
- update loop fixes for logout
- tests for sqlite storage

likely closes #13 (?)
2023-11-12 07:51:30 +03:00
38de001e8d
fix(docs): exclude test files from docs, also fixed build for crypto-node 2023-11-12 01:55:26 +03:00
8204dc86a4
chore: removed dispatcher dep from core (again), improved build script 2023-11-12 01:17:20 +03:00
964f47497c
chore(core): moved random to crypto provider, added tests for functions relying on rng 2023-11-12 00:36:00 +03:00
e31ecbd3d1
test(core): improved test coverage 2023-11-11 18:38:57 +03:00
59a4a7553f
test(tl-utils): improved test coverage 2023-11-09 21:03:52 +03:00
96a443f8d3
test: moved to vitest from mocha/chai
damn vitest is so good
2023-11-09 00:20:43 +03:00
1abf35e30c
feat: basic test utils 2023-11-08 17:28:45 +03:00
18178b438d
feat(wasm): added sha1/256 to wasm, removed most of async in crypto 2023-11-08 00:53:15 +03:00
70f4e40ef5
chore: embraced native bigints 2023-11-06 02:28:35 +03:00
1c60082d61
fix(wasm): fixed CC in makefile 2023-11-04 22:42:37 +03:00
0a7979a986
fix(wasm): added option for custom compiler in makefile
also rebuilt .wasm with appleclang
2023-11-04 20:52:46 +03:00
eec142f0e5
feat: wasm! 🚀 2023-11-04 06:44:18 +03:00
4c42304a79
build: extracted custom build config to packages themselves 2023-11-02 21:23:17 +03:00
e0f4b0d7b5
build(deps): removed @types/node and file-type 2023-11-02 19:40:14 +03:00
5e79dc32c5
feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
59c6ae4cbf v0.1.0 2023-11-01 19:56:23 +00:00
23a0e69942
refactor: no more parse modes! 2023-11-01 20:24:00 +03:00
cfa7e8ef5c
fix(template): new dispatcher api 2023-11-01 14:11:46 +03:00
871f161694
docs: updated packages readmes 2023-11-01 14:05:45 +03:00
958f7ff81c
ci: release building 2023-11-01 01:03:49 +03:00
103901ed21
build: use workspace:^ to link monorepo deps 2023-10-31 20:55:56 +03:00
e3682058df
chore: removed hard tl dependency for parsers 2023-10-31 13:12:12 +03:00
f31d93c365
fix: dont use regex to extract filename
closes #12
2023-10-30 21:40:51 +03:00
220b564d52
chore: set version to 0.1.0 2023-10-30 14:59:34 +03:00
73cd1e7dc9
docs: use @default jsdoc tag 2023-10-29 20:25:06 +03:00
0ef2eeb082
fix(dispatcher): reset state when entering another scene 2023-10-29 16:58:47 +03:00
fcab8a5882
fix(tl): cross-schema conflict resolution leading to missing references 2023-10-29 09:14:48 +03:00
137f1cc81b
fix: pnpm install
apparently im dumb
2023-10-29 08:35:44 +03:00
fc42dcb973
feat: updated to layer 166 2023-10-29 08:14:00 +03:00
49d9d5999d
fix: stop using tsconfig paths 2023-10-29 00:51:31 +03:00
fdec2b8621
fix: improved surface api 2023-10-29 00:48:37 +03:00
04c702dfd2
fix: improved downloadToFile API 2023-10-27 19:44:40 +03:00
9791f8faae
docs: updated typedoc, added ci, fixed some docs 2023-10-27 14:25:21 +03:00
528cc4dc92
fix(create-bot): git setup
also im retarded and forgot to include prettier in deps
2023-10-27 00:15:56 +03:00
52773a6cb5
fix(create-bot): added .env to gitignore 2023-10-26 23:58:39 +03:00
f3609fedca
fix: tests 2023-10-26 23:54:04 +03:00
4ac6e439a9
fix: various improvements 2023-10-26 22:23:25 +03:00
022481966b
refactor(dispatcher): improved surface api 2023-10-26 22:22:40 +03:00
c061581abb
chore: various surface api improvements & fixes 2023-10-24 11:49:17 +03:00
21d7488788
fix(core): allow empty startgroup parameter 2023-10-23 19:17:04 +03:00
3d7004fda5
fix: exports 2023-10-23 18:51:24 +03:00
969a0366d3
fix(create-bot): disabled import/named rule 2023-10-23 18:08:22 +03:00
343c925b72
fix(node): do not override .start() 2023-10-23 12:25:39 +03:00
d5d5615a4d
build(create-bot): fixed package building 2023-10-23 12:19:53 +03:00
f1bc6aff64
fix: ts 2023-10-23 11:45:17 +03:00
c3d954f334
fix(dispatcher): state fixes + better wizard interface 2023-10-23 11:43:24 +03:00
e86eddfb57
fix(create-bot): fix ts 2023-10-23 00:11:02 +03:00
0054491665
feat(core): helpers for deeplinks 2023-10-22 23:42:10 +03:00
92dddb75f1
feat: new package to automatically scaffold bots 2023-10-22 20:18:12 +03:00
15c855df84
fix: more fixes for web 2023-10-21 01:42:27 +03:00
dafe631435
fix: migrated to web streams 2023-10-20 00:41:47 +03:00
Alina Tumanova
f5976a2d74
ESM + end-to-end tests (#11)
* feat: moved tl-runtime to esm and native ArrayBuffers

* feat: migration to esm

* fix(core): web-related fixes

* test: finally, some good fucking e2e

* chore: fixed linters etc

* ci: added e2e to ci

* build(tl): fixed gen-code on node 20

* fix: codegen Uint8Array, not Buffer

never `git reset --hard` kids

* build: only do type-aware linting for `packages/*`

* build: ignore no-unresolved in ci for e2e

* fix: node 16 doesn't have subtle crypto apparently?

* fix(tests): use Uint8Array

for gods sake please can i just merge this already

* ci: don't parallel tasks in ci

because machines are utter garbage and it may just randomly break

* ci: pass secrets to e2e tests

* ci: separate cli command for ci

apparently im retarded

* fix: run codegen in e2e

im actually retarded

* ci: more fixes for e2e

* ci: debugging stuff

* ci: still debugging

* ci: hopefully fix ci???
2023-10-16 19:23:53 +03:00
01e5fbb95d
chore: fuck esm, all my homies hate esm
feel free to contribute though
2023-10-12 15:03:15 +03:00
b5c7a6b90d
chore: change license to MIT 2023-10-12 07:26:26 +03:00
0841cbb031
fix: errors codegen 2023-10-12 05:24:16 +03:00
0ca62ab375
fix: support new permissions in ChatPermissions 2023-10-12 04:50:47 +03:00
1ba366a12b
chore: extracted getters memoization into util 2023-10-12 04:43:50 +03:00
337418a34c feat: contexts 2023-10-11 08:42:37 +03:00
6629d91274 chore: remove remaining MaybeArray flex 2023-10-11 08:42:37 +03:00
3e5b2af7c0 feat: per-method disabling of no-dispatch 2023-10-11 08:42:37 +03:00
e01c876690 feat: accept high-level objects as inputs to methods 2023-10-11 08:42:37 +03:00
a03d73503a refactor: initial support for esm
also fixed all circular imports and added checking for them via dpdm
2023-10-11 08:42:37 +03:00
280a98f52a chore: re-thought method arguments
also dropped support for registration
2023-10-11 08:42:37 +03:00
a6726ccb40 build(deps): bumped prettier to 3.0.3 2023-10-11 08:42:37 +03:00
75021648eb
refactor: improved typings for MessageEntity 2023-10-06 04:53:19 +03:00
5600f292f7
fix: support more cases in chat-member-update 2023-10-06 03:45:34 +03:00
c7d82d41f0
feat: message groups 2023-10-06 01:47:45 +03:00
85ca3b4603
feat: abort signals 2023-10-05 18:10:15 +03:00
31b41c93fc
chore: extract MASK_POS
closes MTQ-43
2023-10-05 04:41:47 +03:00
74f3d53448
chore: removed eager-async-pool dependency
closes MTQ-76
2023-10-05 04:38:55 +03:00
ff75d40e78
docs: generate user/bot availability automagically
closes MTQ-85
2023-10-05 04:00:58 +03:00
ec55cb37f7
chore: export Long from core 2023-10-05 01:47:14 +03:00
e22db98444
fix: support no-dispatch index + option to disable it 2023-10-05 01:32:22 +03:00
2bde1c4f3e
feat: feature parity with botapi 6.9
well mostly, and assuming i didn't miss anything. closes MTQ-72
2023-10-04 23:34:55 +03:00
e7dc8f0ec7
feat: setEmojiStatus 2023-10-04 21:05:07 +03:00
15b76aab60
feat: more stories-related stuff
i forgor 💀
2023-10-04 20:50:57 +03:00
c13cb93b97
docs(threads): imroved HistoryReadUpdate docs 2023-10-04 19:31:00 +03:00
7abcc6188a
feat: stories and boosts
closes MTQ-51
2023-10-04 19:26:21 +03:00
62815d26d7
fix(tl): support multiple usages of the same flag 2023-10-04 02:45:11 +03:00
e4e51f7d90
docs: fixed nbsp handling, updated to layer 165 2023-10-03 19:34:12 +03:00
94a3c1631f
fix: bumped file_id version 2023-10-03 16:55:03 +03:00
1686c3f183
feat: history ttl
closes MTQ-86
2023-10-03 04:05:24 +03:00
6f7cda5544
feat: content protection aka noforwards
closes MTQ-84
2023-10-03 03:48:52 +03:00
efaba06102
feat: multiple usernames
closes MTQ-57
2023-10-03 03:23:23 +03:00
544e5a68dc
feat: opt-in error reporting 2023-10-03 02:49:53 +03:00
00f30a6495
feat: forums
closes MTQ-77
2023-10-03 00:58:45 +03:00
b2fccf4978
feat: better support for join requests 2023-10-02 19:54:11 +03:00
ea7eabf0be
feat: more non-iterable versions of methods 2023-10-02 18:00:00 +03:00
55c4f296fb
refactor: extract input reactions to InputReaction 2023-10-01 16:36:29 +03:00
95032d3b9a
feat: added ArrayPaginated 2023-09-29 21:45:11 +03:00
82994408a2
feat: refactor some iterable methods to have non-iterable counterpart 2023-09-29 17:02:36 +03:00
59ac74f300
refactor: moved makeInspectable to utils, also fixed ArrayWithTotal 2023-09-25 14:48:32 +03:00
dbcd3f0911
feat(tl): updated to 164 layer 2023-09-24 20:22:09 +03:00
6279126439
chore: remove some casts from filter 2023-09-24 04:26:28 +03:00
7a41950632
fix: use inputPeer in CallbackQuery#getMessage()
closes #7
2023-09-24 04:16:43 +03:00
5dcd965934
chore: add export * from core to client 2023-09-24 04:10:18 +03:00
7ff433ed0a
refactor: import tl from core/client, not tl 2023-09-24 03:37:34 +03:00
e771e592fd
feat: assertTypeIsNot
closes MTQ-64
2023-09-24 02:40:41 +03:00
befbceaf8a
chore: changed prettier width to 120 2023-09-24 01:32:22 +03:00
fbe264aab0
ci: moved type-aware linting to pre-commit and ci 2023-09-24 01:08:01 +03:00
976c25141c
refactor: move errors to core 2023-09-22 15:32:28 +03:00
6e8351ac01
refactor: extracted dispatcher filters into multiple files 2023-09-21 14:48:08 +03:00
a3ebd3fc66
fix(tl): ctors with primitive vectors are incorrectly marked as static-size 2023-09-21 14:46:44 +03:00
7a6a30ea5c
chore: export core utils from @mtcute/core/utils 2023-09-21 13:18:09 +03:00
85d2c5f305
fix: test fixes 2023-09-21 02:53:08 +03:00
b8f63b0634
feat(tl): static object size computation
closes MTQ-21
2023-09-20 18:37:26 +03:00
5a3b101c9f
chore: avoid using {}, use Maps instead 2023-09-19 01:33:47 +03:00
80d4c59c69
fix: lru map doesn't update links
closes #8
2023-09-18 19:40:09 +03:00
53b008f8bc
fix: support <tg-emoji> and tg-spoiler in html parser 2023-09-18 03:40:20 +03:00
7bf63b2507
fix: dont export everything on first connection 2023-09-18 03:16:29 +03:00
55edbde3e7
fix: fixed new error codegen 2023-09-07 22:26:52 +03:00
aa863c6a2f
chore: added no-console rule 2023-09-07 22:25:50 +03:00
4b7d7d2e35
refactor: reworked errors codegen 2023-09-06 23:54:51 +03:00
22d8b815d3
refactor: improved api of set-game-score function 2023-09-03 03:44:02 +03:00
81ce550604
chore: improved eslint config
closes MTQ-54
2023-09-03 02:37:51 +03:00
a679f364fd
fix: fixed upload and download for new networking 2023-08-23 23:49:47 +03:00
4a0d6fbc88
fix: fixed upload and download for new networking 2023-08-23 22:11:42 +03:00
85c43d804d
fix: client and updates fixes 2023-08-12 22:40:37 +03:00
2b1bac053e
feat: support for tmp_sessions 2023-08-12 18:26:46 +03:00
01d476d19a
feat: support for dc switches, session import/export, rpc sending 2023-08-11 23:59:24 +03:00
13c0a97a58
fix: rebase fixes 2023-07-24 00:14:37 +03:00
743058a020
fix: rebase fixes 2023-07-24 00:14:37 +03:00
eb585fc3f1
build: fixes after rebase 2023-07-24 00:14:37 +03:00
teidesu
0b4edbf70e
feat(core): update connection count and pfs usage on the go
holy shit i actually made it 🫣
2023-07-24 00:14:37 +03:00
teidesu
f68d83da06
feat(core): sync keys between connections, exclusive lock for auth
in other words, only one main connection does authorization, others wait
2023-07-24 00:14:37 +03:00
teidesu
bd5130c77b
fix(core): use existing auth_key from storage 2023-07-24 00:14:37 +03:00
teidesu
a23197df91
feat(core): (initial) support pfs 2023-07-24 00:14:37 +03:00
teidesu
c9a86c28f0
feat(core): support %h for non-buffer types in logger 2023-07-24 00:14:37 +03:00
teidesu
27d3058408
fix(core): destroy_session requests not being sent
i am actually retarded
2023-07-24 00:14:36 +03:00
teidesu
6eed69ad02
refactor: extracted auth key management to AuthKey class 2023-07-24 00:14:36 +03:00
teidesu
4f834afc6a
refactor: (initial) extracted connection management to NetworkManager 2023-07-24 00:14:29 +03:00
teidesu
76639d2993
fix(early-timer): rescheduling inside handler getting instantly reset 2023-07-24 00:13:44 +03:00
teidesu
4848c4e62d
refactor: extracted dc config management to separate class 2023-07-24 00:13:42 +03:00
6a2c5d90b7
fix: error on extra fields in TelegramClient#call + related fixes 2023-07-24 00:12:17 +03:00
6221a8716f
fix: handle vectors of primitives in rpc_result 2023-07-20 22:07:07 +03:00
99e83b40aa
feat(codegen): support bare types and vectors
closes MTQ-48
2023-07-20 20:22:57 +03:00
754a288c87
fix: fixes after layer bump 2023-07-20 19:01:34 +03:00
d3338f6614
fix: build fixes + updated to 160 schema 2023-07-20 17:51:24 +03:00
d88bc0ea60
chore: code quality improvements
improved eslint config, fixed linter issues, added husky
2023-06-05 00:30:48 +00:00
0471310382
chore: better dependencies management
updated and pinned dependencies
added validation for external deps conflicts
removed tl-reference
2023-06-04 17:00:33 +00:00
c591f96b81
fix: local floodwait handler fix
im actually retarded lmao
2023-06-04 16:04:46 +00:00
teidesu
8df099fcb8 feat: updated to layer 150 2022-12-07 14:13:24 +03:00
teidesu
b0055b791c fix(client): incorrect parsing of video stickers as video 2022-12-05 04:05:43 +03:00
teidesu
bc2ed98b14 refactor: use ??= for memoization 2022-10-30 22:24:07 +03:00
teidesu
70b09903f1 feat(client): support pre-checkout queries 2022-10-30 20:51:50 +03:00
teidesu
e75ac9fa5d feat(client): support invoices with extended media 2022-10-30 20:51:38 +03:00
teidesu
1935413aee fix(build): fixed delimiter in updates codegen conflicting with prettier 2022-10-30 20:37:52 +03:00
teidesu
f5986e694a refactor(client): moved parse-update.ts to types/updates 2022-10-30 20:36:17 +03:00
teidesu
7d10e65ecc fix: properly handle peers without access hash 2022-10-30 20:25:49 +03:00
teidesu
89fd8e8ef0 feat(tl): updated schema to 147 2022-10-30 18:49:55 +03:00
teidesu
71b39d6f53 feat(tl): generate diff file for simpler update flow
primarily for my own use
2022-10-30 18:38:31 +03:00
teidesu
416b3d9ef9 refactor: exported string session parsing/serialization to a module 2022-10-09 20:49:39 +03:00
teidesu
8adb79511f feat(tl): updated layer to 146 2022-09-28 00:42:21 +03:00
teidesu
d0ea4ed5ca refactor: changed stylizing of the name (MTCute -> mtcute) 2022-09-14 16:18:56 +03:00
teidesu
443786a35b build: fixed build for client and dispatcher packages 2022-09-12 19:50:39 +03:00
teidesu
bbd738f572 feat(i18n): added OtherLanguageWrapExhaustive for exhaustive other languages 2022-09-12 15:34:30 +03:00
teidesu
d4040a768f fix(i18n): enforce same arg types in OtherLanguageWrap 2022-09-12 15:28:45 +03:00
teidesu
b7d0b85a15 docs(i18n): improved docs 2022-09-12 15:01:43 +03:00
teidesu
4847523cc1 build: updated name in package.json
again. i am actually braindead
2022-09-12 14:50:43 +03:00
teidesu
b96c1407d0 feat(i18n): added pluralization helpers
also slight refactor of typings
2022-09-12 14:37:09 +03:00
teidesu
77bfef98d1 feat: updated to 145 layer 2022-09-12 13:54:33 +03:00
teidesu
597cb4f07b feat(i18n): exported default adapter 2022-08-29 18:57:00 +03:00
teidesu
5019d7b596 feat(i18n): removed immediate dependency on client to allow for outside usage 2022-08-29 18:54:43 +03:00
teidesu
689533c549 feat(i18n): allow custom adapters 2022-08-29 18:53:27 +03:00
teidesu
ea299cacca docs: improve documentation 2022-08-29 16:22:57 +03:00
teidesu
e7219ed2de refactor: normalizeToInput* now throws an error by itself, never returning null 2022-08-29 16:15:37 +03:00
teidesu
1cc3594f09 docs(tl-utils): documented everything 2022-08-29 14:33:11 +03:00
teidesu
7b7fdc7092 docs: removed typedoc-plugin-coverage
it works like shit
2022-08-28 17:56:56 +03:00
teidesu
7eb843dd20 feat(markdown-parser): added support for custom emojis 2022-08-25 20:17:33 +03:00
teidesu
34f783aa66 feat(html-parser): added support for custom emojis 2022-08-25 20:17:25 +03:00
teidesu
390b65f796 build(docs): api reference generation improvements
- added readme in each package
- updated typedoc, fixed related issues
- use @link instead of @see
- moved configs to typedoc.js, improved exclusion of unneeded stuff
- custom plugin for typedoc for cross-package references
- preparing to move documentation to separate repository
2022-08-24 23:37:26 +03:00
teidesu
b08ec342e5 feat(client): export customEmojiId in Sticker 2022-08-18 21:34:35 +03:00
teidesu
eaa517a5c3 feat(client): support custom emojis 2022-08-18 19:52:24 +03:00
teidesu
e39057bda5 fix(file-id): bumped version
todo: should we really enforce the version? tdlib uses current version from Version.h, but not every version there changes file id format (and v32 is fully compatible with v41 as far as im concerned)
2022-08-18 17:46:03 +03:00
teidesu
26b96c3151 refactor(tl-utils): export everything in index.ts 2022-08-12 20:11:27 +03:00
teidesu
16fdd5ded1 fix(tl): better {@link} generation from documentation 2022-08-12 17:46:04 +03:00
teidesu
9b027425dd fix(tl-utils): handle <br> 2022-08-12 17:22:40 +03:00
teidesu
be343b561e fix(tl-utils): do not break <a href 2022-08-12 17:13:24 +03:00
teidesu
ff58e3ee0d fix(tl-utils): do not make @link tags for primitives 2022-08-12 17:11:19 +03:00
teidesu
e3dbe3b7d1 fix(tl-utils): do not break @link tags 2022-08-12 17:00:02 +03:00
teidesu
b34a90ec30 build: updated layer to 144 2022-08-12 16:17:35 +03:00
teidesu
afb07534f9 feat(tl): added blogfork domain, auto-choose domain for docs 2022-08-12 16:16:44 +03:00
teidesu
8b6cde6db5 fix(client): made ChatJoinRequestUpdate inspectable 2022-08-02 03:48:18 +03:00
teidesu
537b7d0462 feat(core): support overwriting existing session with session strings 2022-07-31 08:01:40 +03:00
teidesu
2a97616d80 fix(codegen): fixed typings codegen, added a test 2022-07-23 05:03:38 +03:00
teidesu
ad29b2af17 fix(client): improved getHistory method
merged iterHistory into getHistory, improved pagination, offset support and other stuff
2022-07-23 02:22:20 +03:00
teidesu
b6f2f39906 fix(client): improved searchMessages method
use offsetId for pagination, expose minId/maxId/minDate/maxDate, threadId, offsetId
2022-07-23 01:29:36 +03:00
teidesu
0330efd4dc fix(i18n): support FormattedString
totally forgot about it
2022-07-19 03:11:08 +03:00
teidesu
ebe9786987 feat: i18n package 2022-07-19 02:47:59 +03:00
teidesu
a3aca20099 build: updated name in package.json files 2022-07-18 23:32:11 +03:00
teidesu
feac72e3ec feat(client): accept raw tl object for keyboard 2022-07-13 05:14:56 +03:00
teidesu
42c5d29167 fix(client): automatically derive gallery for inline result 2022-07-13 05:09:58 +03:00
teidesu
2c6238798f fix(client): remove explicit simple/non-simple webview type, change it automatically if needed 2022-07-13 04:53:29 +03:00
teidesu
2c54751029 fix(client): hopefully fix random MEDIA_EMPTY errors when editing inline 2022-07-10 01:38:23 +03:00
teidesu
715f4f8a68 fix(core): write buffers to log as trimmed base64 2022-07-10 01:11:24 +03:00
teidesu
61ca4130c8 fix(client): allow caption in every media type 2022-07-08 15:01:19 +03:00
teidesu
51280d6494 fix(client): accept formatted string in text inline msg builder 2022-07-04 16:36:51 +03:00
teidesu
e68c9f4bb5 refactor: prettier-ed code, rearranged imports, fixed tests 2022-06-30 16:32:56 +03:00
teidesu
f2eb033e91 fix(dispatcher): fix not dispatching to children
i dont fucking know why that code didn't work, i hate js
2022-06-30 16:24:13 +03:00
teidesu
fdcd9e0c5b fix(core): fixed orphan timer when multiple usable events are emitted 2022-06-30 15:56:58 +03:00
teidesu
1a60b39214 build: added script for bumping version with dependencies 2022-06-29 22:00:34 +03:00
teidesu
967c10b25c fix(core): never use ipv6 dc when not using ipv6 2022-06-28 23:13:56 +03:00
teidesu
a2dbccada6 fix(tl-utils): optimize readers code size by merging pre-return vars 2022-06-28 19:26:11 +03:00
teidesu
dd4cc471f6 fix(tl-utils): fixed reader codegen impl for non-zero-size fields between flags 2022-06-28 19:23:32 +03:00
teidesu
6978e159d7 feat(tl-utils): support flag for exposing raw flags in codegen 2022-06-28 18:57:22 +03:00
teidesu
16ffca23d2 fix(client): improve animated profile picture support, fixed related bugs 2022-06-27 16:23:02 +03:00
teidesu
8822de2e1f fix(client): pass params for forward caption, also codegen-ed client 2022-06-21 21:07:54 +03:00
teidesu
11d91c1f55 feat(client): support sending as peer 2022-06-21 21:05:27 +03:00
teidesu
1be12d9917 feat(client): support noforward flag when sending 2022-06-21 20:59:25 +03:00
teidesu
7d71728868 feat(client): support forwarding withot author/caption 2022-06-21 20:56:45 +03:00
teidesu
0396710b18 feat(client): improve support for premium stickers and video thumbnails 2022-06-21 20:53:57 +03:00
teidesu
1ac0cd8530 feat(client): expose info about premium users and media 2022-06-20 01:51:07 +03:00
teidesu
2c3529870a feat(client): updated to layer 143
also fixed some minor bugs
2022-06-18 22:47:31 +03:00
teidesu
a864eacfd4 feat(core): added keylen and algo in pbkdf2 (attempt 2, i am retarded) 2022-06-12 19:29:38 +03:00
teidesu
e98b8f8855 feat(core): added keylen and algo in pbkdf2 2022-06-12 19:26:24 +03:00
teidesu
ae07583161 feat(core): added mtproto v1 message key derivation 2022-06-11 18:51:47 +03:00
teidesu
0e40b4a5f7 fix(client): fixed kickChatMember
i fucking love telegram serverside race conditions
2022-06-07 19:40:42 +03:00
teidesu
e1326a5cf1 fix(client): added missing <any> for formatted strings 2022-06-07 19:02:21 +03:00
teidesu
cd88a3a74a feat(parser): automatically escape attributes in template strings 2022-06-05 23:53:59 +03:00
teidesu
1cce5c79a2 feat(parser): support conditionals in template strings 2022-06-05 23:23:26 +03:00
teidesu
e0d1102408 fix(tl): bumped minor version 2022-06-05 23:05:15 +03:00
teidesu
02462dac16 fix(tl): correctly process vector<bytes>
fml why am i even doing this
2022-06-05 21:36:12 +03:00
teidesu
fa8ed6da10 fix(core): ignore duplicate messages 2022-05-18 13:04:40 +03:00
teidesu
0633d0a817 fix(dispatcher): handlers without filters 2022-05-14 21:38:41 +03:00
teidesu
e1dab9a195 build: fixed deps 2022-05-14 21:37:48 +03:00
teidesu
9034810ccd tl: updated to layer 142 2022-05-14 20:30:36 +03:00
teidesu
9039830572 feat(client): support reactions 2022-05-12 10:09:37 +03:00
teidesu
96300a795e fix(core): removed unnecessary import 2022-05-11 13:17:39 +03:00
teidesu
0a217108ba feat(client): added get() method in PeersIndex 2022-05-11 13:17:23 +03:00
teidesu
3b15c66fc3 fix(client): fixed inspecting buffers
i may actually be retarded
2022-05-11 11:50:09 +03:00
teidesu
b4beeba33c feat(client): support user profile button
this one does not automatically do resolvePeer because i'm too lazy to make an intermediate type just for this type of buttons. once there are more of them, maybe i will...
2022-05-09 17:32:42 +03:00
teidesu
63d0ea2ddf feat(client): support join requests 2022-05-09 17:25:38 +03:00
teidesu
4f0f16e4a4 fix(tl): improved documentation downloader
- fixed invalid {@link} directives
- fixed underscored parameters being transformed
- fixed using raw layer number (instead of actual)
2022-05-09 17:18:18 +03:00
teidesu
be27e33d61 feat(client): support new invite links (t.me/+) 2022-05-09 00:20:32 +03:00
teidesu
a0bfe2c075 feat(client): support get/setBotMenuButton methods 2022-05-09 00:00:22 +03:00
teidesu
d41bec9c73 feat(client): support setBot*DefaultAdminRights methods 2022-05-08 23:34:28 +03:00
teidesu
a10221533c feat(client): helper for webview keyboard buttons 2022-05-06 23:50:21 +03:00
teidesu
e187f8697e feat(filters): filter by sticker type 2022-05-06 20:02:54 +03:00
teidesu
daff3e62a0 feat(client): support webm stickers 2022-05-06 20:00:15 +03:00
teidesu
9543f64558 feat(client): sticker choosing typing event
also prettier fucked everything up, fixed that
2022-05-06 17:53:44 +03:00
teidesu
252f94a594 fix(dispatcher): implemented userId filter
it got commented out when migrating to 64-bit ids, then i moved to using native numbers for them and forgot to update the filter
2022-05-06 13:56:15 +03:00
teidesu
a7e866f3eb refactor: assertNever util, use it in most places
haven't used it in some just yet because not everything is implemented (particularly, newer attachment types, typings, admin events, etc.)
2022-05-06 13:50:30 +03:00
teidesu
ffafb3e5db build: improved publish script, fixed imports/exports, added note about private repo 2022-05-06 13:23:29 +03:00
teidesu
e02763dcdd fix(client): fixed usage of FormattedString type 2022-05-06 00:47:26 +03:00
teidesu
1ef1c0669d feat(parse-mode): support spoiler entity 2022-05-06 00:40:47 +03:00
teidesu
05be58f903 fix(html): fixed un-parsing 2022-05-06 00:36:54 +03:00
teidesu
d8111ea525 feat(parse-mode): compile-time formatted string compatibility check 2022-05-06 00:11:28 +03:00
teidesu
28baf50958 feat(html): big rework, process html similar to browsers 2022-05-06 00:05:21 +03:00
teidesu
d031388ea2 fix(build): fixed imports, bumped typescript 2022-05-05 20:08:38 +03:00
teidesu
2b0af79fb3 feat(client): added non-working translation methods 2022-04-29 17:54:11 +03:00
teidesu
d0218ece42 fix(client): fixed codegen for new ts 2022-04-29 17:32:07 +03:00
teidesu
44e6ffd368 fix(tl): insert true flags after flags field, support multiple flags fields, updated tests 2022-04-29 16:36:41 +03:00
teidesu
916c41e70c build(codegen): refactored reader codegen (removed the need in additional object), added tests for multiple flags fields
i honestly don't know why i did what i did, it's such an over-complication, lol.
2022-04-29 16:13:07 +03:00
teidesu
a1ea1315df tl: updated to layer 140 2022-04-28 17:23:44 +03:00
teidesu
2289cc690d build: migrated to pnpm, updated and cleaned up deps 2022-04-28 16:58:09 +03:00
teidesu
9493759572 build: updated to layer 139
didn't add any new layers' features, only bumped layer
2022-04-01 22:17:10 +03:00
teidesu
ec736f8590 some changes
i've been wanting to name a commit like this for my entire life, lol. seriously though, a lot has changed:
 - extracted TL-related stuff to `@mtcute/tl-utils` and `@mtcute/tl-runtime`, rewrote codegen in TS
 - updated to layer 134, moved to int64 identifiers
 - rewritten networking (mtproto), rewritten updates handling
 - *lots* of refactoring

 still a very early version though, there are a lot of improvements to be made, but at least it runs, lol

 also tl-reference will not be updated anytime soon because i want to rewrite it
2021-11-23 00:03:59 +03:00
teidesu
a834fbfa8d refactor(core): moved to PollardRhoBrent for PQ factorization (thanks @mytecor!)
also removed leemon from deps since it's no longer used
2021-09-23 23:11:43 +03:00
teidesu
49eda8f0e3 fix(core): fix bare types and mt_message writing 2021-08-19 23:09:44 +03:00
teidesu
9b5ca0cb2a refactor: improved logging, moved to custom logger instead of debug 2021-08-14 12:57:26 +03:00
teidesu
64aae43572 fix(core): support caching peers from array results 2021-08-14 12:37:22 +03:00
teidesu
4b22ee5b25 rename back to mtcute
idk lol
2021-08-05 20:38:24 +03:00
teidesu
b7751f0a57 fix: various fixes, improved updates handing 2021-08-05 20:14:19 +03:00
teidesu
8504e3bf14 fix(client): fixed qts fetching and storing 2021-08-05 14:23:51 +03:00
teidesu
42d7a2286c fix(core): do not save storage after caching peers 2021-08-05 14:23:18 +03:00
teidesu
6be71c3572 feat(client): support updateBotStopped 2021-08-04 13:23:39 +03:00
teidesu
c943391e15 fix(client): update local pts/qts before dispatching the update 2021-08-04 13:16:08 +03:00
teidesu
a3cf0c526a fix(client): reworked updates, added support for qts 2021-08-04 12:58:57 +03:00
teidesu
781384cb86 fix(sqlite): removed unique idx on phone, optimized queries 2021-08-04 12:58:17 +03:00
teidesu
860a0e623f fix(client): fixed online status for bots 2021-08-04 12:56:35 +03:00
teidesu
37398d1080 fix(client): file: prefix in fileName attribute 2021-08-02 14:46:12 +03:00
teidesu
852af9ffab fix(mtproxy): fixed types 2021-07-30 17:47:21 +03:00
teidesu
a8d3543e64 build: preparing for publish, moved to strict typescript, fixed some stuff 2021-07-30 17:40:50 +03:00
teidesu
1cf9929e3f fix(core): fixed test servers, fixed tests, slight refactor 2021-07-27 15:32:18 +03:00
teidesu
d4f07aa07c feat(tl): added types for reactions, also added ability to augment schema from file 2021-07-25 23:19:12 +03:00
teidesu
2f1c8548a0 build: renamed to mtqt 2021-07-25 21:03:40 +03:00
teidesu
7775ff4eaa feat(client): replyToThreadId field for Message 2021-07-25 21:01:38 +03:00
teidesu
7f112f51a2 fix(core): updated for newer mtproto schema 2021-07-25 15:44:55 +03:00
teidesu
cc8c974e23 feat(client): getDiscussionMessage method 2021-07-25 14:00:51 +03:00
teidesu
b03e2f4f0b fix(tl): updated schema
god i love when telegram changes schema in a backwards-incompatible way and doesn't change layer number because they dont give a slightest fuck on third party mtproto implementations
2021-07-24 23:21:52 +03:00
teidesu
87de39a6fb fix(client): gallery defaults to true for answerInlineQuery 2021-07-24 22:43:14 +03:00
teidesu
f3e7de5c8c feat(core): override layer number 2021-07-24 17:00:20 +03:00
teidesu
cb2df91187 fix(client): optional params in sendCopy 2021-07-23 23:09:32 +03:00
teidesu
abe6cef377 fix(html): added htm alias for prettier users 2021-07-23 23:03:03 +03:00
teidesu
0525a59ab3 fix(client): better inspection of buffers 2021-07-22 01:54:00 +03:00
teidesu
4b417afd81 feat(client): isValidSticker field 2021-07-22 01:47:06 +03:00
teidesu
4c717ffc63 fix(voice): proper handling of waveforms 2021-07-22 01:46:31 +03:00
teidesu
96d133dd2f fix(markdown): proper handling of non-link [] groups 2021-07-20 03:26:00 +03:00
teidesu
3b523598ad build: changed license to lgplv3 2021-07-19 03:57:47 +03:00
teidesu
8c62b56acc fix(node): cli input for start() method, not run() 2021-07-18 22:08:50 +03:00
teidesu
199e0a2a7d fix(dispatcher): adding raw handlers
removed from codegen and forgot to add in code, i'm dumb 🤷
2021-07-17 19:08:13 +03:00
teidesu
aa09262aae fix(client): proper handling of last messages 2021-07-17 18:46:42 +03:00
teidesu
627fdbed2f refactor(dispatcher): big refactor, moved updates parsing to client, separated raw updates from parsed, moved Conversation to client package 2021-07-17 17:26:31 +03:00
teidesu
8fb099cfeb fix(core): proper browser support
not much really, fixed exports for webpack, fixed binary mode for websocket
2021-07-16 04:31:04 +03:00
teidesu
5b9ddc1f7b refactor(dispatcher): UpdateInfo<...> to ParsedUpdate 2021-07-14 22:34:03 +03:00
teidesu
6d8c7fee78 refactor: less obscure transport names 2021-07-14 21:08:13 +03:00
teidesu
c8c0b4a320 fix(client): export defaultDcs 2021-07-14 20:58:27 +03:00
teidesu
a7f7e245d8 fix(node): changed default session file name 2021-07-14 16:35:53 +03:00
teidesu
244948149a fix(tl): updated errors 2021-07-14 16:34:33 +03:00
teidesu
0a39d8a2d5 fix(client): fixed imports 2021-07-14 16:34:15 +03:00
teidesu
3fcdd03877 feat(dispatcher): lastMessage and lastReceivedMessage getters for Conversation 2021-07-10 16:12:31 +03:00
teidesu
66e623f21d docs(dispatcher): improved docs for Conversation 2021-07-10 16:05:20 +03:00
teidesu
b9b2b9f6ba feat(dispatcher): Conversation class 2021-07-10 15:10:43 +03:00
teidesu
2f8b3472d1 feat(client): deleteScheduledMessages method 2021-07-10 15:00:40 +03:00
teidesu
ca1e5c9efa feat(client): sendScheduled and getScheduledMessages methods 2021-07-10 01:19:59 +03:00
teidesu
a33548e790 fix(client): correct sending of newly uploaded files in media groups 2021-07-10 01:09:49 +03:00
teidesu
b38f2cd6ae fix(client): hide inputPhoto from inspection 2021-07-10 00:54:43 +03:00
teidesu
6acb638c6a fix(client): correct handling of multiple peers in getPeerDialog
i swear it worked. idk how.
2021-07-09 23:34:46 +03:00
teidesu
300f10074a feat(client): getPeerDialogs method 2021-07-09 22:50:04 +03:00
teidesu
77d597e4db feat(dispatcher): history read update
also fixed imports/exports
2021-07-09 19:41:02 +03:00
teidesu
817eb3aa8d fix(client): mention and permanentMention now return formatted string with parse mode
also slightly improved docs on permanentMention
2021-07-09 17:00:45 +03:00
teidesu
d611f91f19 feat: parse mode template literals override default/passed parse mode 2021-07-09 16:39:45 +03:00
teidesu
be8ffe5b5b feat(dispatcher): text-related filters (equals, contains, starts/ends with) 2021-07-09 01:50:39 +03:00
teidesu
c33646943c fix(dispatcher): middleware and event emitter related fixes 2021-07-09 01:49:53 +03:00
teidesu
28c70a89ba fix(client): correct handling of pts in updateShortSentMessage
i am fucking stupid and can't read my own code
2021-07-09 01:46:37 +03:00
teidesu
967de3391d fix(client): fixed media-related bound methods, added method for sending media groups 2021-07-08 17:22:18 +03:00