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

#5133 Fix broken email threading for draft messages #5874

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

martgil
Copy link
Collaborator

@martgil martgil commented Nov 27, 2024

This PR fixes the broken email threading for FlowCrypt's secure draft messages.

close #5133


Tests (delete all except exactly one):

  • Does not need tests (refactor only, docs or internal changes)

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@martgil martgil marked this pull request as draft November 27, 2024 10:15
@martgil martgil marked this pull request as ready for review November 28, 2024 08:28
@martgil
Copy link
Collaborator Author

martgil commented Nov 28, 2024

Hi @sosnovsky - this one is ready for review. Thank you!

Please follow the manual test below:

  1. User 1 send to user 2,3 using FlowCrypt (via to, cc would work too).
  2. As user 2, compose a secure reply -> go back to make a draft.
  3. Access the draft from Gmail's draft folder.
  4. Send the secure email reply.

@@ -589,8 +589,10 @@ export class GmailElementReplacer extends WebmailElementReplacer {
return from ? Str.parseEmail(from) : undefined;
};

private getLastMsgReplyParams = (convoRootEl: JQuery): FactoryReplyParams => {
return { replyMsgId: this.determineMsgId($(convoRootEl).find(this.sel.msgInner).last()) };
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change goes to correct the logic of the existing code. Since the last container of the message to obtain the msgId does not mean to be where the container where the secure compose get's clicked.

What I mean by is, assume there are several existing converstations in an email thread (doesn't matter if its a group message). Assume the user clicks secure reply for a specific email that is placed in the middle order of the converstation, this will access the appropriate container rather than the last container of the conversation of the opened email thread.

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.

Broken threading after replying from Firefox
1 participant