Skip to content

2.0.0 | Add the possibility of sending messages to private chats#2

Open
SecorD0 wants to merge 3 commits into
SM-Telegram:masterfrom
SecorD0:master
Open

2.0.0 | Add the possibility of sending messages to private chats#2
SecorD0 wants to merge 3 commits into
SM-Telegram:masterfrom
SecorD0:master

Conversation

@SecorD0

@SecorD0 SecorD0 commented Apr 4, 2023

Copy link
Copy Markdown

By default the string is converted to 32-bit signed integer, which have a range of -2147483648 to 2147483647. The private chat ID isn't in this range, so we can't send a message to it this way. To solve the problem, I decided to avoid automatic conversion by adding mandatory key characters 'id:' to the value of 'chatId'. By doing so, the string remains a string and then these key characters are removed. This innovation allows you to send messages to any chats.

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.

1 participant