FIX: Update Nabble importer to use Email.Receiver new API

Email.Receiver API changed in 3083657358
This commit is contained in:
Guillaume Grossetie 2016-08-22 14:04:01 +02:00
parent ecaa751455
commit 566ecae0db
1 changed files with 3 additions and 3 deletions

View File

@ -116,12 +116,12 @@ class ImportScripts::Nabble < ImportScripts::Base
end end
def parse_email(msg) def parse_email(msg)
receiver = Email::Receiver.new(msg, skip_sanity_check: true) receiver = Email::Receiver.new(msg)
mail = Mail.read_from_string(msg) mail = Mail.read_from_string(msg)
mail.body mail.body
selected = receiver.select_body(mail) body, elided = receiver.select_body
selected.force_encoding(selected.encoding).encode("UTF-8") body.force_encoding(body.encoding).encode("UTF-8")
end end
def create_forum_topics def create_forum_topics