diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/reaction.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/reaction.go b/app/reaction.go new file mode 100644 index 000000000..4f299a993 --- /dev/null +++ b/app/reaction.go @@ -0,0 +1,16 @@ +// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package app + +import ( + "github.com/mattermost/platform/model" +) + +func GetReactionsForPost(postId string) ([]*model.Reaction, *model.AppError) { + if result := <-Srv.Store.Reaction().GetForPost(postId, true); result.Err != nil { + return nil, result.Err + } else { + return result.Data.([]*model.Reaction), nil + } +} |