Repository navigation
Do not create ad-hoc groups when message cannot be decrypted - #1566
Conversation
|
This happens even if What is worse, when |
2c2fe6b to
fe80c0d
Compare
|
I have updated this PR. There are two commits now. First commit adds a failing test, in which one user loses the key but keeps receiving messages sent by two other members to a new group. Second commit fixes the test with a single check. Right before creating ad-hoc group, when memberlist heuristic already failed to find a corresponding group ID, we return 0 chat ID if the message was not decrypted correctly. |
Hocuri
left a comment
There was a problem hiding this comment.
Definitely an improvement!
What happens to the message instead? IMHO it should be shown in the 1:1 chat (Could not decrypt, and so on)
It goes into 1:1 chat, see the test. There are three tests like |
c2749a5 to
eaaa8c2
Compare
|
Reduced the number of messages exchanged and added a comment to make it easier to review. First commit fails, second commit passes. The most important thing to review here is the test. :) |
hpk42
left a comment
There was a problem hiding this comment.
other than the comments looks good to me.
This fixes the test added in the parent commit.
eaaa8c2 to
335c81b
Compare
|
Marking as WIP because I want to test one more thing: what happens when ac4 replies to these error messages. The reply-to field contains group message-ID in this case, so on ac1 and ac2 the reply is assigned to group chat, even though ac4 sent it to 1:1 chat. Message parent selection needs update too. |
Reply to group messages assigned to 1:1 chat on ac4 and see where they end up on ac1 and ac2. Currently they contain group ID in Reply-To field and go to group chat, so the test is failing.
335c81b to
d39a389
Compare
d39a389 to
77a9099
Compare
This commit fixes the test broken in previous commit.
77a9099 to
04ae2c0
Compare
Trying to reproduce #1565
ac1establishes keys withac2andac3. Thenac2is cloned intoac4with a new key to simulate reinstallation.ac1creates a group withac2andac3and sends two messages there.Received messages have IDs like
Gr.YhIUVTlAq0F.…, butac4assigns them to a different group ID: