Skip to content

What is the exact point of keyboardButtonTypeRequestUsers if it doesn't allow bot to get a reference to work with shared users #3267

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

Open
ng8weji9vowdv opened this issue Mar 8, 2025 · 7 comments

Comments

@ng8weji9vowdv
Copy link

No description provided.

@ng8weji9vowdv
Copy link
Author

Is it even expected? When I share a user with a bot using keyboardButtonTypeRequestUsers button, for example 10 of them, it received the updates 'messageUsersShared', but when I perform getUser on the received ids i get nothing, "common" table is empty as well

Image

so whats the exact point behind having that method? just to allow the bot print user id? @levlam
is it a bug or not?

@levlam
Copy link
Contributor

levlam commented Mar 8, 2025

Bots have access only to the user that contacted the bot in private. They are unable to write first to users and can do almost nothing with other users anyway. Bots can use the basic information about the users, as received in the message, or if the users use the bot, they can access they information.

@ng8weji9vowdv
Copy link
Author

Bots have access only to the user that contacted the bot in private. They are unable to write first to users and can do almost nothing with other users anyway. Bots can use the basic information about the users, as received in the message, or if the users use the bot, they can access they information.

do access hashes stay on server side? because I removed dialogs with bot and removed databases, after restart I still can acess the user info, im asking in case if id like to delete the database when it get bigger to not loose info about all users that have ever interacted with bot

@ng8weji9vowdv
Copy link
Author

@levlam i need answer because its unreliable to rely on something that's not presented neither in sqlite nor in tdbin files so do relations user - user stay on server or no?

@levlam
Copy link
Contributor

levlam commented Mar 10, 2025

Bots don't generally require the databases. The Bot API server https://github.com/tdlib/telegram-bot-api doesn't use databases at all.

@ng8weji9vowdv
Copy link
Author

Bots don't generally require the databases. The Bot API server https://github.com/tdlib/telegram-bot-api doesn't use databases at all.

ok so if my bot ever met a user 12345678 it can request getUser on it on any instance, is that right? i dont want to run into the situations where i make a request on a freshly empty server with bot token and it leads to non existent user

@levlam
Copy link
Contributor

levlam commented Mar 21, 2025

ok so if my bot ever met a user 12345678 it can request getUser on it on any instance, is that right?

No. The bot can access a user only if the user used the bot in a private chat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants