about summary refs log tree commit diff
path: root/app/models/export.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/export.rb')
-rw-r--r--app/models/export.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/export.rb b/app/models/export.rb
index cab01f11a..5216eed5e 100644
--- a/app/models/export.rb
+++ b/app/models/export.rb
@@ -9,6 +9,14 @@ class Export
     @account = account
   end
 
+  def to_bookmarks_csv
+    CSV.generate do |csv|
+      account.bookmarks.includes(:status).reorder(id: :desc).each do |bookmark|
+        csv << [ActivityPub::TagManager.instance.uri_for(bookmark.status)]
+      end
+    end
+  end
+
   def to_blocked_accounts_csv
     to_csv account.blocking.select(:username, :domain)
   end
@@ -55,6 +63,10 @@ class Export
     account.statuses_count
   end
 
+  def total_bookmarks
+    account.bookmarks.count
+  end
+
   def total_follows
     account.following_count
   end