mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: mbox importer improvements (#16557)
* FIX: support specifying parent_category_id in mbox import metadata * FIX: elide tabs from topic titles * FIX: optionally fix Mailman from: addresses * DEV: optionally elide anything up to the last = in email addresses * Fix Mailmain broken from: detection
This commit is contained in:

committed by
GitHub

parent
0f772bdf5b
commit
3e5faffb0d
@ -458,7 +458,16 @@ class ImportScripts::Base
|
||||
.where("LOWER(name) = ?", opts[:name].downcase.strip)
|
||||
.first
|
||||
|
||||
return existing if existing
|
||||
if existing
|
||||
if import_id && existing.custom_fields["import_id"] != import_id
|
||||
existing.custom_fields["import_id"] = import_id
|
||||
existing.save!
|
||||
|
||||
add_category(import_id, existing)
|
||||
end
|
||||
|
||||
return existing
|
||||
end
|
||||
|
||||
post_create_action = opts.delete(:post_create_action)
|
||||
|
||||
|
Reference in New Issue
Block a user