Skip to content

Conversation

@varbhat
Copy link
Contributor

@varbhat varbhat commented Jun 5, 2025

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Context: https://getstream.io/moderation/docs/guides/moderate-username-and-images/

Ruby SDK was missing support for Moderating Usernames and Images. This PR adds the support for that.

Usage:

client.moderation.check_user_profile('user-id', {username: 'bad_username'})
client.moderation.check_user_profile('user-id', {image: 'https://example.com/profile.jpg'})
client.moderation.check_user_profile('user-id', {username: 'bad_username', image: 'https://example.com/profile.jpg'})

Apart from this, I have added a rule to silence Naming/PredicateMethod which was newly introduced in rubocop. verify_webhook function in this SDK didn't satisfy this rule and the rubocop(even the latest commit of master before this PR throws this linter error). Instead of changing the signature of verify_webhook which could possibly break existing systems, I have added a rule to silence it.

@totalimmersion totalimmersion merged commit a3160cc into master Jun 5, 2025
3 of 4 checks passed
@totalimmersion totalimmersion deleted the checkuserprofile branch June 5, 2025 14:59
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