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

Can not get User structure for some users #279

Closed
laomms opened this issue Aug 24, 2024 · 2 comments
Closed

Can not get User structure for some users #279

laomms opened this issue Aug 24, 2024 · 2 comments
Labels
telegram api Questions about Telegram API should be asked on StackOverflow

Comments

@laomms
Copy link

laomms commented Aug 24, 2024

When I receive a greeting from a new user, most of them can get the user structure by: Users.TryGetValue(peerUser.user_id, out var user),
but some new users cannot get the user structure, I try use

var inputPeer = new InputUserFromMessage
{
    user_id = unm.message.Peer.ID,
    peer = new InputPeerUser(unm.message.Peer.ID, user.access_hash),
    msg_id = unm.message.ID
};

But since I can't get the user structure, I can't get user's access_hash, I try use 0 repalce, but can not send message to this user by await _client.SendMessageAsync(inputPeer.peer, "hello").
How should I respond to users like this?
I can't add them to my contacts with _client.Contacts_AddContact(...) too, but I can add them with a manual click on the telegram client.

@wiz0u
Copy link
Owner

wiz0u commented Aug 24, 2024

@wiz0u wiz0u added the telegram api Questions about Telegram API should be asked on StackOverflow label Aug 24, 2024
Copy link

Please note that Github issues should be used only for problems with the library code itself.

For questions about Telegram API usage, you can search the API official documentation and the full list of methods.
WTelegramClient covers 100% of the API and let you do anything you can do in an official client.

If the above links didn't answer your problem, click here to ask your question on StackOverflow so the whole community can help and benefit.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
telegram api Questions about Telegram API should be asked on StackOverflow
Projects
None yet
Development

No branches or pull requests

2 participants