readHistory: type assertion #84

Closed
opened 2024-12-27 20:25:25 +03:00 by vanodevium · 2 comments
vanodevium commented 2024-12-27 20:25:25 +03:00 (Migrated from github.com)

My is dead simple:

await tg.readHistory(message.chat);

But in the console more and more messages like:

| MtTypeAssertionError: Type assertion error at channels.readHistory: expected true, but got false
|     at assertTrue (file:///app/node_modules/@mtcute/core/utils/type-assertions.js:27:11)
|     at readHistory (file:///app/node_modules/@mtcute/core/highlevel/methods/messages/read-history.js:27:5)
|     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|     at async Object.newMessageHandler [as callback] (file:///app/handlers/client/new-messages.js:26:5)
|     at async Dispatcher._dispatchUpdateNowImpl (file:///app/node_modules/@mtcute/dispatcher/dispatcher.js:286:26) {
|   context: 'channels.readHistory',
|   expected: 'true',
|   actual: 'false'
| }

It shows this warning in docker alpine container, macOS, anywhere.

Please give me advice how I can fix it.

My is dead simple: ```js await tg.readHistory(message.chat); ``` But in the console more and more messages like: ``` | MtTypeAssertionError: Type assertion error at channels.readHistory: expected true, but got false | at assertTrue (file:///app/node_modules/@mtcute/core/utils/type-assertions.js:27:11) | at readHistory (file:///app/node_modules/@mtcute/core/highlevel/methods/messages/read-history.js:27:5) | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) | at async Object.newMessageHandler [as callback] (file:///app/handlers/client/new-messages.js:26:5) | at async Dispatcher._dispatchUpdateNowImpl (file:///app/node_modules/@mtcute/dispatcher/dispatcher.js:286:26) { | context: 'channels.readHistory', | expected: 'true', | actual: 'false' | } ``` It shows this warning in docker alpine container, macOS, anywhere. Please give me advice how I can fix it.
teidesu commented 2024-12-30 21:08:08 +03:00 (Migrated from github.com)

does the history actually get read?

does the history actually get read?
vanodevium commented 2024-12-31 08:39:30 +03:00 (Migrated from github.com)

Looks like yes, every time actually read. But with warning.

Looks like yes, every time actually read. But with warning.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: teidesu/mtcute#84
No description provided.