-
-
Notifications
You must be signed in to change notification settings - Fork 103
feat: add "e2ee encrypted" info message to all e2ee chats #7008
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
f4de113
to
fb965eb
Compare
CI is failing, because python tests need to be adapted to this change. In case anyone else is wondering: GitHub doesn't show that this is part of the "2.x keycontact releases" in the right pane of this PR, because |
hum, i assume, that there similar adaptions wrt get_msg_cnt() are needed. i am not deep into python, and i do not have a setup where python tests run locally, so it'd be great if someone else can adapt them |
090ea6b
to
5e3b5f9
Compare
Summary of my review: Some small things, and the problem that this does lead to double "e2ee info messages" on secure join. I can see to repair the tests, but the bigger problem right now are these double messages. Not sure what the best solution is. Querying whether the previous message is an e2ee info message, and if so, removing it, comes to mind. Generally, we could just modify get_chat_msgs_ex() to statically add an e2ee info message to the top (it already adds daymarkers, so it can also add some info message). But then get_chat_msgs_ex() would have to query for whether there is any protection-enabled message, and if not, add the e2ee info message, not sure about the performance impact of this. |
Co-authored-by: Hocuri <hocuri@gmx.de>
yip, the double "messages are end-to-end-encrypted" is bad.
EDIT: we found another way to tweak, see below |
talked with @hpk42 , a simple fix covering all interesting paths might be to check for can_send() before adding e2ee-info-message |
this is fine for Bob (the scanner), but Alice (the inviter showing the qr code) still gets two e2ee-info-messages as at the time the chat is created it is probably sendable. as all other cases seem to be fine, i will have a closer look at that case ... |
@Hocuri thanks a lot for the review, i applied most suggestions - and added an for the python-tests, would be great if you can have a look there btw, the PR is running nicely on my iOS phones already |
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.
🎉
expect(messageList).have.length(1); | ||
const message = await dc.rpc.getMessage(accountId2, messageList[0]); | ||
// There are 2 messages in the chat: | ||
// 'Messages are end-to-end encrypted' (info message) and 'Hello' | ||
expect(messageList).have.length(2); | ||
const message = await dc.rpc.getMessage(accountId2, messageList[1]); |
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.
I know nothing about Typescript, so, I fixed this one by just replacing the number rather than introducing a constant.
Macos tests are super flaky :/ now they failed with:
Will rerun them, but I have no idea what to systematically do about this. Btw, I just tried to ask Copilot about this error, just for the fun of it, and thinking maybe it has some helpful suggestion. Well, it did not, but wrote a long text about why this problem was caused by a DNS resolution problem. I doubt it 😂 |
Co-authored-by: Hocuri <hocuri@gmx.de>
thanks a lot ❤️ |
this PR adds a info message "messages are end-to-end-encrypted" also for chats created by eg. vcards. by the removal of lock icons, this is a good place to hint for that in addition; this is also what eg. whatsapp and others are doing
the wording itself is tweaked at deltachat/deltachat-android#3817 (and there is also the rough idea to make the message a little more outstanding, by some more dedicated colors)
did not test in practise, if this leads to double "e2ee info messages" on secure join, tests look good, however.EDIT: did lots of practise tests meanwhile :)most of the changes in this PR are about test ...
ftr, in another PR, after 2.0 reeases, there could probably quite some code cleanup wrt set-protection, protection-disabled etc.