feat: Prefer reply-to over from in email channels (#3837)
Co-authored-by: root <root@support.loomio.com>
This commit is contained in:
@@ -91,11 +91,11 @@ class MailPresenter < SimpleDelegator
|
|||||||
|
|
||||||
def from
|
def from
|
||||||
# changing to downcase to avoid case mismatch while finding contact
|
# changing to downcase to avoid case mismatch while finding contact
|
||||||
@mail.from.map(&:downcase)
|
(@mail.reply_to.presence || @mail.from).map(&:downcase)
|
||||||
end
|
end
|
||||||
|
|
||||||
def sender_name
|
def sender_name
|
||||||
Mail::Address.new(@mail[:from].value).name
|
Mail::Address.new((@mail[:reply_to] || @mail[:from]).value).name
|
||||||
end
|
end
|
||||||
|
|
||||||
def original_sender
|
def original_sender
|
||||||
|
|||||||
Reference in New Issue
Block a user