Skip to content
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 helper function for checking if user is ignored #4691

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

tessalt
Copy link
Contributor

@tessalt tessalt commented Nov 7, 2024

What does this PR do?

We were getting errors Cannot read properties of null (reading 'some') from here. Obviously we need to add a check for user.ignoredUsers before checking .some on that array, but when I looked for this pattern elsewhere, I noticed multiple // TODO: extract function notes, so I extracted it into a function.

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

What changes to the GraphQL/Database Schema does this PR introduce?

none

Does this PR introduce any new environment variables or feature flags?

NA

If any indexes were added, were they added to INDEXES.md?

NA

How do I test this PR?

  • with notifications enabled, as user 1, reply to user 2
  • as user 2, ensure you have received a notification
  • as user 1, ignore user 2
  • as user 2, reply to user 1
  • as user 1, ensure that you DO NOT receive a notification
  • as user 1, un-ignore user 2
  • as user 2, reply to user 1
  • as user 1, ensure you DO receive a notification

Copy link

netlify bot commented Nov 7, 2024

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit eb8fdec
🔍 Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/672d12ea34c4f90008daf7fb

@tessalt tessalt requested review from kabeaty and nick-funk November 7, 2024 19:21
Copy link
Contributor

@kabeaty kabeaty 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 to me, and all manual testing functions as expected!

Copy link
Contributor

@nick-funk nick-funk left a comment

Choose a reason for hiding this comment

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

good fix, thank you!

@tessalt tessalt merged commit b751a91 into develop Nov 8, 2024
6 checks passed
@tessalt tessalt deleted the fix/ignored-user-replies branch November 8, 2024 16:45
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