mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:27:34 +00:00
Mail: Make checking for headers in DataItem case insensitive
For example, the servers I tested this on sent "Subject" which matched what I was checking for. However, some servers can send "SUBJECT" which didn't match and would cause an assertion failure.
This commit is contained in:
parent
3948161c14
commit
8956b5fb55
1 changed files with 4 additions and 1 deletions
|
@ -298,7 +298,10 @@ void MailWidget::selected_mailbox()
|
||||||
return false;
|
return false;
|
||||||
if (!data_item.section->headers.has_value())
|
if (!data_item.section->headers.has_value())
|
||||||
return false;
|
return false;
|
||||||
return data_item.section->headers->contains_slow(search_header);
|
auto header_iterator = data_item.section->headers->find_if([&search_header](auto& header) {
|
||||||
|
return header.equals_ignoring_case(search_header);
|
||||||
|
});
|
||||||
|
return header_iterator != data_item.section->headers->end();
|
||||||
};
|
};
|
||||||
|
|
||||||
auto subject_iterator = body_data.find_if([&data_item_has_header](Tuple<IMAP::FetchCommand::DataItem, Optional<String>>& data) {
|
auto subject_iterator = body_data.find_if([&data_item_has_header](Tuple<IMAP::FetchCommand::DataItem, Optional<String>>& data) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue