diff --git a/frontend/src/components/Activities.vue b/frontend/src/components/Activities.vue
index e430113d..737dd217 100644
--- a/frontend/src/components/Activities.vue
+++ b/frontend/src/components/Activities.vue
@@ -367,6 +367,7 @@
+
+
+
+
@@ -1076,15 +1080,26 @@ function reply(email, reply_all = false) {
let editor = emailBox.value.editor
let message = email.content
let recipients = email.recipients.split(',').map((r) => r.trim())
- editor.toEmails = recipients
+ editor.toEmails = [email.sender]
editor.cc = editor.bcc = false
editor.ccEmails = []
editor.bccEmails = []
+ if (!email.subject.startsWith('Re:')) {
+ editor.subject = `Re: ${email.subject}`
+ }
+
if (reply_all) {
let cc = email.cc?.split(',').map((r) => r.trim())
let bcc = email.bcc?.split(',').map((r) => r.trim())
+ if (cc?.length) {
+ recipients = recipients.filter((r) => !cc?.includes(r))
+ cc.push(...recipients)
+ } else {
+ cc = recipients
+ }
+
editor.cc = cc ? true : false
editor.bcc = bcc ? true : false