-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix accidental poll removal on status edit. #168
Fix accidental poll removal on status edit. #168
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #168 +/- ##
============================================
- Coverage 44.97% 44.95% -0.03%
- Complexity 230 235 +5
============================================
Files 74 75 +1
Lines 2190 2169 -21
Branches 109 115 +6
============================================
- Hits 985 975 -10
+ Misses 1165 1148 -17
- Partials 40 46 +6
|
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 poll parameters should be refactored into a separat poll data class and the data class itself should then be placed in the *.entity.data package, as discussed in the associated issue.
for use in Mastodon entities (ScheduledStatus) as well as in methods (post/edit/schedulePoll).
I've now added the changes as discussed. Turns out, having two classes both named |
Sure, that's fine! 👍🏻 |
@andregasser Done. |
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.
Approved!
As detected via #166, editing a status containing a poll using
editStatus()
will remove the poll. This clarifies our documentation by stating that:editStatus()
editPoll()
needs to be retrieved from the existing status first.Removes default values from two poll parameters in
editPoll()
to avoid an accidental change when editing.Fixes one unrelated typo in the actual request.