summaryrefslogtreecommitdiffstats
path: root/app/reaction.go
blob: cc31018ec9f1e1e13cfd640755212f56e0f4c5dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2017-present 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
	}
}