Skip to content
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

refactor: Add why_cant_send_ex() capable to only ignore specified conditions #6424

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Jan 12, 2025

Replacement for #6423. See commit messages

@iequidoo iequidoo marked this pull request as ready for review January 12, 2025 02:01
@iequidoo iequidoo requested a review from link2xt January 12, 2025 02:01
src/chat.rs Outdated Show resolved Hide resolved
…ditions

Before, `Chat::why_cant_send()` just returned `CantSendReason` after the first unsuccessful check
allowing to handle the result and finally send the message if the condition is acceptable in which
case the remaining checks are not done. This didn't result in any bugs, but to make the code more
robust let's add a functional parameter to filter failed checks without early return.
@iequidoo iequidoo force-pushed the iequidoo/why_cant_send branch from 2d66e5a to 3d05dfa Compare January 12, 2025 03:47
@iequidoo iequidoo merged commit 4ec50d1 into main Jan 12, 2025
35 of 36 checks passed
@iequidoo iequidoo deleted the iequidoo/why_cant_send branch January 12, 2025 04:13
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.

2 participants