-
Notifications
You must be signed in to change notification settings - Fork 212
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
[CIS-661] Simplify attachment send API #815
Conversation
Codecov Report
@@ Coverage Diff @@
## main #815 +/- ##
==========================================
- Coverage 87.55% 86.70% -0.86%
==========================================
Files 230 228 -2
Lines 8826 8636 -190
==========================================
- Hits 7728 7488 -240
- Misses 1098 1148 +50
Continue to review full report at Codecov.
|
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.
IMHO it looks much nicer now 🎉
Pro: Simplified API, unified flow
Con: Docs are basically required to understand these things, but seeds
were not self-explanatory anyway
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.
|
||
// Dummy encodable conformance to satisfy `AttachmentEnvelope` protocol. | ||
public func encode(to encoder: Encoder) throws {} |
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.
This is an interesting side effect. I'm thinking - what does this mean? Maybe we're missing something?
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.
Encodable
is the main constraint for the custom attachments cause it is the minimum we need to blindly send it to the backend.
Dummy conformance means that we can't blindly send it, some pre-processing is required and we know how to handle that.
I think that's acceptable trade-off.
In this PR: