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) {
|
void _handleSendReceiptToSenderAction(BuildContext context) {
|
||||||
final accountId = mailboxDashBoardController.accountId.value;
|
final accountId = mailboxDashBoardController.accountId.value;
|
||||||
if (accountId == null) {
|
final userProfile = mailboxDashBoardController.userProfile.value;
|
||||||
|
if (accountId == null || userProfile == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -948,7 +949,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final mdnToSender = _generateMDN(context, currentEmail!);
|
final mdnToSender = _generateMDN(context, currentEmail!, userProfile);
|
||||||
final sendReceiptRequest = SendReceiptToSenderRequest(
|
final sendReceiptRequest = SendReceiptToSenderRequest(
|
||||||
mdn: mdnToSender,
|
mdn: mdnToSender,
|
||||||
identityId: _identitySelected!.id!,
|
identityId: _identitySelected!.id!,
|
||||||
@@ -958,8 +959,8 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
|||||||
consumeState(_sendReceiptToSenderInteractor!.execute(accountId, sendReceiptRequest));
|
consumeState(_sendReceiptToSenderInteractor!.execute(accountId, sendReceiptRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
MDN _generateMDN(BuildContext context, PresentationEmail email) {
|
MDN _generateMDN(BuildContext context, PresentationEmail email, UserProfile userProfile) {
|
||||||
final senderEmailAddress = email.from?.first.asFullString() ?? '';
|
final receiverEmailAddress = userProfile.email;
|
||||||
final subjectEmail = email.subject ?? '';
|
final subjectEmail = email.subject ?? '';
|
||||||
final timeCurrent = DateTime.now();
|
final timeCurrent = DateTime.now();
|
||||||
final timeAsString = '${timeCurrent.formatDate(
|
final timeAsString = '${timeCurrent.formatDate(
|
||||||
@@ -969,7 +970,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
|||||||
forEmailId: email.id,
|
forEmailId: email.id,
|
||||||
subject: AppLocalizations.of(context).subjectSendReceiptToSender(subjectEmail),
|
subject: AppLocalizations.of(context).subjectSendReceiptToSender(subjectEmail),
|
||||||
textBody: AppLocalizations.of(context).textBodySendReceiptToSender(
|
textBody: AppLocalizations.of(context).textBodySendReceiptToSender(
|
||||||
senderEmailAddress,
|
receiverEmailAddress,
|
||||||
subjectEmail,
|
subjectEmail,
|
||||||
timeAsString),
|
timeAsString),
|
||||||
disposition: Disposition(
|
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": "Initializing data...",
|
||||||
"@initializing_data": {
|
"@initializing_data": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -2348,16 +2348,16 @@
|
|||||||
"subject": {}
|
"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": {
|
"@textBodySendReceiptToSender": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [
|
"placeholders_order": [
|
||||||
"sender",
|
"receiver",
|
||||||
"subject",
|
"subject",
|
||||||
"time"
|
"time"
|
||||||
],
|
],
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
"sender": {},
|
"receiver": {},
|
||||||
"subject": {},
|
"subject": {},
|
||||||
"time": {}
|
"time": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2428,11 +2428,11 @@ class AppLocalizations {
|
|||||||
args: [subject]);
|
args: [subject]);
|
||||||
}
|
}
|
||||||
|
|
||||||
String textBodySendReceiptToSender(String sender, String subject, String time) {
|
String textBodySendReceiptToSender(String receiver, String subject, String time) {
|
||||||
return Intl.message(
|
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',
|
name: 'textBodySendReceiptToSender',
|
||||||
args: [sender, subject, time]);
|
args: [receiver, subject, time]);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get toastMessageSendReceiptSuccess {
|
String get toastMessageSendReceiptSuccess {
|
||||||
|
|||||||
Reference in New Issue
Block a user