Skip to content

Commit 2fed221

Browse files
committed
message-id can be nil
e.g. ruby-dev: 93-108
1 parent ebf6152 commit 2fed221

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/message.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def from_mail(mail, list, list_seq)
2929
from = mail.from.encode Encoding::UTF_8, Encoding::KOI8_R
3030
end
3131

32-
message_id = mail.message_id.encode Encoding::UTF_8, invalid: :replace, undef: :replace
32+
message_id = mail.message_id&.encode Encoding::UTF_8, invalid: :replace, undef: :replace
3333

3434
# mail.in_reply_to returns strange Array object in some cases (?), so let's use the raw value
3535
parent_message_id = extract_message_id_from_in_reply_to(mail.header[:in_reply_to]&.value)

0 commit comments

Comments
 (0)