Add a recipient interface channel+/transport channelrouter

Created on 6 April 2025, about 1 month ago

Add another default channel router that filters out channels.

Ensure if a recipient matches a particular recipientinterface, then it only goes to a specific channel or channel/transport-combo.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇦🇺Australia dpi Perth, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dpi
  • 🇦🇺Australia dpi Perth, Australia

    In the case where multiple chat channels are configured, greedy channels like Mercure (supports() has minimum requirements), ensure filters filter out for example where a message needs to go to Slack and never mercure.

  • 🇦🇺Australia dpi Perth, Australia

    To prevent notifications getting routed to catch-all channels, like Chat, this should by default error out (exception) if a notification type is not covered by a configured interface -> channel/transport mapping

    This should help with scenarios like:

    Notification is routing to a Slack recipient.
    The mercure transport is enabled (is a chat channel transport)
    The mercure transport will accept the notification with slack recipient by default.

    We add something that can limit unintended transports.

    \Drupal\notifier_chat_channel\Transport\Slack\Recipient\SlackRecipientInterface: chat/slack

    IF a message is routed which dosent match a class/iface/abstract etc combo, then throw exception.

    This should reduce the number of custom channelrouter services needed, and also help to prevent unintended message routing if for example more transports within a channel are added progressively.

Production build 0.71.5 2024