summaryrefslogtreecommitdiffstats
path: root/plugin/api.go
diff options
context:
space:
mode:
authorJason Mojica <jason@jasonmojica.net>2018-10-25 17:24:43 +0000
committerJesse Hallam <jesse.hallam@gmail.com>2018-10-25 13:24:43 -0400
commit1074a1c7ab0769b0da3525282fcabf961e2ddfce (patch)
tree4fc4f2701ccc6dc4f40c22f604e6581a168aa9d0 /plugin/api.go
parentdd60ad0db76a00a92d25d7923bf8fb54ebf4a531 (diff)
downloadchat-1074a1c7ab0769b0da3525282fcabf961e2ddfce.tar.gz
chat-1074a1c7ab0769b0da3525282fcabf961e2ddfce.tar.bz2
chat-1074a1c7ab0769b0da3525282fcabf961e2ddfce.zip
GH-9612 Add plugin API for GetChannelStats method (#9627)
* Add GetChannelStats plugin api * Fix to return channel stats correctly * Add server version; Handle error idiomatically
Diffstat (limited to 'plugin/api.go')
-rw-r--r--plugin/api.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/api.go b/plugin/api.go
index 93b5a6d2e..f1b9ec01f 100644
--- a/plugin/api.go
+++ b/plugin/api.go
@@ -155,6 +155,11 @@ type API interface {
// Minimum server version: 5.6
GetChannelsForTeamForUser(teamId, userId string, includeDeleted bool) (*model.ChannelList, *model.AppError)
+ // GetChannelStats gets statistics for a channel.
+ //
+ // Minimum server version: 5.6
+ GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError)
+
// GetDirectChannel gets a direct message channel.
GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError)