aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/msg/invite.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/commands/msg/invite.go b/commands/msg/invite.go
index a6ffb90b..9a236e24 100644
--- a/commands/msg/invite.go
+++ b/commands/msg/invite.go
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"io"
+ "time"
"git.sr.ht/~rjarry/aerc/app"
"git.sr.ht/~rjarry/aerc/commands"
@@ -141,7 +142,14 @@ func (i invite) Execute(args []string) error {
composer.Tab = app.NewTab(composer, subject)
composer.OnClose(func(c *app.Composer) {
- if c.Sent() {
+ switch {
+ case c.Sent() && c.Archive() != "":
+ store.Answered([]models.UID{msg.Uid}, true, nil)
+ err := archive([]*models.MessageInfo{msg}, nil, c.Archive())
+ if err != nil {
+ app.PushStatus("Archive failed", 10*time.Second)
+ }
+ case c.Sent():
store.Answered([]models.UID{msg.Uid}, true, nil)
}
})