diff options
| author | Ken'ichi Fukamachi <fukachan@fml.org> | 2018-09-08 11:30:51 +0900 |
|---|---|---|
| committer | Ken'ichi Fukamachi <fukachan@fml.org> | 2018-09-08 12:49:20 +0900 |
| commit | 5c85320ed48d0ca43cbf28648d8d021fe062af9a (patch) | |
| tree | ed78e2e8186ee1a893c3cabac48652d80008a7bf /fml/lib/FML | |
| parent | 22d2072d8b937d0a0c13d842b5ea5c50fb13bd4d (diff) | |
| download | fml8-5c85320ed48d0ca43cbf28648d8d021fe062af9a.tar.gz fml8-5c85320ed48d0ca43cbf28648d8d021fe062af9a.tar.bz2 fml8-5c85320ed48d0ca43cbf28648d8d021fe062af9a.zip | |
subject handling is changed to use Mail::Message::Subject based e.g. mime_header_decode().
Mail::Message::Subject
Diffstat (limited to 'fml/lib/FML')
| -rw-r--r-- | fml/lib/FML/Article/Thread.pm | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fml/lib/FML/Article/Thread.pm b/fml/lib/FML/Article/Thread.pm index ee614b2c..52bfe13d 100644 --- a/fml/lib/FML/Article/Thread.pm +++ b/fml/lib/FML/Article/Thread.pm @@ -159,20 +159,15 @@ sub check_if_article_is_reply_message my $thread = $self->{ _thread_object }; my $article = $self->{ _article_object }; my $header = $msg->whole_message_header(); - + # 1) get subject. mime-decode it if needed. my $subject = $header->get('subject'); - if ($subject =~ /=\?/o) { - my $string = new Mail::Message::String $subject; - $string->mime_decode(); - $string->charcode_convert_to_internal_code(); - $subject = $string->as_str(); - } - + use Mail::Message::Subject; + my $subj = new Mail::Message::Subject $subject; + $subj->mime_header_decode(); + # 2) it looks the subject has a reply tag ? - use FML::Header::Subject; - my $subj = new FML::Header::Subject; - if ($subj->is_reply($subject)) { + if ($subj->has_reply_tag()) { $thread->set_article_status($id, $state_followed); } else { |
