mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +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:
parent
0f772bdf5b
commit
3e5faffb0d
6 changed files with 69 additions and 13 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue