Create new notifications for real-time changes#3031
Draft
JacobKH123 wants to merge 3 commits into
Draft
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Mar 18, 2026
691f5df to
4c86aa2
Compare
4c86aa2 to
12f775d
Compare
45895bb to
cbdf1de
Compare
12f775d to
1b11aa4
Compare
1b11aa4 to
c423bec
Compare
cbdf1de to
1cb8795
Compare
1cb8795 to
f44515a
Compare
c423bec to
0de81f8
Compare
f44515a to
444128d
Compare
23cf17a to
9d84030
Compare
2c7aa29 to
e130b74
Compare
6022978 to
c785241
Compare
e130b74 to
8f66d6b
Compare
c785241 to
5073eb2
Compare
4a921a4 to
9c9574d
Compare
5073eb2 to
70970c9
Compare
Comment on lines
+1497
to
+1505
| await notificationService.create( | ||
| handle, | ||
| notificationRecipientIds, | ||
| "NEW_FEEDBACK_FORM", | ||
| "Nytt tilbakemeldingsskjema tilgjengelig", | ||
| `Tilbakemeldingsskjema for ${event.title} er nå tilgjengelig. Gi din tilbakemelding før ${formattedDeadline}.`, | ||
| `${configuration.WEB_PUBLIC_ORIGIN}/tilbakemelding/${event.id}`, | ||
| "URL" | ||
| ) |
There was a problem hiding this comment.
Arguments are passed in the wrong order to notificationService.create(). The URL is being passed as actorGroupId (6th parameter), "URL" as payloadType (7th parameter), and the payload (8th parameter) is missing entirely.
The method signature is:
create(handle, recipientIds, notificationType, title, shortDescription, actorGroupId, payloadType, payload)This should be:
await notificationService.create(
handle,
notificationRecipientIds,
"NEW_FEEDBACK_FORM",
"Nytt tilbakemeldingsskjema tilgjengelig",
`Tilbakemeldingsskjema for ${event.title} er nå tilgjengelig. Gi din tilbakemelding før ${formattedDeadline}.`,
null, // actorGroupId
"URL", // payloadType
`${configuration.WEB_PUBLIC_ORIGIN}/tilbakemelding/${event.id}` // payload
)This will cause the notification link to be stored incorrectly and users won't be able to navigate to the feedback form.
Suggested change
| await notificationService.create( | |
| handle, | |
| notificationRecipientIds, | |
| "NEW_FEEDBACK_FORM", | |
| "Nytt tilbakemeldingsskjema tilgjengelig", | |
| `Tilbakemeldingsskjema for ${event.title} er nå tilgjengelig. Gi din tilbakemelding før ${formattedDeadline}.`, | |
| `${configuration.WEB_PUBLIC_ORIGIN}/tilbakemelding/${event.id}`, | |
| "URL" | |
| ) | |
| await notificationService.create( | |
| handle, | |
| notificationRecipientIds, | |
| "NEW_FEEDBACK_FORM", | |
| "Nytt tilbakemeldingsskjema tilgjengelig", | |
| `Tilbakemeldingsskjema for ${event.title} er nå tilgjengelig. Gi din tilbakemelding før ${formattedDeadline}.`, | |
| null, | |
| "URL", | |
| `${configuration.WEB_PUBLIC_ORIGIN}/tilbakemelding/${event.id}` | |
| ) | |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
9c9574d to
e1ef60b
Compare
70970c9 to
1b4998d
Compare
e1ef60b to
965de5c
Compare
b7221a8 to
90b5927
Compare
965de5c to
49cc037
Compare
90b5927 to
f370a79
Compare
49cc037 to
a79f78c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.