Skip to content

Add User ID of the person who Initiated the search, as a parameter to the callback method check_username_for_spam in spam checker ModuleAPI #16884

Open
@toshanmugaraj

Description

Description:

Currently, the callback method for check_username_for_spam does not include the user ID of the person who initiated the search as a parameter. This limitation hinders our ability to filter search result effectively and restrict user visibility based on who initiated the search.

To address this issue, we suggest adding a user ID parameter to the callback method. This will allow us to associate the spam username check results and search results with the corresponding user IDs, enabling us to implement more effective spam prevention measures and user visibility controls.

You can find the relevant code that calls the check_username_for_spam method in the user_directory.py file at the following location: user_directory.py#L160-L167.

This enhancement may require updating documentation and deprecating the old callback method.

Additionally, we would like to request the following changes:

  1. Deprecation of the original callback: Please mark the original callback method as deprecated in the documentation, but do not remove it from the codebase.2.
  2. Rename the new callback: As the original name "check_username_for_spam" does not accurately reflect the fact that a full user profile is provided, we suggest renaming the new callback to "check_user_profile_for_spam" to better align with its functionality.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions