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

Get User-Information in a better way...? #1

Open
riyuk opened this issue Jul 17, 2018 · 1 comment
Open

Get User-Information in a better way...? #1

riyuk opened this issue Jul 17, 2018 · 1 comment

Comments

@riyuk
Copy link

riyuk commented Jul 17, 2018

Hi.
Great work so far.

It works pretty well. There's one problem. Currently the getUser() function returns an empty user.
If I want to work in Line with Groups where I can have a group-admin (who actually "controls" the bot) it would be great to get the UserId in a better way.
Currently I use (within a $bot->hears):

$payload = collect($bot->getMessage()->getPayload());
$events = current($payload->get('events'));
$userId = $events['source']['userId'];
$eventType = $events['source']['type'];

I've not seen a better solution for now...?

@gundamew
Copy link
Owner

Thank you for reporting this issue. And sorry for the late reply.

I have not finished this driver yet. The method LineDriver::getUser returns an empty user as placeholder for now. I will implement it ASAP.

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