diff options
-rw-r--r-- | matterclient/matterclient.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index 70493693..b860ec80 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -622,11 +622,20 @@ func (m *MMClient) initUser() error { //m.log.Debug("initUser(): loading all team data") for _, v := range initData.Teams { m.Client.SetTeamId(v.Id) - mmusers, _ := m.Client.GetProfiles(0, 50000, "") + mmusers, err := m.Client.GetProfiles(0, 50000, "") + if err != nil { + return errors.New(err.DetailedError) + } t := &Team{Team: v, Users: mmusers.Data.(map[string]*model.User), Id: v.Id} - mmchannels, _ := m.Client.GetChannels("") + mmchannels, err := m.Client.GetChannels("") + if err != nil { + return errors.New(err.DetailedError) + } t.Channels = mmchannels.Data.(*model.ChannelList) - mmchannels, _ = m.Client.GetMoreChannels("") + mmchannels, err = m.Client.GetMoreChannels("") + if err != nil { + return errors.New(err.DetailedError) + } t.MoreChannels = mmchannels.Data.(*model.ChannelList) m.OtherTeams = append(m.OtherTeams, t) if v.Name == m.Credentials.Team { |