Skip to content

User message sending error #12

@simonevann

Description

@simonevann

Sometimes users have not filled in the last_name and username attributes, so Telegram passes a None value.
This leads to an error in the media_handlers.py file starting from line 65.

        new_message_data = cls(
            message_id=message.id,
            user_info=UserInfo(
                id=sender.id,
                username=sender.username,
                first_name=sender.first_name,
                last_name=sender.last_name
            )
        )

You should handle the None exception by inserting a string. Unfortunately, I don't feel skilled enough in Python to make a Pull request :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions