This is probably related to #329412: enable muliple Sending Methods; also - there is a patch in messaging that is necessary for this to work #309461: Multiple Send methods.

This patch aims to add support to notifications methods to allow a user object to pass multiple messaging endpoints, such that multiple subscriptions are added at that point in time. Clearly the notifications framework supports multiple subscriptions to different messaging endpoints. The thought here is to take it a step further and allow a user to add *default* multiple selections and have notifications add those default as subscriptions on a notification add.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

christianchristensen’s picture

Patch correction...

christianchristensen’s picture

Patchfile for drush make.

christianchristensen’s picture

Another quick update - include an array_filter on the provided defaults to filter out the non-defaults.

travist’s picture

Found an issue with the patch above. It is possible to fall into an infinite function recursion if the user does not have a send_method already defined in their settings. This patch is better.

christianchristensen’s picture

Nice catch travist! That patch is indeed better (but, I think it still provides the flexibility to messaging is now able to ease into multiple endpoints)

pdrake’s picture

Fixed a couple of logic errors. See attached. Thanks for the help on this travist.

pdrake’s picture

Slightly fixed version of the above patch.

travist’s picture

Had to pull in the patch from #1075862: Notifications queuing adds a lot of time to node/comment inserts into this because it was causing a conflict. Here is a re-roll with that patch included.

travist’s picture

Apparently, a previous patch removed a portion of the original. Here is the updated patch.

travist’s picture

Changed a variable to control the queue immediate flag.

travist’s picture

Changed this patch back to the original by removing the reference to #1075862: Notifications queuing adds a lot of time to node/comment inserts since it really doesn't apply here.

christianchristensen’s picture

Updated this patch to be cognizant of notification_lite enqueue options with multiple send methods.

christianchristensen’s picture

Clean up whitespace diff