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

fix: replace square bracket errors with proper message errors #4988

Closed
wants to merge 1 commit into from

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Nov 13, 2023

Square bracket errors were introduced before we had proper errors, hide the images, reset system messages to non-system messages and may themselves be replaced with "better message" in receive_imf.

@link2xt link2xt force-pushed the link2xt/no-square-bracket-errors branch from 2123860 to 6c22b11 Compare November 13, 2023 13:08
Square bracket errors were introduced before we had proper errors,
hide the images, reset system messages to non-system messages
and may themselves be replaced with "better message"
in receive_imf.
@link2xt link2xt force-pushed the link2xt/no-square-bracket-errors branch from 6c22b11 to b937f24 Compare November 13, 2023 14:07
@r10s
Copy link
Member

r10s commented Nov 13, 2023

that would remove the hiding of messages in guaranteed-e2ee groups, right? maybe sth. for after 1.42

@adbenitez
Copy link
Member

adbenitez commented Nov 13, 2023

that would remove the hiding of messages in guaranteed-e2ee groups, right? maybe sth. for after 1.42

yes and that is a feature! the messages will still be marked with the red error sign, but at least usable, the weird brackets messages should be considered a bug IMHO, they are confusing and 99% of the cases get on the way and screw the message you received without possibility to get access to voice or images files etc

@hpk42
Copy link
Contributor

hpk42 commented Nov 13, 2023 via email

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 13, 2023

The design goal here was to not show messages in a green-checkmarked chat if they are not "proper"

There was no goal (only path): deltachat/deltachat-core#559
It was just a hotfix for this message appearing in a split group, and a fix was to add this message to verified group. But because it was impossible to display any error, the message is replaced with an error.

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 13, 2023

Signal at least at some point had this "Tap to process and display", something like an undownloaded message:
sn-advisory-receive
(from https://signal.org/blog/verified-safety-number-updates/)

Ideally unverified message should be an error type like this, so the message is not displayed immediately but can be revealed and then hidden once you reopen the chat.

@ghost
Copy link

ghost commented Nov 13, 2023

Screenshot_20231113_212233

Screenshot_20231113_212300

In addition to the message in square brackets, there is also the problem that the message is also treated as reactions.
This is what appeared to me in a verified group where a user who was "Not part of the group" sent a message and the message "Sender unknown for this chat. See 'info' for more details" every word of this message was considered a reaction, as per images.

@hpk42
Copy link
Contributor

hpk42 commented Nov 15, 2023 via email

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 15, 2023

For discussion there is a #4999 issue now.

@link2xt link2xt marked this pull request as draft November 15, 2023 12:33
@iequidoo
Copy link
Collaborator

iequidoo commented Nov 16, 2023

I tried this, currently it leads to messages displayed just w/o the padlock in 1:1 verified chats:

========== Chats of alice: ==========
Single#Chat#10: [email protected] [[email protected]] 🛡
--------------------------------------------------------------------------------
Msg#10: info (Contact#Contact#Info): Messages are guaranteed to be end-to-end encrypted from now on. [NOTICED][INFO 🛡]
Msg#11:  (Contact#Contact#10): hi [FRESH]
Msg#12🔒:  (Contact#Contact#10): hi [FRESH]

Msg#11 is unverified here. So, it's not noticeable enough in DC CLI. But as Message::error is set, if Desktop and mobile apps display this error with the red exclamation mark as usual (i didn't try), maybe it's ok.

UPD: I tested it on top of my changes keeping 1:1 chat protection, that's why there is no message about a broken protection. But still, the error isn't displayed and that's the problem.

UPD: Finally, i think, i'm also for merging this. DC CLI is easy to improve here.

@adbenitez
Copy link
Member

I already merged this into DeltaLab, thanks a lot! even if not a perfect solution (the content-warning first then displaying) it is a lot better than current situation with weird messages, attachments lost, and weird bug in reactions from unknown senders (see screenshot above)

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 17, 2023

Closing this, merged #5024 instead which only fixes "unknown sender" errors. For the other type of errors let's move discussion to #4999.

@link2xt link2xt closed this Nov 17, 2023
@link2xt link2xt deleted the link2xt/no-square-bracket-errors branch November 17, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants