From fe722fbb617f8e9f909c1eba979b94923ef17a3a Mon Sep 17 00:00:00 2001 From: alina sireneva Date: Tue, 31 Dec 2024 23:10:09 +0300 Subject: [PATCH] fix(core): remove type assertion from channels.readHistory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for some reason it returns false sometimes 🥴 closes #84 --- packages/core/src/highlevel/methods/messages/read-history.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/core/src/highlevel/methods/messages/read-history.ts b/packages/core/src/highlevel/methods/messages/read-history.ts index baec25ef..207d1935 100644 --- a/packages/core/src/highlevel/methods/messages/read-history.ts +++ b/packages/core/src/highlevel/methods/messages/read-history.ts @@ -1,6 +1,5 @@ import type { ITelegramClient } from '../../client.types.js' import type { InputPeerLike } from '../../types/index.js' -import { assertTrue } from '../../../utils/type-assertions.js' import { createDummyUpdate } from '../../updates/utils.js' import { isInputPeerChannel, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -53,13 +52,11 @@ export async function readHistory( } if (isInputPeerChannel(peer)) { - const r = await client.call({ + await client.call({ _: 'channels.readHistory', channel: toInputChannel(peer), maxId, }) - - assertTrue('channels.readHistory', r) } else { const res = await client.call({ _: 'messages.readHistory',