Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateNewChat is emitting random chats that I'm not receiving #160

Open
lexermekongnet opened this issue Jun 21, 2024 · 0 comments
Open
Labels
TDLib issue The issue is related to TDLib (or Telegram) itself, not to the tdl bindings.

Comments

@lexermekongnet
Copy link

`
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

@eilvelia eilvelia added the TDLib issue The issue is related to TDLib (or Telegram) itself, not to the tdl bindings. label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TDLib issue The issue is related to TDLib (or Telegram) itself, not to the tdl bindings.
Projects
None yet
Development

No branches or pull requests

2 participants