Skip to content

exception: first_name is empty! #250

@MBoretto

Description

@MBoretto

This update:
{"update_id":632831207,"message":{"message_id":13069,"from":{"id":11487,"first_name":"Name","last_name":"it","username":"it"},"chat":{"id":-10000000000,"title":"chatname","type":"supergroup"},"date":1463284673,"left_chat_participant":{"id":195958188,"first_name":""},"left_chat_member":{"id":195958188,"first_name":""}}}
trown:

exception 'Longman\TelegramBot\Exception\TelegramException' with message 'first_name is empty!' in /data/grocerylist/vendor/mboretto/php-telegram-bot/src/Entities/User.php:38

This is due to the empty name in left_chat_member and left_chat_participant
I was thinking to remove the is_empty check and just leave the isset one here:

https://github.com/akalongman/php-telegram-bot/blob/master/src/Entities/User.php#L37

@jacklul @noplanman what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions