diff --git a/docs/adr/0052-patrol-integration-test.md b/docs/adr/0053-patrol-integration-test.md similarity index 97% rename from docs/adr/0052-patrol-integration-test.md rename to docs/adr/0053-patrol-integration-test.md index 72dc927ae..65c17afa4 100644 --- a/docs/adr/0052-patrol-integration-test.md +++ b/docs/adr/0053-patrol-integration-test.md @@ -1,4 +1,4 @@ -# 52. Patrol integration test +# 53. Patrol integration test Date: 2024-04-10 diff --git a/docs/adr/0053-standardize-html-sanitizing.md b/docs/adr/0054-standardize-html-sanitizing.md similarity index 94% rename from docs/adr/0053-standardize-html-sanitizing.md rename to docs/adr/0054-standardize-html-sanitizing.md index ad78d60f1..23e6fb3d5 100644 --- a/docs/adr/0053-standardize-html-sanitizing.md +++ b/docs/adr/0054-standardize-html-sanitizing.md @@ -1,4 +1,4 @@ -# 53. Standardize HTML sanitizing +# 54. Standardize HTML sanitizing Date: 2024-10-24 diff --git a/docs/adr/0053-web-socket-data-synchronization.md b/docs/adr/0055-web-socket-data-synchronization.md similarity index 91% rename from docs/adr/0053-web-socket-data-synchronization.md rename to docs/adr/0055-web-socket-data-synchronization.md index 0bf693e77..e06705c48 100644 --- a/docs/adr/0053-web-socket-data-synchronization.md +++ b/docs/adr/0055-web-socket-data-synchronization.md @@ -1,4 +1,4 @@ -# 53. Web socket data synchronization +# 55. Web socket data synchronization Date: 2024-11-10 diff --git a/docs/adr/0054-update-flutter-service-worker-initialization.md b/docs/adr/0056-update-flutter-service-worker-initialization.md similarity index 93% rename from docs/adr/0054-update-flutter-service-worker-initialization.md rename to docs/adr/0056-update-flutter-service-worker-initialization.md index 66779fba0..73eab31d5 100644 --- a/docs/adr/0054-update-flutter-service-worker-initialization.md +++ b/docs/adr/0056-update-flutter-service-worker-initialization.md @@ -1,4 +1,4 @@ -# 54. Update Flutter Service Worker Initialization +# 56. Update Flutter Service Worker Initialization Date: 2024-11-15 diff --git a/docs/adr/0055-ios-fcm-routing.md b/docs/adr/0057-ios-fcm-routing.md similarity index 97% rename from docs/adr/0055-ios-fcm-routing.md rename to docs/adr/0057-ios-fcm-routing.md index 09ae4eedf..a2d9577ad 100644 --- a/docs/adr/0055-ios-fcm-routing.md +++ b/docs/adr/0057-ios-fcm-routing.md @@ -1,4 +1,4 @@ -# 55. iOS FCM routing +# 57. iOS FCM routing Date: 2024-12-05 diff --git a/docs/adr/0055-remove-flutter-service-worker.md b/docs/adr/0058-remove-flutter-service-worker.md similarity index 95% rename from docs/adr/0055-remove-flutter-service-worker.md rename to docs/adr/0058-remove-flutter-service-worker.md index 0a5276641..3ca8dc021 100644 --- a/docs/adr/0055-remove-flutter-service-worker.md +++ b/docs/adr/0058-remove-flutter-service-worker.md @@ -1,4 +1,4 @@ -# 55. Remove Flutter Service Worker +# 58. Remove Flutter Service Worker Date: 2024-11-26 diff --git a/docs/adr/0056-web-socket-ping-strategy.md b/docs/adr/0059-web-socket-ping-strategy.md similarity index 94% rename from docs/adr/0056-web-socket-ping-strategy.md rename to docs/adr/0059-web-socket-ping-strategy.md index 5c099d258..48fa9d15e 100644 --- a/docs/adr/0056-web-socket-ping-strategy.md +++ b/docs/adr/0059-web-socket-ping-strategy.md @@ -1,4 +1,4 @@ -# 56. Web Socket Ping Strategy +# 59. Web Socket Ping Strategy Date: 2024-12-16 diff --git a/docs/adr/0057-team-mailboxes-matching.md b/docs/adr/0060-team-mailboxes-matching.md similarity index 96% rename from docs/adr/0057-team-mailboxes-matching.md rename to docs/adr/0060-team-mailboxes-matching.md index 26e50e5fd..a06953759 100644 --- a/docs/adr/0057-team-mailboxes-matching.md +++ b/docs/adr/0060-team-mailboxes-matching.md @@ -1,4 +1,4 @@ -# 57. Team Mailboxes Matching +# 60. Team Mailboxes Matching Date: 2025-02-18 diff --git a/docs/adr/0058-fix-ios-email-view-gone-blank-with-large-html-content.md b/docs/adr/0061-fix-ios-email-view-gone-blank-with-large-html-content.md similarity index 94% rename from docs/adr/0058-fix-ios-email-view-gone-blank-with-large-html-content.md rename to docs/adr/0061-fix-ios-email-view-gone-blank-with-large-html-content.md index b76947317..8eb32c162 100644 --- a/docs/adr/0058-fix-ios-email-view-gone-blank-with-large-html-content.md +++ b/docs/adr/0061-fix-ios-email-view-gone-blank-with-large-html-content.md @@ -1,4 +1,4 @@ -# 58. Fix iOS email view gone blank with large HTML content +# 61. Fix iOS email view gone blank with large HTML content Date: 2024-04-05 diff --git a/docs/adr/0058-fix-offline-cache-prevents-updating-email-query-view-on-mobile.md b/docs/adr/0062-fix-offline-cache-prevents-updating-email-query-view-on-mobile.md similarity index 95% rename from docs/adr/0058-fix-offline-cache-prevents-updating-email-query-view-on-mobile.md rename to docs/adr/0062-fix-offline-cache-prevents-updating-email-query-view-on-mobile.md index 2c2a63734..0937a0c05 100644 --- a/docs/adr/0058-fix-offline-cache-prevents-updating-email-query-view-on-mobile.md +++ b/docs/adr/0062-fix-offline-cache-prevents-updating-email-query-view-on-mobile.md @@ -1,4 +1,4 @@ -# 58. Fix offline cache prevents updating email query view on mobile +# 62. Fix offline cache prevents updating email query view on mobile Date: 2025-04-03 diff --git a/docs/adr/0058-hide-session-expires-dialog-to-avoid-confusing-users..md b/docs/adr/0063-hide-session-expires-dialog-to-avoid-confusing-users..md similarity index 93% rename from docs/adr/0058-hide-session-expires-dialog-to-avoid-confusing-users..md rename to docs/adr/0063-hide-session-expires-dialog-to-avoid-confusing-users..md index ae51b365e..f50675607 100644 --- a/docs/adr/0058-hide-session-expires-dialog-to-avoid-confusing-users..md +++ b/docs/adr/0063-hide-session-expires-dialog-to-avoid-confusing-users..md @@ -1,4 +1,4 @@ -# 58. Hide session expires dialog to avoid confusing users +# 63. Hide session expires dialog to avoid confusing users Date: 2025-04-14 diff --git a/docs/adr/0059-reply-to-own-sent-email.md b/docs/adr/0064-reply-to-own-sent-email.md similarity index 90% rename from docs/adr/0059-reply-to-own-sent-email.md rename to docs/adr/0064-reply-to-own-sent-email.md index 73e5e4d3b..61f5211c4 100644 --- a/docs/adr/0059-reply-to-own-sent-email.md +++ b/docs/adr/0064-reply-to-own-sent-email.md @@ -1,4 +1,4 @@ -# 59. Reply to own sent email +# 64. Reply to own sent email Date: 2025-04-15 diff --git a/docs/adr/0065-logic-for-reply-email.md b/docs/adr/0065-logic-for-reply-email.md new file mode 100644 index 000000000..e8de1f571 --- /dev/null +++ b/docs/adr/0065-logic-for-reply-email.md @@ -0,0 +1,98 @@ +# 65. Logic for reply email + +Date: 2025-04-21 + +## Status + +Accepted + +## Context + +- The email reply logic is quite complex so to avoid mistakes and regression of errors later. + +## Decision + +Brief the logic flow to easily follow changes during email reply process: + +**1. Reply:** + +- If the user is the `sender` + +```console +To = email.to +Cc, Bcc, ReplyTo = Empty +``` + +- Otherwise, If the email has a `List-Post` header then: + +```console +To = email.from.withoutUser +Cc, Bcc, ReplyTo = Empty +``` + +- Otherwise, If the email without a `List-Post` header, `email.replyTo` is not empty then: + + ```console +To = email.replyTo.withoutUser +Cc, Bcc, ReplyTo = Empty +``` + +- Otherwise: + +```console +To = email.from.withoutUser +Cc, Bcc, ReplyTo = Empty +``` + +**2. Reply To List:** + +- If the email has a `List-Post` header then: + +```console +To = email.List-Post.withoutUser +Cc, Bcc, ReplyTo = Empty +``` + +- Otherwise: There is no `Reply To List` feature + +3. Reply all + +- If the user is the sender + +```console +To = email.to.withoutUser +Cc = email.cc.withoutUser +Bcc = email.bcc.withoutUser +ReplyTo = email.replyTo.withoutUser +``` + +- Otherwise, If the email has a `List-Post` header then: + +```console +To = (email.replyTo + email.from + email.to).withoutUser +Cc = email.cc.withoutUser +Bcc = email.bcc.withoutUser +ReplyTo = Empty +``` + +- Otherwise, If the email without a `List-Post` header, `email.replyTo` is not empty then: + +```console +To = (email.replyTo + email.to).withoutUser +Cc = email.cc.withoutUser +Bcc = email.bcc.withoutUser +ReplyTo = Empty +``` + +- Otherwise + +```console +To = (email.from + email.to).withoutUser +Cc = email.cc.withoutUser +Bcc = email.bcc.withoutUser +ReplyTo = Empty +``` + +## Consequences + +- Any changes to reply email should be updated in this ADR.