diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-16 01:47:39 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-16 01:47:39 -0600 |
commit | acd3ed928f333c7e68277fc7b00bd5dec9d4ff01 (patch) | |
tree | 6c44b0592845fd8dbf65aa3c8bb3f068ff1e347f /app/services | |
parent | 5d864b1e40fde9d42c4da0544f57bf7eefe2eca4 (diff) |
support importing posts with hidden flag set
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/import_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/import_service.rb b/app/services/import_service.rb index c4bc7d74c..93a0d8383 100644 --- a/app/services/import_service.rb +++ b/app/services/import_service.rb @@ -23,6 +23,7 @@ class ImportService < BaseService 'sensitive', 'language', 'local_only', + 'hidden', 'visibility', ].freeze @@ -150,6 +151,7 @@ class ImportService < BaseService json['language'] = ISO_639.find(json['language'])&.alpha2 || @account.user_default_language&.presence || 'en' json['local_only'] = @account.user_always_local_only? || [true, 1, "1"].include?(json['local_only']) json['visibility'] = VISIBILITIES[json['visibility'].to_i] || :unlisted + json['hidden'] = [true, 1, "1"].include?(json['hidden']) json['imported'] = true # drop a nonexistant conversation id |