diff options
Diffstat (limited to 'commands/msg/forward.go')
-rw-r--r-- | commands/msg/forward.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go index 2f108e8e..cb2cab35 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -162,7 +162,10 @@ func (f forward) Execute(args []string) error { return } composer.AddAttachment(tmpFileName) - composer.OnClose(func(_ *app.Composer) { + composer.OnClose(func(c *app.Composer) { + if c.Sent() { + store.Forwarded([]uint32{msg.Uid}, true, nil) + } os.RemoveAll(tmpDir) }) }) @@ -211,6 +214,12 @@ func (f forward) Execute(args []string) error { return } + composer.OnClose(func(c *app.Composer) { + if c.Sent() { + store.Forwarded([]uint32{msg.Uid}, true, nil) + } + }) + // add attachments if f.AttachAll { var mu sync.Mutex |