8000 updateNewChat is emitting random chats that I'm not receiving · Issue #160 · eilvelia/tdl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
updateNewChat is emitting random chats that I'm not receiving #160
Open
@lexermekongnet

Description

@lexermekongnet

`
import dotenv from "dotenv";
import * as tdl from 'tdl';
import { getTdjson } from 'prebuilt-tdlib';
dotenv.config();

const TELEGRAM_API_ID = process.env.TELEGRAM_API_ID ?? '0';
const TELEGRAM_API_HASH = process.env.TELEGRAM_API_HASH ?? '';
const TELEGRAM_PHONE = process.env.TELEGRAM_PHONE ?? '';

tdl.configure({ tdjson: getTdjson() })
const client = tdl.createClient({
apiId: parseInt(TELEGRAM_API_ID), // Your api_id
apiHash: TELEGRAM_API_HASH // Your api_hash

})

client.on('error', console.error)

client.on('update', async update => {
const { _ } = update
if (_ === 'updateNewChat') {
const { id, title } = update.chat
console.log(id, title)
}
})

export async function startTelegramClient() {
await client.login({ getPhoneNumber: async () => TELEGRAM_PHONE })
}
`

as the title suggest I am receiving updateNewChats but of random people who's not chatting with me

Metadata

Metadata

Assignees

No one assigned

    Labels

    TDLib issueThe issue is related to TDLib (or Telegram) itself, not to the tdl bindings.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0