-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add an API to filter user directory searches by MXID or display name. #34
Conversation
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.
otherwise seems fine
I think I've hit all the comments here, please take another look! |
|
||
# Check whether the user ID or display name matches any of the banned | ||
# patterns. | ||
return self.is_user_banned(user_profile["user_id"]) or self.is_user_banned(user_profile["display_name"]) |
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.
I meant to keep the user ID as its own arg, but this is fine too
Thanks! |
This would depend on matrix-org/synapse#6888 to be functional, it is likely worth taking a quick look at the API design in there first.
As noted in the synapse PR, I don't love the name of the chosen API method. Any suggestions would be appreciated!
I'm unsure if it makes sense to apply the same filtering (
is_user_banned
) over both the MXID and the display name, but it seemed like the simplest change to start with. What are your thoughts on this?Related to matrix-org/synapse#5648.