Skip to content

Commit

Permalink
feat: added support to override default channel (#311)
Browse files Browse the repository at this point in the history
* feat: added support to override default channel

* chore: updated ace version

* feat: updated logic to specify channel by name
  • Loading branch information
sohailfatima authored Oct 14, 2024
1 parent d882dbd commit c764010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion edx_ace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .recipient import Recipient
from .recipient_resolver import RecipientResolver

__version__ = '1.11.2'
__version__ = '1.11.3'


__all__ = [
Expand Down
4 changes: 3 additions & 1 deletion edx_ace/channel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ def get_channel_for_message(channel_type, message):
channel_names = []

if channel_type == ChannelType.EMAIL:
if message.options.get('transactional'):
if message.options.get('override_default_channel'):
channel_names = [message.options.get('override_default_channel')]
elif message.options.get('transactional'):
channel_names = [settings.ACE_CHANNEL_TRANSACTIONAL_EMAIL, settings.ACE_CHANNEL_DEFAULT_EMAIL]
else:
channel_names = [settings.ACE_CHANNEL_DEFAULT_EMAIL]
Expand Down

0 comments on commit c764010

Please sign in to comment.