Skip to content

Should accept undefined as well as null as missing optional argument #10

Description

@leonerd

For ages I was struggling with the following code

return client.messages.sendMessage(peer, message, Math.random() * (1<<30));

returning INPUT_FETCH_ERROR from Telegram. Much code-diving later reveals that I have to call

return client.messages.sendMessage(peer, message, Math.random() * (1<<30), null, null, null);

i.e. that only null works as missing arguments, not undefined.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions