Skip to content

Commit

Permalink
clear draft sync (#19499)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaxim committed Sep 11, 2019
1 parent 7a59bd5 commit 778ac70
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions go/chat/server.go
Expand Up @@ -1101,11 +1101,9 @@ func (h *Server) PostLocalNonblock(ctx context.Context, arg chat1.PostLocalNonbl
}

// Clear draft
go func(ctx context.Context) {
if err := h.G().InboxSource.Draft(ctx, uid, arg.ConversationID, nil); err != nil {
h.Debug(ctx, "PostLocalNonblock: failed to clear draft: %s", err)
}
}(globals.BackgroundChatCtx(ctx, h.G()))
if err := h.G().InboxSource.Draft(ctx, uid, arg.ConversationID, nil); err != nil {
h.Debug(ctx, "PostLocalNonblock: failed to clear draft: %s", err)
}

// Check for any slash command hits for an execute
if handled, err := h.G().CommandsSource.AttemptBuiltinCommand(ctx, uid, arg.ConversationID,
Expand Down

0 comments on commit 778ac70

Please sign in to comment.