Skip to content

file_size not reported for PassportFile #253

@Bibo-Joshi

Description

@Bibo-Joshi

Hi.

I was just testing some passports related features of the python-telegram-bot library that I'm maintaining and noticed that the file_size parameter of PassportFile was not included in the updates reported by getUpdates even though it's marked as required attribute in the documentation.

Here is an anonymized json response I got from getUpdates:

{
    "ok": true,
    "result": [
        {
            "update_id": 219016025,
            "message": {
                "message_id": 28343,
                "from": { ... },
                "chat": { ... },
                "date": 1649595354,
                "passport_data": {
                    "data": [
                        {
                            "type": "passport",
                            "data": "HfLYg...",
                            "front_side": {
                                "file_id": "DgADAgADXRcAAvK4mUrGvDShebTqISME",
                                "file_unique_id": "AwADXRcAAvK4mUo",
                                "file_date": 1649595351
                            },
                            "selfie": {
                                "file_id": "DgADAgADPxcAAnddmUrtny00DHIoLiME",
                                "file_unique_id": "AwADPxcAAnddmUo",
                                "file_date": 1649595351
                            },
                            "hash": "d4B/eUf..."
                        },
                        {
                            "type": "rental_agreement",
                            "files": [
                                {
                                    "file_id": "DgADAgADWxYAAtipmEqYb1oXgLvaxCME",
                                    "file_unique_id": "AwADWxYAAtipmEo",
                                    "file_date": 1649595321
                                }
                            ],
                            "hash": "anZRMln..."
                        },
                        {
                            "type": "phone_number",
                            "phone_number": "123456",
                            "hash": "CVSr..."
                        },
                        {
                            "type": "email",
                            "email": "xxx@yyy.org",
                            "hash": "mKrUZJ..."
                        }
                    ],
                    "credentials": {
                        "data": "Mn4I6...",
                        "hash": "+bD+...",
                        "secret": "ZvQilWVa06..."
                    }
                }
            }
        }
    ]
}

Am I missing something? Or this is a bug in the Bot API/an error in the documentation?

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