Skip to content

Conversation

@McBrick
Copy link

@McBrick McBrick commented Dec 23, 2016

use first_name for fromUsername if username is undefined

use first_name for fromUsername if username is undefined

const type = keys.pop();
const fromUsername = item.message.from.username;
const fromUsername = typeof(item.message.from.username) === 'undefined' ? item.message.from.first_name : item.message.from.username;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Identifier 'first_name' is not in camel case.

@benjick
Copy link
Owner

benjick commented Dec 23, 2016

@shrmnk This looks good to me

@NickBusey
Copy link
Contributor

@benjick I just ran into this bug. Any chance on getting it merged?

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

Successfully merging this pull request may close these issues.

4 participants