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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webpush): load user in push sub query #1894

Merged
merged 2 commits into from Aug 9, 2021
Merged

fix(webpush): load user in push sub query #1894

merged 2 commits into from Aug 9, 2021

Conversation

TheCatLady
Copy link
Collaborator

Description

"Management" type notifications (e.g., Media Requested and Media Automatically Approved) are failing to send via web push due to the user relation not being loaded in the push sub query:

(node:28) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'displayName' of undefined
     at /app/dist/lib/notifications/agents/webpush.js:153:41
     at Array.map (<anonymous>)
     at WebPushAgent.send (/app/dist/lib/notifications/agents/webpush.js:150:40)
 (node:28) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 44)

Fixes issue reported by barkcollar on Discord.

Props to @danshilm for finding the root cause of this bug! 馃憤馃徎

Screenshot (if UI-related)

N/A

To-Dos

  • Successful build yarn build

Issues Fixed or Closed

  • Fixes issue noted above

@TheCatLady TheCatLady requested a review from sct as a code owner July 13, 2021 22:32
Copy link
Owner

@sct sct left a comment

Choose a reason for hiding this comment

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

鉂わ笍 Thanks

@sct sct enabled auto-merge (squash) August 9, 2021 05:22
@sct sct merged commit 6f2db6a into develop Aug 9, 2021
@sct sct deleted the fix/webpush branch August 9, 2021 05:27
nicospz pushed a commit to nicospz/overseerr that referenced this pull request Aug 9, 2021
@github-actions
Copy link

馃帀 This PR is included in version 1.26.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants