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

Added possibility to send custom params to mailer #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikoczy
Copy link
Contributor

@mikoczy mikoczy commented Aug 28, 2020

No description provided.

@rootpd
Copy link
Member

rootpd commented Aug 31, 2020

@mikoczy Where those custom_params should be coming from?

@mikoczy
Copy link
Contributor Author

mikoczy commented Aug 31, 2020

from the scenarios dispatcher, like this for example:

$this->dispatcher->dispatch('code', $subscription->user_id, [
    'subscription_id' => $subscription->id,
    'custom_params' => [
        'key1' => 'value1',
        'key2' => 'value2',
    ],
]);

@mikoczy
Copy link
Contributor Author

mikoczy commented Sep 2, 2020

@rootpd what do you think? It would be nice, if the trigger could somehow tell the user, which variables are available to use (not only custom params, but if it is a subscription trigger, user trigger, etc.).

@rootpd
Copy link
Member

rootpd commented Sep 4, 2020

@mikoczy we were thinking about something more complex, that would also include inter-node validation - so that you won't be able to use condition node with condition that cannot be executed because of the type of trigger that got you there.

So I'd rather wait for that implementation instead of adding temporary solution that would have to be removed later on. I think that that is something we'll work on right after we finish working on "before triggers" (e.g. "5 days before end of subscription").

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.

2 participants