Prepare to drop EmailLog#topic_id.

This commit is contained in:
Guo Xiang Tan
2018-07-18 10:21:54 +08:00
parent dbfa491ee2
commit 3874d40910
4 changed files with 8 additions and 8 deletions

View File

@ -634,7 +634,7 @@ module Email
def forwarded_reply_key?(email_log, user)
incoming_emails = IncomingEmail
.joins(:post)
.where('posts.topic_id = ?', email_log.topic_id)
.where('posts.topic_id = ?', email_log.topic.id)
.addressed_to(email_log.reply_key)
.addressed_to_user(user)
.pluck(:to_addresses, :cc_addresses)