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
Этот коммит содержится в:
Jason Mojica
2018-10-25 17:24:43 +00:00
коммит произвёл Jesse Hallam
родитель dd60ad0db7
Коммит 1074a1c7ab
4 изменённых файлов: 67 добавлений и 0 удалений

Просмотреть файл

@@ -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)