Skip to content

Return all sendMessage response objects in referenced array variable #1163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

noplanman
Copy link
Member

@noplanman noplanman commented Dec 23, 2020

? !
Type improvement
BC Break no
Fixed issues #923 #1062

Summary

When sending long messages with Request::sendMessage(...) all response objects are now returned in an extra parameter which is passed by reference:

Request::sendMessage($data, $extras);
// `$extras['responses']` lists all `ServerRequest` response objects for split message sending

@Abduvokhid I know it's been a long time, but what do you think of this solution?
@jacklul Would appreciate any feedback on this, thanks 🙏

@noplanman noplanman self-assigned this Dec 23, 2020
@Abduvokhid
Copy link

@noplanman looks good.

But as you commented markdown can be broken.

@noplanman
Copy link
Member Author

@Abduvokhid Yes, not sure how to fix that to make it bullet-proof.
I've added the ability to pass options to the sendMessage method, which gives the user a bit more freedom.

Best would be to handle special cases manually though.

@noplanman noplanman merged commit 1109b7d into php-telegram-bot:develop Dec 25, 2020
@noplanman noplanman deleted the 923-return-all-sendmessage-responses branch January 1, 2021 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants