mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user