use correct domain for communication channel notification links

fixes issues when confirming a communication channel is
creating a notification that sends to the domain for the
user's original pseudonym

fixes #CNVS-29907

Change-Id: Ibbbd7e0f7c9ec9fe880353e0a856ce6d080c254c
Reviewed-on: https://gerrit.instructure.com/82333
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
This commit is contained in:
James Williams 2016-06-13 07:54:45 -06:00
parent b8be1e68a8
commit 69f5fcaca4
1 changed files with 2 additions and 0 deletions

View File

@ -266,6 +266,8 @@ class Message < ActiveRecord::Base
def link_root_account
@root_account ||= begin
context = self.context
context = self.asset_context if context.is_a?(CommunicationChannel) && self.asset_context
context = context.assignment if context.respond_to?(:assignment) && context.assignment
context = context.rubric_association.context if context.respond_to?(:rubric_association) && context.rubric_association
context = context.appointment_group.contexts.first if context.respond_to?(:appointment_group) && context.appointment_group