summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-03-27 20:41:40 +0900
committerenahum <nahumhbl@gmail.com>2017-03-27 08:41:40 -0300
commit01aaccb34080ede234602d1ca9acee8373b8560f (patch)
treeaac605bdc35f8a2f1a2761c7f753d5e9f66a33ec /app/channel.go
parent720ee81113ac7a7dd062271c3d6cdf58ce8e044a (diff)
downloadchat-01aaccb34080ede234602d1ca9acee8373b8560f.tar.gz
chat-01aaccb34080ede234602d1ca9acee8373b8560f.tar.bz2
chat-01aaccb34080ede234602d1ca9acee8373b8560f.zip
APIv4 post /channels/ids (#5845)
* APIv4 post /channels/ids * updated enpoint as /teams/{team_id}/channels/ids
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/channel.go b/app/channel.go
index 51688ad87..5278abbfe 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -676,6 +676,14 @@ func GetChannelsUserNotIn(teamId string, userId string, offset int, limit int) (
}
}
+func GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError) {
+ if result := <-Srv.Store.Channel().GetPublicChannelsByIdsForTeam(teamId, channelIds); result.Err != nil {
+ return nil, result.Err
+ } else {
+ return result.Data.(*model.ChannelList), nil
+ }
+}
+
func GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
if result := <-Srv.Store.Channel().GetPublicChannelsForTeam(teamId, offset, limit); result.Err != nil {
return nil, result.Err