TF-1180 Fix read receipt wrong content
This commit is contained in:
@@ -893,7 +893,8 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
|
||||
void _handleSendReceiptToSenderAction(BuildContext context) {
|
||||
final accountId = mailboxDashBoardController.accountId.value;
|
||||
if (accountId == null) {
|
||||
final userProfile = mailboxDashBoardController.userProfile.value;
|
||||
if (accountId == null || userProfile == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -948,7 +949,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
return;
|
||||
}
|
||||
|
||||
final mdnToSender = _generateMDN(context, currentEmail!);
|
||||
final mdnToSender = _generateMDN(context, currentEmail!, userProfile);
|
||||
final sendReceiptRequest = SendReceiptToSenderRequest(
|
||||
mdn: mdnToSender,
|
||||
identityId: _identitySelected!.id!,
|
||||
@@ -958,8 +959,8 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
consumeState(_sendReceiptToSenderInteractor!.execute(accountId, sendReceiptRequest));
|
||||
}
|
||||
|
||||
MDN _generateMDN(BuildContext context, PresentationEmail email) {
|
||||
final senderEmailAddress = email.from?.first.asFullString() ?? '';
|
||||
MDN _generateMDN(BuildContext context, PresentationEmail email, UserProfile userProfile) {
|
||||
final receiverEmailAddress = userProfile.email;
|
||||
final subjectEmail = email.subject ?? '';
|
||||
final timeCurrent = DateTime.now();
|
||||
final timeAsString = '${timeCurrent.formatDate(
|
||||
@@ -969,7 +970,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
forEmailId: email.id,
|
||||
subject: AppLocalizations.of(context).subjectSendReceiptToSender(subjectEmail),
|
||||
textBody: AppLocalizations.of(context).textBodySendReceiptToSender(
|
||||
senderEmailAddress,
|
||||
receiverEmailAddress,
|
||||
subjectEmail,
|
||||
timeAsString),
|
||||
disposition: Disposition(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"@@last_modified": "2022-11-14T16:25:49.764077",
|
||||
"@@last_modified": "2022-11-17T14:21:04.763049",
|
||||
"initializing_data": "Initializing data...",
|
||||
"@initializing_data": {
|
||||
"type": "text",
|
||||
@@ -2348,16 +2348,16 @@
|
||||
"subject": {}
|
||||
}
|
||||
},
|
||||
"textBodySendReceiptToSender": "Message was read by {sender} on {time} \n\nSubject: {subject} \n\nNote: This Return ReceiptReceipt only acknowledges that the message was displayed on the recipient's computer. There is no guarantee that the recipient has read or understood the message contents.",
|
||||
"textBodySendReceiptToSender": "Message was read by {receiver} on {time} \n\nSubject: {subject} \n\nNote: This Return Read Receipt only acknowledges that the message was displayed on the recipient's computer. There is no guarantee that the recipient has read or understood the message contents.",
|
||||
"@textBodySendReceiptToSender": {
|
||||
"type": "text",
|
||||
"placeholders_order": [
|
||||
"sender",
|
||||
"receiver",
|
||||
"subject",
|
||||
"time"
|
||||
],
|
||||
"placeholders": {
|
||||
"sender": {},
|
||||
"receiver": {},
|
||||
"subject": {},
|
||||
"time": {}
|
||||
}
|
||||
|
||||
@@ -2428,11 +2428,11 @@ class AppLocalizations {
|
||||
args: [subject]);
|
||||
}
|
||||
|
||||
String textBodySendReceiptToSender(String sender, String subject, String time) {
|
||||
String textBodySendReceiptToSender(String receiver, String subject, String time) {
|
||||
return Intl.message(
|
||||
'Message was read by $sender on $time \n\nSubject: $subject \n\nNote: This Return ReceiptReceipt only acknowledges that the message was displayed on the recipient\'s computer. There is no guarantee that the recipient has read or understood the message contents.',
|
||||
'Message was read by $receiver on $time \n\nSubject: $subject \n\nNote: This Return Read Receipt only acknowledges that the message was displayed on the recipient\'s computer. There is no guarantee that the recipient has read or understood the message contents.',
|
||||
name: 'textBodySendReceiptToSender',
|
||||
args: [sender, subject, time]);
|
||||
args: [receiver, subject, time]);
|
||||
}
|
||||
|
||||
String get toastMessageSendReceiptSuccess {
|
||||
|
||||
Reference in New Issue
Block a user