summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
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 c588ebda9..21bb386f3 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -1259,6 +1259,14 @@ func (a *App) UpdateChannelLastViewedAt(channelIds []string, userId string) *mod
return nil
}
+func (a *App) AutocompleteChannels(teamId string, term string) (*model.ChannelList, *model.AppError) {
+ if result := <-a.Srv.Store.Channel().AutocompleteInTeam(teamId, term); result.Err != nil {
+ return nil, result.Err
+ } else {
+ return result.Data.(*model.ChannelList), nil
+ }
+}
+
func (a *App) SearchChannels(teamId string, term string) (*model.ChannelList, *model.AppError) {
if result := <-a.Srv.Store.Channel().SearchInTeam(teamId, term); result.Err != nil {
return nil, result.Err