-
Notifications
You must be signed in to change notification settings - Fork 5.1k
fix: add button title validation and base64 decode error handling #6773
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
base: update/whatsapp-interface-v2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ class ReplyButton(BaseModel): | |
| """A quick-reply button.""" | ||
|
|
||
| id: str = Field(..., description="Unique button identifier (e.g. 'yes', 'no').") | ||
| title: str = Field(..., description="Button display text, max 20 characters.") | ||
| title: str = Field(..., max_length=20, description="Button display text, max 20 characters.") | ||
|
||
|
|
||
|
|
||
| class ListRow(BaseModel): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base64 decode error handling fix in
_extract_media_bytes()for thestrbranch is not covered by any test. The PR description identifies this as a crash fix for a previously unhandled case. A unit test should be added that passes a mockmedia_objwhose.contentis a non-base64 string (e.g., a file path like"/tmp/audio.mp3") and verifies that the function returnsNonewithout raising.