about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-21 01:58:07 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:17:31 -0500
commitd6f37c6ae01c57164a69c6b7e4934d844a0c2a3a (patch)
treed6fc393472fc7b3e056cb1a5a7c13c3bd1de77f6 /app/models
parentcbdadfb5fa8088edb4b0ec879faf58b0d8272664 (diff)
handle importing posts from json dumps
Diffstat (limited to 'app/models')
-rw-r--r--app/models/import.rb4
-rw-r--r--app/models/status.rb3
2 files changed, 5 insertions, 2 deletions
diff --git a/app/models/import.rb b/app/models/import.rb
index a7a0d8065..a6dc30549 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -17,14 +17,14 @@
 #
 
 class Import < ApplicationRecord
-  FILE_TYPES = %w(text/plain text/csv).freeze
+  FILE_TYPES = %w(text/plain text/html text/csv application/json application/json+ld).freeze
   MODES = %i(merge overwrite).freeze
 
   self.inheritance_column = false
 
   belongs_to :account
 
-  enum type: [:following, :blocking, :muting, :domain_blocking]
+  enum type: [:following, :blocking, :muting, :domain_blocking, :statuses]
 
   validates :type, presence: true
 
diff --git a/app/models/status.rb b/app/models/status.rb
index 5f25e86f6..9095c3688 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -29,6 +29,9 @@
 #  network                :boolean          default(FALSE), not null
 #  content_type           :string
 #  footer                 :text
+#  edited                 :boolean
+#  imported               :boolean
+#  origin                 :string
 #
 
 class Status < ApplicationRecord