summary refs log tree commit diff stats
path: root/commands/account
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-16 12:42:46 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-16 12:42:46 -0400
commit7f97e0b605f739983571fa85289ea9dc57218f3d (patch)
treef92d582522be35b76ae312075e3a708cbbdceb49 /commands/account
parente367469e1a557a6536c021c9d9569307045ef989 (diff)
downloadaerc-7f97e0b605f739983571fa85289ea9dc57218f3d.tar.gz
Don't prefix Re: if prefix already present
Diffstat (limited to 'commands/account')
-rw-r--r--commands/account/reply.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/commands/account/reply.go b/commands/account/reply.go
index 803c616..84e7614 100644
--- a/commands/account/reply.go
+++ b/commands/account/reply.go
@@ -74,7 +74,12 @@ func Reply(aerc *widgets.Aerc, args []string) error {
 		}
 	}
 
-	subject := "Re: " + msg.Envelope.Subject
+	var subject string
+	if !strings.HasPrefix(msg.Envelope.Subject, "Re: ") {
+		subject = "Re: " + msg.Envelope.Subject
+	} else {
+		subject = msg.Envelope.Subject
+	}
 
 	composer := widgets.NewComposer(
 		aerc.Config(), acct.AccountConfig(), acct.Worker()).