-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat: Add device message about outgoing undecryptable messages (#5164) #5176
Conversation
4b601d8
to
9d273a4
Compare
Currently undecryptable outgoing messages don't go to Trash, i.e. i don't change this logic. Just not sure we can do that safely. Also i'm not sure that adding a notification once per day is sufficient, e.g. if the user tried to fix their multi-device setup, but did smth wrong, they will know about that only on the next day. |
Maybe add a device message for each received outgoing undecryptable message, but remove also the previous if it's of the same kind? Then we don't need to store the last notification time in the db and don't need this magic 1-day period. |
Fixing multi-device setup generally means transferring a backup from the other device, so the counter associated to incorrectly set up account will be removed. |
Intention of 1-day period is to notify/annoy user at most once a day if they keep sending messages outside interchangeably from two devices. If a new message is added and previous one removed each time like this, user will be notified every time, or never notified if the message is actually replaced. |
What may go wrong if we do this? I can only see that chat assignment may get broken, but this outgoing message would not be assigned to the correct chat as well. If this is a new from-scratch setup (user simply logged in), user likely does not see any existing groups anyway. Old setup may assign messages from new setup, but these messages from new setup are likely not group messages, but simply messages to self or to some manually typed in contacts. |
6576aaa
to
7c78bb0
Compare
I agree, it's unlikely that subsequent messages chat assignment may get broken, now i send outgoing undecryptables to the Trash. But as for incoming, i left the current logic. |
7c78bb0
to
f881b20
Compare
f881b20
to
0e81709
Compare
Yes, the plan is only for outgoing because it is a clear sign that two setups with different keys are present right now (assuming all devices are online) and this should definitely be fixed. For incoming messages some improvement is needed because current state is that an encrypted group turns into a lot of contact request 1:1 chats as you get messages from all participants, but this is not designed yet. |
18d0fa2
to
0e81709
Compare
There is a question what to do if an undecryptable outgoing message has unencrypted |
How Are you sure the test is broken by this change? It looks like this test somehow got flaky on |
Indeed, it's not broken by this change, i just saw that EDIT: At least the user would see that there was some message from their another device, this looks good to me |
The goal is to quickly push user to remove this newely set up account and resetup using backup transfer, so assigning square bracket messages to chats does not help and it is anyway unlikely that user will even see these group chats on a newely set up account.
If there is a new outgoing message it means the user just used this device. Also this would be one more message to decide on and translate in addition to device chat message, because current square bracket message does not fit for outgoing messages. |
Then a device message should be added, but the original one just may be made hidden. This would be closer to what other users have, because the message doesn't go to Trash for them. |
e18cdda
to
15d3940
Compare
2c0d487
to
e129334
Compare
e129334
to
957b274
Compare
957b274
to
b63e71f
Compare
This comment was marked as resolved.
This comment was marked as resolved.
b63e71f
to
91f52c6
Compare
Currently when a user sets up another device by logging in, a new key is created. If a message is sent from either device outside, it cannot be decrypted by the other device. The message is replaced with square bracket error like this: ``` <string name="systemmsg_cannot_decrypt">This message cannot be decrypted.\n\n• It might already help to simply reply to this message and ask the sender to send the message again.\n\n• If you just re-installed Delta Chat then it is best if you re-setup Delta Chat now and choose "Add as second device" or import a backup.</string> ``` (taken from Android repo `res/values/strings.xml`) If the message is outgoing, it does not help to "simply reply to this message". Instead, we should add a translatable device message of a special type so UI can link to the FAQ entry about second device. But let's limit such notifications to 1 per day. And as for the undecryptable message itself, let it go to Trash if it can't be assigned to a chat by its references.
91f52c6
to
066f832
Compare
No idea, but I removed it from required checks now. Maybe someone has added it while in fact it should not be part of required checks because it is not reported when there is no WIP in title. |
See commit messages.
Close #5164