From 0a4bae9b84ad2d4131c8fbbb3f08796cca9c0903 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Wed, 21 Mar 2012 16:38:33 -0600 Subject: [PATCH] use global ids for message reply to addresses fixes #7723 test plan: * send someone a message on another shard * reply to that message * it should be added to the conversation Change-Id: Id4439bd63f8805660d302a04e54bd47f304e29b2 Reviewed-on: https://gerrit.instructure.com/9545 Tested-by: Hudson Reviewed-by: Brian Palmer --- app/models/message.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/message.rb b/app/models/message.rb index c531148d482..02e894be8c2 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -309,7 +309,7 @@ class Message < ActiveRecord::Base end def reply_to_secure_id - Canvas::Security.hmac_sha1(self.id.to_s) + Canvas::Security.hmac_sha1(self.global_id.to_s) end def reply_to_address @@ -318,7 +318,7 @@ class Message < ActiveRecord::Base res = self.from if self.context_type == 'ErrorReport' unless res addr, domain = HostUrl.outgoing_email_address.split(/@/) - res = "#{addr}+#{self.reply_to_secure_id}-#{self.id}@#{domain}" + res = "#{addr}+#{self.reply_to_secure_id}-#{self.global_id}@#{domain}" end end