mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
Merge pull request #4409 from Mogztter/fix-nabble-parse-email
FIX: Update Nabble importer to use Email.Receiver new API
This commit is contained in:
commit
aff1efc1f8
@ -116,12 +116,12 @@ class ImportScripts::Nabble < ImportScripts::Base
|
||||
end
|
||||
|
||||
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.body
|
||||
|
||||
selected = receiver.select_body(mail)
|
||||
selected.force_encoding(selected.encoding).encode("UTF-8")
|
||||
body, elided = receiver.select_body
|
||||
body.force_encoding(body.encoding).encode("UTF-8")
|
||||
end
|
||||
|
||||
def create_forum_topics
|
||||
|
Loading…
Reference in New Issue
Block a user