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

feat: add actor to system variables #4278

Merged

Conversation

ainouzgali
Copy link
Contributor

@ainouzgali ainouzgali commented Oct 1, 2023

What change does this PR introduce?

Add actor to system variables, allows the use of the actor's subscriber data in editor + allows creation and update of the subscriber.

I still need to add tests.

Screen Shot 2023-10-01 at 17 00 18 Screen Shot 2023-10-01 at 17 00 38 Screen Shot 2023-10-01 at 17 00 48 Screen Shot 2023-10-01 at 17 01 06 Screen Shot 2023-10-01 at 17 01 22

Why was this change needed?

Other information (Screenshots)

@linear
Copy link

linear bot commented Oct 1, 2023

NV-2864 actor variables are not working in step editors like {{actor.firstName}}

Reproduction steps:-

  1. create a workflow with in-app step

  2. write this content in in-app editor

    {{subscriber.firstName}}, {{actor.firstName}} has mentioned you in {{page}}
    
  3. Trigger the workflow as per below sample code

    await novu.subscribers.trigger("workflowIdentifier", {
      to: "subscriberId",
      payload: {
        "page": "Weekly Update page"
      },
      actor: "actorId"
    });
    
  4. As per step 2 this should be content

    subscriberFirstName, actorFirstName has mentioned you in Weekly Update page
    
  5. But actor first name will not be present. as actor variables are not accessible in editors

@ainouzgali ainouzgali self-assigned this Oct 2, 2023
Copy link
Contributor

@scopsy scopsy left a comment

Choose a reason for hiding this comment

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

🎉

@scopsy scopsy merged commit c02d087 into next Oct 23, 2023
26 of 27 checks passed
@scopsy scopsy deleted the nv-2864-actor-variables-are-not-working-in-step-editors-like branch October 23, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants