8000 feat: guild messages search by kshitijanurag · Pull Request #528 · disgoorg/disgo · GitHub
[go: up one dir, main page]

Skip to content

feat: guild messages search - #528

Merged
topi314 merged 1 commit into
disgoorg:masterfrom
kshitijanurag:master
Mar 22, 2026
Merged

topi314 merged 1 commit into
disgoorg:masterfrom
kshitijanurag:master

Conversation

@kshitijanurag
Copy link
Copy Markdown
Contributor

@Qreepex Qreepex left a comment •
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

but im not sure if the indexing "pseudo error" is handled properly cuz it has a 202 status code
@topi314 ??

@topi314
topi314 commented Mar 21, 2026 •
Copy link
Copy Markdown
Member

lgtm

but im not sure if the indexing "pseudo error" is handled properly cuz it has a 202 status code @topi314 ??

nope, the rest client checks for 200, 201 & 204 rn
should probably check for 200-299 range

ah wtf, they return a 202 with an error like response xd

@topi314 topi314 left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly fine, but we need to correctly handle the http 202 in case of indexing. Ideally we would retry the request automatically too.

I am kinda unsure how to exactly handle it but the least worst way is to probably add all the error fields to the GuildMessagesSearchResult structure or embed an extra one in there.

Then we can add the retry mechanic to SearchGuildMessages.
Not ideal but the best we can do.

rest.Client also needs to correctly handle http 202s

Comment thread discord/guild.go Resolved
Comment thread discord/guild.go Resolved
Comment thread rest/rest_error.go Resolved
Comment thread rest/guilds.go Resolved
Comment thread discord/guild.go Resolved
Comment thread discord/guild.go Resolved
Comment thread discord/guild.go Resolved
Comment thread discord/guild.go Resolved
Comment thread discord/guild.go Resolved
Comment thread discord/guild.go Resolved
@topi314 topi314 left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, didnt want to approve

Comment thread rest/rest_client.go Resolved
Comment thread discord/guild.go Resolved
@kshitijanurag
kshitijanurag requested a review from topi314 March 22, 2026 18:47
@kshitijanurag
kshitijanurag force-pushed the master branch 2 times, most recently from 236c644 to 73d99b1 Compare March 22, 2026 18:51
Comment thread rest/guilds.go Resolved
Comment thread rest/rest_client.go Resolved
Comment thread rest/guilds.go Resolved
Comment thread rest/guilds.go Resolved
@topi314
topi314 merged commit 4c8775e into disgoorg:master Mar 22, 2026
4 checks passed
@topi314
topi314 commented Mar 22, 2026
Copy link
Copy Markdown
Member

thanks!

MohmmedAshraf pushed a commit to MohmmedAshraf/disgo that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants

0