PLT-4430 improve slow channel switching (#4331)

* PLT-4430 improve slow channel switching

* Update client side unit tests

* Convert getChannelsUnread to getMyChannelMembers and address other feedback

* Pull channel members on websocket reconnect
This commit is contained in:
enahum
2016-10-27 12:24:30 -03:00
committed by Harrison Healey
parent 14ce471311
commit f82667f3b8
22 changed files with 271 additions and 117 deletions

View File

@@ -159,13 +159,13 @@ func getChannelID(channelname string, teamid string, userid string) (id string,
return "", false
}
data := result.Data.(*model.ChannelList)
data := result.Data.(model.ChannelList)
for _, channel := range data.Channels {
for _, channel := range data {
if channel.Name == channelname {
return channel.Id, true
}
}
l4g.Debug(utils.T("manaultesting.get_channel_id.no_found.debug"), channelname, strconv.Itoa(len(data.Channels)))
l4g.Debug(utils.T("manaultesting.get_channel_id.no_found.debug"), channelname, strconv.Itoa(len(data)))
return "", false
}