summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/post.go b/app/post.go
index 0bd3b654f..192c2effb 100644
--- a/app/post.go
+++ b/app/post.go
@@ -207,7 +207,7 @@ func (a *App) FillInPostProps(post *model.Post, channel *model.Channel) *model.A
if len(channelMentions) > 0 {
if channel == nil {
result := <-a.Srv.Store.Channel().GetForPost(post.Id)
- if result.Err == nil {
+ if result.Err != nil {
return model.NewAppError("FillInPostProps", "api.context.invalid_param.app_error", map[string]interface{}{"Name": "post.channel_id"}, result.Err.Error(), http.StatusBadRequest)
}
channel = result.Data.(*model.Channel)