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

Any ETA on Dynamic Recipients? #23

Open
mufi-siebird opened this issue Mar 21, 2024 · 5 comments
Open

Any ETA on Dynamic Recipients? #23

mufi-siebird opened this issue Mar 21, 2024 · 5 comments
Labels
Feature Request New feature or request

Comments

@mufi-siebird
Copy link

https://plugins.doublesecretagency.com/notifier/recipients/types/dynamic-recipients

Do we have any approx date on when we will be able to use this feature?

@lindseydiloreto
Copy link
Contributor

lindseydiloreto commented Mar 26, 2024

Great question... I don't have a specific ETA, hopefully within the next month or so. We're currently focused on making sure all of our plugins are compatible and stable with Craft 5.

Out of curiosity, what is the specific use-case? How do you picture yourself using Dynamic Recipients?

I'm trying to get a sense of exactly what people will need out of that feature.

@lindseydiloreto lindseydiloreto added the Feature Request New feature or request label Mar 26, 2024
@johnj24
Copy link

johnj24 commented May 8, 2024

Hi, Lindsey. In the beta version, I believe this was called Custom Users, correct? At that time, I was able to get a collection of users using some custom twig code in the control panel. In my instance, I used a Matrix field to let the client select which users to include on an entry and those selected users were the only ones who got the notifications when the entry was created/updated.

Is this how you see Dynamic Recipients working? Is there any way to do this kind of thing currently with version 1 or 2? There doesn't seem to be a way from what I can tell.

Also, while I'm here, a big thanks for the revamped UI (title/description fields especially) and the new Assets upload trigger.

@lindseydiloreto
Copy link
Contributor

lindseydiloreto commented May 8, 2024

Hi John! That's correct, Dynamic Recipients are an evolution of Custom Users.

Technically, almost any workaround is possible using the {% skipMessage %} tag. In Twig, you can write the logic which permits or denies each individual message from being sent.

For a more complex situation like yours, the message template might include something like this...

{##
 # Use `entry.yourMatrixField` to compile an array of permitted User IDs.
 # The `recipientIds` is a hard-coded example of what to provide.
 #}

{# Example array #}
{% set recipientIds = [33, 42, 101] %}

{# If not one of the intended recipients, skip sending this message #}
{% if recipient.user.id not in recipientIds %}
    {% skipMessage "User is not an intended recipient." %}
{% endif %}

Worth noting that you'll need to cast a wider net when specifying which Users should receive the notification... the skipMessage tag filters out recipients from a larger pool.

If you know the subset of Users which could potentially receive the message, you can select just those Users (or a group) in the Notification configuration.


If all of that sounds like too much effort, you could theoretically sit on the beta version a little longer. I don't know the exact ETA, but I'm hopeful that it will be out within the next 30 days.

@steverowling
Copy link

Are you planning on adding the Dynamic Recipients feature to the Craft 4 version of the plugin? I have a potential client that has a requirement for notifications, but would need the dynamic recipients feature to make it work for them. For various reasons, the site can't be upgraded to Craft 5 for a few months, but they need the notification requirement before then.

@lindseydiloreto
Copy link
Contributor

@steverowling Yes, that is still very much the plan. Sorry for blowing way past the previous ETA.

We've been knocked a little off course by a backlog of client work (and some expected summer travels). Notifier 1.1 is sitting in a half-finished state, and I'm eager to get back and button it up. I'm hesitant to provide another ETA, but I promise this feature is near the top of the list.

Fingers crossed I'll be turning my attention back to Notifier within the next few weeks. 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants