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

[NV-438] - Add payload content to notification object #612

Closed
novubot opened this issue May 31, 2022 · 15 comments
Closed

[NV-438] - Add payload content to notification object #612

novubot opened this issue May 31, 2022 · 15 comments
Assignees

Comments

@novubot
Copy link

novubot commented May 31, 2022

Why?

After triggering an event and passing a payload object to it, the payload object is never saved on the message entity returned by the notifications API specifically for the notification center usecase.

What?

Persist the payload object inside the generated Notification Message for the channel including the original payload object sent by the API Users.

Where?

The unit responsible for creating the notification message is located inside the trigger-event.usecase.ts file inside the @novu/api package.

Done definition

  • e2e test for the trigger event asserting the created message to contain the payload object when returned by the API.
@scopsy scopsy added good first issue Good for newcomers help wanted Extra attention is needed labels May 31, 2022
@singhgulshan
Copy link

@scopsy This will work for the payload. I just wanted to draw your attention to one issue which m facing. I will share the use case for this.

Scenario
Suppose we are sending notification for invite and we render two button for accept and reject. once we accept or reject the invite i want the buttons to be removed from notification. We can achieve this if we can change the payload part.

Is there any way we can update the specific notification payload?? Using some api or hooks??

@satya-nutella
Copy link

@scopsy can I take this up?

@scopsy
Copy link
Contributor

scopsy commented Jun 10, 2022

Sure @meehawk! Assigned you, let me know if you need any help.

@iampearceman iampearceman added Assigned & In-Progress and removed good first issue Good for newcomers help wanted Extra attention is needed labels Jun 20, 2022
@iampearceman
Copy link
Member

@meehawk Hey! How is it going with adding the payload? Could you maybe give an ETA?
We thought about adding it to our next release

@scopsy
Copy link
Contributor

scopsy commented Jun 26, 2022

Hi @meehawk we really want to push this ticket in the upcoming version since it's blocking a lot of our users for some usecases. Assigning @djabarovgeorge for this one 🙏

Really appreciate your help regardless!

@scopsy
Copy link
Contributor

scopsy commented Jun 27, 2022

Merged in #725

@scopsy scopsy closed this as completed Jun 27, 2022
@scopsy
Copy link
Contributor

scopsy commented Jun 27, 2022

@singhgulshan we have merged this and will deploy soon, regarding the option to update the payload object with API we are planning to add this support in v0.6.0 in the next couple of weeks. Will update you on it.

@singhgulshan
Copy link

@scopsy can we update the same in documentation, so that it is easy for us to integrate payload specific changes?

@scopsy
Copy link
Contributor

scopsy commented Jul 3, 2022

Hi @singhgulshan i've added the interface of IMessage to the docs. You can checkout the payload property: https://docs.novu.co/notification-center/react-components#the-notification-imessage-model

@singhgulshan
Copy link

singhgulshan commented Nov 21, 2022

@scopsy After updating @novu/notification-center to version 0.9.1. I'am not able to use IMessage interface. it says IMessage is not exported. Is this expected behaviour?? As i was using IMessage to customize my notification, so a quick solution would be a great help.

@djabarovgeorge
Copy link
Contributor

Hey @singhgulshan I see the problem, shortly I will create a PR to fix it.
Thanks for raising it up! 👍🏻

@singhgulshan
Copy link

@djabarovgeorge Any ETA for this fix release?

@scopsy
Copy link
Contributor

scopsy commented Nov 22, 2022

@scopsy the IMessages export should be available in 0.9.2 later today. 🙏

@scopsy
Copy link
Contributor

scopsy commented Nov 22, 2022

@singhgulshan could you try upgrading the @novu/notification-center to v0.9.2 please?

@singhgulshan
Copy link

@scopsy It working fine now. Exports are available. Thanks.

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

No branches or pull requests

6 participants