summaryrefslogtreecommitdiff
path: root/fml/lib/FML
diff options
context:
space:
mode:
authorKen'ichi Fukamachi <fukachan@fml.org>2018-09-08 11:30:51 +0900
committerKen'ichi Fukamachi <fukachan@fml.org>2018-09-08 12:49:20 +0900
commit5c85320ed48d0ca43cbf28648d8d021fe062af9a (patch)
treeed78e2e8186ee1a893c3cabac48652d80008a7bf /fml/lib/FML
parent22d2072d8b937d0a0c13d842b5ea5c50fb13bd4d (diff)
downloadfml8-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.pm17
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 {