feat: Prefer reply-to over from in email channels (#3837)
Co-authored-by: root <root@support.loomio.com>
This commit is contained in:
parent
4201b57315
commit
e9a162e71a
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue