Skip to content

TF-3894 Fix blank email content when opening email #3896

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dab246
Copy link
Member

@dab246 dab246 commented Jul 22, 2025

Issue

#3894

Root cause

The Stalwart server does not return any email address in the session (#3717 (comment)) lead to session.getOwnEmailAddress() throwing exception.

ownUserName: controller.session?.getOwnEmailAddress() ?? '',

Reproduce

reproduce.mov

Resolved

  • With both ownEmailAddress & identity
with-own-email-address.mov
  • Without ownEmailAddress & with identity
with-identities.mov
  • Without both ownEmailAddress & identity
witout-identities.mov

Signed-off-by: dab246 <tdvu@linagora.com>
@dab246 dab246 force-pushed the bugfix/tf-3894-blank-email-content-when-opening-email branch from 0ce3802 to 68dc9e9 Compare July 22, 2025 05:48
Copy link

This PR has been deployed to https://linagora.github.io/tmail-flutter/3896.

@@ -129,6 +129,26 @@ extension SessionExtension on Session {
return null;
}

String generateOwnEmailAddressFromDomain(String domain) {
Copy link
Member

Choose a reason for hiding this comment

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

why we need this function?

Copy link
Member Author

Choose a reason for hiding this comment

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

We create the exact email the user is using. Because identity has many different emails, only the domain is the same.

Comment on lines +29 to +31
final identityEmailAddress = listIdentities.firstOrNull?.email ?? '';
final domain = EmailUtils.getDomainByEmailAddress(identityEmailAddress);
final userEmailAddress =
Copy link
Member

Choose a reason for hiding this comment

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

still not understand this point

Copy link
Member Author

Choose a reason for hiding this comment

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

We create the exact email the user is using. Because identity has many different emails, only the domain is the same.

@dab246 dab246 requested a review from hoangdat July 24, 2025 07:12
@Gictorbit
Copy link

thank you

@Gictorbit
Copy link

gentle ping on this PR.
would appreciate it if we could get a review or merge @hoangdat. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants