-
Notifications
You must be signed in to change notification settings - Fork 71
Model quick replies as structs instead of strings #838
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
HighPriority_ bool `json:"high_priority" db:"high_priority"` | ||
Text_ string `json:"text" db:"text"` | ||
Attachments_ pq.StringArray `json:"attachments" db:"attachments"` | ||
QuickReplies_ pq.StringArray `json:"quick_replies" db:"quick_replies"` |
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.
we don't write or load messages with quick replies from the db
@@ -90,7 +90,7 @@ var sendTestCases = []OutgoingTestCase{ | |||
ExpectedRequests: []ExpectedRequest{ | |||
{ | |||
Path: "/discord/rp/send", | |||
Body: `{"id":"10","text":"Hello World","to":"694634743521607802","channel":"bac782c2-7aeb-4389-92f5-97887744f573","attachments":[],"quick_replies":null}`, |
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.
sending arrays as nulls doesn't seem right...
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #838 +/- ##
==========================================
- Coverage 74.73% 74.65% -0.09%
==========================================
Files 113 113
Lines 13295 13308 +13
==========================================
- Hits 9936 9935 -1
- Misses 2644 2658 +14
Partials 715 715 ☔ View full report in Codecov by Sentry. |
But they can be unmarshaled from strings