-
Notifications
You must be signed in to change notification settings - Fork 41
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
User's username is nearly always empty #85
Comments
Hi @DayJun, it seems like the issue was: ctx.EffectiveUser() was referring to the logged in account sometimes, and maybe your logged in account didn't have a username. Can you check if it is fixed now? |
I found that the channel id i got from update can't be used to call
And then, I got a new problem. Sometimes when I call So, is it normal that Username field is empty in user which is get from update? And is it normal that the channel's access hash is not the real one and the message id may be wrong? |
Referencing issue [celestix#85](celestix#85). The problem arises because Go maps are unordered, and `getDifferent` is called before `fillUserIdFromMessage`. This sequence can lead to an incorrect `userId` being assigned to `Update.userId` due to inconsistent entity processing. Ensuring proper order of operations will resolve this.
Using
u.EffectiveUser()
to get a user, but username is nearly always emptyI tried to use
client.API().UsersGetFullUser
to get user, but it failed withrpcDoRequest: rpc error code 400: USER_ID_INVALID
How to get user's username in channel or group?
This confused me many days
The text was updated successfully, but these errors were encountered: