Get correct teamname for non-joined channels. Closes 42wim/matterircd#65

This commit is contained in:
Wim 2016-09-01 00:15:48 +02:00
parent d0a30e354b
commit 44144587a0
1 changed files with 1 additions and 0 deletions

View File

@ -523,6 +523,7 @@ func (m *MMClient) GetTeamFromChannel(channelId string) string {
var channels []*model.Channel var channels []*model.Channel
for _, t := range m.OtherTeams { for _, t := range m.OtherTeams {
channels = append(channels, t.Channels.Channels...) channels = append(channels, t.Channels.Channels...)
channels = append(channels, t.MoreChannels.Channels...)
for _, c := range channels { for _, c := range channels {
if c.Id == channelId { if c.Id == channelId {
return t.Id return t.Id