diff options
Diffstat (limited to 'app/plugin_api.go')
-rw-r--r-- | app/plugin_api.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/plugin_api.go b/app/plugin_api.go index c409a88f8..a07a07652 100644 --- a/app/plugin_api.go +++ b/app/plugin_api.go @@ -261,6 +261,14 @@ func (api *PluginAPI) GetChannelsForTeamForUser(teamId, userId string, includeDe return api.app.GetChannelsForUser(teamId, userId, includeDeleted) } +func (api *PluginAPI) GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError) { + memberCount, err := api.app.GetChannelMemberCount(channelId) + if err != nil { + return nil, err + } + return &model.ChannelStats{ChannelId: channelId, MemberCount: memberCount}, nil +} + func (api *PluginAPI) GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError) { return api.app.GetDirectChannel(userId1, userId2) } |