-
-
Notifications
You must be signed in to change notification settings - Fork 127
feat: Remove "Delete Messages from Server" (delete_server_after) config option #8217
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
Draft
Hocuri
wants to merge
18
commits into
main
Choose a base branch
from
hoc/remove-delete_server_after
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0b4d8f5
Remove delete_server_after code. Rust tests are passing
Hocuri 6ad3f80
Mark message for deletion right after receiving it
Hocuri 8ff255e
Linters
Hocuri 6966dc3
Fix test_trash_multiple_messages()
Hocuri 3b5df60
Fix test_markseen_message_and_mdn
Hocuri ab04e6f
Fix test_moved_markseen()
Hocuri 359c5ce
Try to fix test_delete_multiple_messages(), remove some commented-out…
Hocuri 9075ccb
Try to fix test_webxdc_message(), test_send_and_receive_message_marks…
Hocuri b6e0ee2
Remove test_verified_group_vs_delete_server_after() because the featu…
Hocuri c70be03
Try to fix test_basic_imap_api()
Hocuri fa2cd14
Next try to fix test_send_and_receive_message_markseen() and test_mdn…
Hocuri 7f44dbe
small comment tweaks
Hocuri 2b0a877
Restore one of the removed tests
Hocuri 6a1d45f
More small tweaks after self-rewiewing
Hocuri 999cc09
Update provider database
Hocuri fc1812b
Update deltachat-jsonrpc/src/api.rs
Hocuri 578e518
Update src/message.rs
Hocuri 87c94aa
iequidoo's review
Hocuri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -298,73 +298,6 @@ def test_use_new_verified_group_after_going_online(acfactory, data, tmp_path, lp | |
| assert msg_in.text == msg_out.text | ||
|
|
||
|
|
||
| def test_verified_group_vs_delete_server_after(acfactory, tmp_path, lp): | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test tested how delete_server_after interacted with verified groups. We removed both features. |
||
| """Test for the issue #4346: | ||
| - User is added to a verified group. | ||
| - First device of the user downloads "member added" from the group. | ||
| - First device removes "member added" from the server. | ||
| - Some new messages are sent to the group. | ||
| - Second device comes online, receives these new messages. | ||
| The result is an unverified group with unverified members. | ||
| - First device re-gossips Autocrypt keys to the group. | ||
| - Now the second device has all members and group verified. | ||
| """ | ||
| ac1, ac2 = acfactory.get_online_accounts(2) | ||
| acfactory.remove_preconfigured_keys() | ||
| ac2_offl = acfactory.new_online_configuring_account(cloned_from=ac2) | ||
| for ac in [ac2, ac2_offl]: | ||
| ac.set_config("bcc_self", "1") | ||
| ac2.set_config("delete_server_after", "1") | ||
| ac2.set_config("gossip_period", "0") # Re-gossip in every message | ||
| acfactory.bring_accounts_online() | ||
| dir = tmp_path / "exportdir" | ||
| dir.mkdir() | ||
| ac2.export_self_keys(str(dir)) | ||
| ac2_offl.import_self_keys(str(dir)) | ||
| ac2_offl.stop_io() | ||
|
|
||
| lp.sec("ac1: create verified-group QR, ac2 scans and joins") | ||
| chat1 = ac1.create_group_chat("hello") | ||
| qr = chat1.get_join_qr() | ||
| lp.sec("ac2: start QR-code based join-group protocol") | ||
| chat2 = ac2.qr_join_chat(qr) | ||
| ac1._evtracker.wait_securejoin_inviter_progress(1000) | ||
| # Wait for "Member Me (<addr>) added by <addr>." message. | ||
| msg_in = ac2._evtracker.wait_next_incoming_message() | ||
| assert msg_in.is_system_message() | ||
|
|
||
| lp.sec("ac2: waiting for 'member added' to be deleted on the server") | ||
| ac2._evtracker.get_matching("DC_EVENT_IMAP_MESSAGE_DELETED") | ||
|
|
||
| lp.sec("ac1: sending 'hi' to the group") | ||
| ac2.set_config("delete_server_after", "0") | ||
| chat1.send_text("hi") | ||
|
|
||
| lp.sec("ac2_offl: going online, checking the 'hi' message") | ||
| ac2_offl.start_io() | ||
| msg_in = ac2_offl._evtracker.wait_next_incoming_message() | ||
| assert not msg_in.is_system_message() | ||
| assert msg_in.text == "hi" | ||
| ac2_offl_ac1_contact = msg_in.get_sender_contact() | ||
| assert ac2_offl_ac1_contact.addr == ac1.get_config("addr") | ||
| assert not ac2_offl_ac1_contact.is_verified() | ||
| chat2_offl = msg_in.chat | ||
|
|
||
| lp.sec("ac2: sending message re-gossiping Autocrypt keys") | ||
| chat2.send_text("hi2") | ||
|
|
||
| lp.sec("ac2_offl: receiving message") | ||
| ev = ac2_offl._evtracker.get_matching("DC_EVENT_INCOMING_MSG|DC_EVENT_MSGS_CHANGED") | ||
| msg_in = ac2_offl.get_message_by_id(ev.data2) | ||
| assert not msg_in.is_system_message() | ||
| assert msg_in.text == "hi2" | ||
| assert msg_in.chat == chat2_offl | ||
| assert msg_in.get_sender_contact().addr == ac2.get_config("addr") | ||
| # Until we reset verifications and then send the _verified header, | ||
| # verification is not gossiped here: | ||
| assert not ac2_offl_ac1_contact.is_verified() | ||
|
|
||
|
|
||
| def test_deleted_msgs_dont_reappear(acfactory): | ||
| ac1 = acfactory.new_online_configuring_account() | ||
| acfactory.bring_accounts_online() | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.