diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/msg/recall.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/commands/msg/recall.go b/commands/msg/recall.go index cea02ddb..a676010a 100644 --- a/commands/msg/recall.go +++ b/commands/msg/recall.go @@ -61,20 +61,20 @@ func (r Recall) Execute(args []string) error { } composer.Tab = app.NewTab(composer, subject) composer.OnClose(func(composer *app.Composer) { - worker := composer.Worker() uids := []uint32{msgInfo.Uid} deleteMessage := func() { - worker.PostAction(&types.DeleteMessages{ - Uids: uids, - }, func(msg types.WorkerMessage) { - switch msg := msg.(type) { - case *types.Done: - app.PushStatus("Recalled message deleted", 10*time.Second) - case *types.Error: - app.PushError(msg.Error.Error()) - } - }) + store.Delete( + uids, + func(msg types.WorkerMessage) { + switch msg := msg.(type) { + case *types.Done: + app.PushStatus("Recalled message deleted", 10*time.Second) + case *types.Error: + app.PushError(msg.Error.Error()) + } + }, + ) } if composer.Sent() || composer.Postponed() { |