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

getting user name by user id #39

Open
Halvanhelv opened this issue Apr 5, 2020 · 0 comments
Open

getting user name by user id #39

Halvanhelv opened this issue Apr 5, 2020 · 0 comments

Comments

@Halvanhelv
Copy link

Halvanhelv commented Apr 5, 2020

I receive all incoming messages, but not user name, how can I get the user name in parallel with receiving the message

client.on(TD::Types::Update) do |update|
data = update.to_json
puts data
parse = JSON.parse(data)
puts "ID пользователя #{parse['last_message']['id']}"

puts " Кому отправили #{parse['last_message']['sender_user_id']}"
puts " Тип сообщения #{parse['last_message']['@type']}"

puts " Сообщение #{parse['last_message']['content']['text']['text'] }"
end

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

1 participant