diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/plugin_api.go | 2 | ||||
-rw-r--r-- | app/post.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/plugin_api.go b/app/plugin_api.go index b09a0c419..06eeee146 100644 --- a/app/plugin_api.go +++ b/app/plugin_api.go @@ -158,7 +158,7 @@ func (api *PluginAPI) CreatePost(post *model.Post) (*model.Post, *model.AppError } func (api *PluginAPI) DeletePost(postId string) *model.AppError { - _, err := api.app.DeletePost(postId) + _, err := api.app.DeletePost(postId, api.id) return err } diff --git a/app/post.go b/app/post.go index 2efa4c90e..4f4c6f65c 100644 --- a/app/post.go +++ b/app/post.go @@ -569,14 +569,14 @@ func (a *App) GetPostsAroundPost(postId, channelId string, offset, limit int, be } } -func (a *App) DeletePost(postId string) (*model.Post, *model.AppError) { +func (a *App) DeletePost(postId, deleteByID string) (*model.Post, *model.AppError) { if result := <-a.Srv.Store.Post().GetSingle(postId); result.Err != nil { result.Err.StatusCode = http.StatusBadRequest return nil, result.Err } else { post := result.Data.(*model.Post) - if result := <-a.Srv.Store.Post().Delete(postId, model.GetMillis()); result.Err != nil { + if result := <-a.Srv.Store.Post().Delete(postId, model.GetMillis(), deleteByID); result.Err != nil { return nil, result.Err } |