Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can a message be sent using multiple "send methods"? For example, can a user receive both SMS and email for _ONE_ message?
Has anyone tried modifying the UI so that a user can choose multiple "send methods" in their notification screen?
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedNope, this is not supported atm. We'll be doing it later possibly for 6.x, not for 5.x though.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
darrenmothersele CreditAttribution: darrenmothersele commentedI thought I'd open this issue again rather than create a new one to ask exactly the same thing.
I would like to send a message to multiple targets via this API, but looking at messaging_message_send() it doesn't seem to support this.
Is there an undocumented feature that supports this? Is there a plan to include this functionality? or, would you recommend I write a new sending method plugin that dispatches the message using a selection of other existing send method plugins?
Comment #4
Jose Reyero CreditAttribution: Jose Reyero commented> would you recommend I write a new sending method plugin that dispatches the message using a selection of other existing send method plugins?
That sounds like a great idea. It would be welcomed for the 4.x branch
About the current messaging API, it is as easy as sending the message twice.
Comment #5
christianchristensen CreditAttribution: christianchristensen commentedThis is an initial attempt at adding multiple send methods to the messaging selection options. It seems the API gives enough abstraction that passing around the multiple selections inside of the user object leaves only cleaning up the use of the "send method" at the consuming endpoints. One place this immediately stands out is the notifications module (e.g. #329412: enable muliple Sending Methods), where additional considerations are necessary for handling the array rather than the singular sending method.
Ideally this needs to also have a patch for forward porting to 4.x (have not looked into what is necessary there yet).
Comment #6
christianchristensen CreditAttribution: christianchristensen commentedRelated #1101806: Multiple messaging endpoints support.
Comment #7
christianchristensen CreditAttribution: christianchristensen commentedPatchfile for drush make.
Comment #8
christianchristensen CreditAttribution: christianchristensen commentedQuick update to cleanup array_filter
Comment #9
christianchristensen CreditAttribution: christianchristensen commentedUpdating this patch to ensure messaging array format on return.
Comment #10
drvdt CreditAttribution: drvdt commentedany path for D7?
Thanks