Skip to content

Add reasons param to listNotifications#3222

Merged
dholms merged 6 commits into
mainfrom
notif-filter
Dec 11, 2024
Merged

Add reasons param to listNotifications#3222
dholms merged 6 commits into
mainfrom
notif-filter

Conversation

@gaearon
Copy link
Copy Markdown
Contributor

@gaearon gaearon commented Dec 10, 2024

This is what I imagine I'll need.

The mentions name is not exactly reflective of the purpose (it'll be any text — so replies, quotes, mentions all count). Could maybe call that "posts" idk. But in the UI we'll probably call it Mentions for familiarity.

Rolled #3224 into this.

@gaearon gaearon requested a review from dholms December 10, 2024 19:03
@gaearon gaearon mentioned this pull request Dec 10, 2024
"type": "array",
"items": {
"type": "string",
"description": "A reason that matches the reason property of #notification."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We originally had a knownValues here, but it was screwing up some types in the route handler and I just didn't think it was a great use of time to debug. This also prevents us from having to duplicate every new reason in 2 locations.

"parameters": {
"type": "params",
"properties": {
"filter": {
Copy link
Copy Markdown
Contributor

@matthieusieben matthieusieben Dec 11, 2024

Choose a reason for hiding this comment

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

Wouldn't reason be less generic and better reflect what will be filtered?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yeah I like that 👍

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks good. I like @matthieusieben's suggestion.

@dholms dholms changed the title Add filter param to listNotifications Add reasons param to listNotifications Dec 11, 2024
@dholms dholms merged commit 207728d into main Dec 11, 2024
@dholms dholms deleted the notif-filter branch December 11, 2024 19:46
@github-actions github-actions Bot mentioned this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants