Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nextcloud mail - PostGuard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Laura Kolijn
Nextcloud mail - PostGuard
Commits
1673c67e
Unverified
Commit
1673c67e
authored
7 years ago
by
Christoph Wurst
Browse files
Options
Downloads
Patches
Plain Diff
Fix reply-all handling
Signed-off-by:
Christoph Wurst
<
christoph@winzerhof-wurst.at
>
parent
63dad7c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/replybuilder.js
+9
-11
9 additions, 11 deletions
js/replybuilder.js
with
9 additions
and
11 deletions
js/replybuilder.js
+
9
−
11
View file @
1673c67e
...
...
@@ -48,6 +48,11 @@ define(function(require) {
replyingAddress
=
_
.
find
(
messageBody
.
get
(
'
cc
'
),
isOwnAddress
);
if
(
!
_
.
isUndefined
(
replyingAddress
))
{
recipientType
=
RecipientType
.
Cc
;
}
else
{
replyingAddress
=
{
label
:
ownAddress
,
email
:
ownAddress
};
}
}
...
...
@@ -58,14 +63,6 @@ define(function(require) {
to
=
messageBody
.
get
(
'
to
'
).
filter
(
isNotOwnAddress
);
to
=
to
.
concat
(
messageBody
.
get
(
'
from
'
));
// Super rare case: if you write an email to yourself, your email must not be removed
/* if (to.length === 0 &&
messageBody.get('to').length === 1 &&
messageBody.get('to')[0].email === message.folder.account.get('emailAddress')) {
console.error('ALA');
to.push(messageBody.get('to')[0]);
} */
// CC remains the same
cc
=
messageBody
.
get
(
'
cc
'
);
}
else
if
(
recipientType
===
RecipientType
.
Cc
)
{
...
...
@@ -75,8 +72,9 @@ define(function(require) {
// All CC values are being kept except the replying address
cc
=
messageBody
.
get
(
'
cc
'
).
filter
(
isNotOwnAddress
);
}
else
{
// Send to the sender
to
=
messageBody
.
get
(
'
from
'
);
// Send to the same recipient and the sender -> answer all
to
=
messageBody
.
get
(
'
to
'
);
to
=
to
.
concat
(
messageBody
.
get
(
'
from
'
));
// Keep CC values
cc
=
messageBody
.
get
(
'
cc
'
);
...
...
@@ -84,7 +82,7 @@ define(function(require) {
return
{
to
:
to
,
from
:
[
replyingAddress
],
from
:
replyingAddress
?
[
replyingAddress
]
:
[]
,
fromEmail
:
message
.
folder
.
account
.
get
(
'
emailAddress
'
),
// TODO: alias?
cc
:
cc
,
body
:
''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment