FIX: Update Nabble importer to use Email.Receiver new API
Email.Receiver API changed in 3083657358
This commit is contained in:
parent
ecaa751455
commit
566ecae0db
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue