aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/reply.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 79a0c598..acc0d6fa 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -86,11 +86,13 @@ func (r reply) Execute(args []string) error {
)
recSet := newAddrSet() // used for de-duping
-
- if len(msg.Envelope.ReplyTo) != 0 {
+ switch {
+ case len(msg.Envelope.ReplyTo) != 0:
to = msg.Envelope.ReplyTo
- } else {
+ case len(msg.Envelope.From) != 0:
to = msg.Envelope.From
+ default:
+ to = msg.Envelope.Sender
}
if !config.Compose.ReplyToSelf {
@@ -131,6 +133,13 @@ func (r reply) Execute(args []string) error {
}
cc = append(cc, addr)
}
+ for _, addr := range msg.Envelope.Sender {
+ // dedupe stuff from the to/from headers
+ if recSet.Contains(addr) {
+ continue
+ }
+ cc = append(cc, addr)
+ }
recSet.AddList(cc)
}