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

Enable attachment sharing #154

merged 25 commits into from Mar 19, 2019


None yet
4 participants
Copy link

commented Mar 10, 2019

Resolves #23

This pull request adds a new file called zattachments.jsonl to the data transfer protocol which enables the client to only send an attachment once even if that attachment is included in many emails.

Each line in zattachments.jsonl is an attachments object with the same schema as an attachment in emails.jsonl but adding an emails key whose value is a list of email ids. During the sync, the attachment will get associated with each email pointed to by an entry in emails.

Note that currently zattachments.jsonl is only implemented when the client downloads new emails since it's highly unlikely that many people will send the same attachment from a Lokole into the world. It's much more likely that many users on one Lokole device will receive the same attachment, e.g. in the case of an online course or distribution of informational content.

The change to the data transfer protocol is fully backwards compatible but the code change itself isn't since the database schema changed in a non-trivial manner.

@c-w c-w requested review from laura-barluzzi and adamsclafani Mar 10, 2019


This comment has been minimized.

Copy link

commented Mar 10, 2019

Codecov Report

Merging #154 into master will increase coverage by 2.29%.
The diff coverage is 92.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #154      +/-   ##
+ Coverage   68.39%   70.69%   +2.29%     
  Files          28       28              
  Lines        1582     1614      +32     
+ Hits         1082     1141      +59     
+ Misses        500      473      -27
Impacted Files Coverage Δ
opwen_email_client/webapp/ 100% <ø> (ø) ⬆️
opwen_email_client/webapp/ 74.07% <ø> (+26.31%) ⬆️
opwen_email_client/webapp/ 18.51% <0%> (-1.49%) ⬇️
opwen_email_client/domain/email/ 100% <100%> (ø) ⬆️
opwen_email_client/util/ 100% <100%> (ø) ⬆️
opwen_email_client/domain/email/ 97.01% <100%> (+0.34%) ⬆️
opwen_email_client/webapp/ 46.21% <40%> (+0.34%) ⬆️
opwen_email_client/util/ 78.94% <75%> (-0.54%) ⬇️
opwen_email_client/domain/email/ 96.09% <88%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cdbf58e...69515bf. Read the comment docs.

@c-w c-w merged commit ccb8e5a into master Mar 19, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details No dependencies with known security vulnerabilities.

@c-w c-w deleted the attachment-sharing branch Mar 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.