discord: Properly paginate through all users#198
Merged
poVoq merged 1 commit intomatterbridge-org:masterfrom Apr 3, 2026
Merged
discord: Properly paginate through all users#198poVoq merged 1 commit intomatterbridge-org:masterfrom
poVoq merged 1 commit intomatterbridge-org:masterfrom
Conversation
Collaborator
|
What is the effect of this right now before the patch? |
Author
The first (effectively random) 1000 Discord users can be pinged by name from other platforms, the others can not be pinged by name (because their user information is not in the list). By extension, every use of that list that assumes that the list is complete will be broken. |
|
The check is failing because of a formatting issue. You can run diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go
index 29375c3..5c0c7b8 100644
--- a/bridge/discord/discord.go
+++ b/bridge/discord/discord.go
@@ -227,7 +227,7 @@ func (b *Bdiscord) Connect() error {
b.nickMemberMap[member.Nick] = member
}
}
- after = members[len(members) - 1].User.ID
+ after = members[len(members)-1].User.ID
}
b.c.AddHandler(b.messageCreate)(With PR #196 merged you could see the diff in the CI logs.) |
07121d2 to
b286571
Compare
Collaborator
|
Looks good now. Can you still add a changelog entry for it please? |
b286571 to
06cc34c
Compare
06cc34c to
79e97a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fetching one page with 1000 users on it is not going to be enough for some servers.