-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix fetching list of channels #491
Conversation
There are other places hardcoding page 0 with a larger page limit (5k and 50k) but that can be addressed in future PRs. |
89ca8b8
to
e144630
Compare
@@ -808,7 +808,7 @@ func (u *User) addUserToChannelWorker6(channels <-chan *bridge.ChannelInfo, thro | |||
if postlist == nil { | |||
// if the channel is not from the primary team id, we can't get posts | |||
if brchannel.TeamID == u.br.GetMe().TeamID { | |||
logger.Errorf("something wrong with getPostsSince for %s for channel %s (%s)", u.Nick, brchannel.ID, brchannel.Name) | |||
logger.Errorf("something wrong with getPostsSince for %s for channel %s (%s)", u.Nick, channame, brchannel.ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive by fix, scroll up 20 lines to 788
@hloeung could you try with matterbridge/matterclient#1 (based upon your code) |
@42wim, Sure! Trying that now. |
@42wim LGTM. Also cleaner fix, thanks. One thing, can we make the found X messages INFO?
I think those are useful or nice to see. |
Oh, also FWIW, on working on this, I noticed quite a few calls to UpdateChannelsTeam(). With this change, it means even more requests due to pagination. Maybe something to consider for optimising and improving next. |
wrt Info vs Debug, it's very subjective of course, but I think it's more debug info than actual needed info. |
heh no problem. Filed #492 for the frequency of these calls |
Superseded by #494 |
In addition to #490, this fixes the retrieval of the list of the list of channels.
Per #243 & #248, the Mattermost server has a hardcoded maximum page limit of 200. So when adding debugging output, I get:
With this, we get higher numbers:
This is also what's causing #479