diff options
author | Starfall <us@starfall.systems> | 2020-11-20 16:54:00 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-11-20 16:54:00 -0600 |
commit | 19548d0a4bc303ca8017599577e21a6d522eb7bd (patch) | |
tree | ef4ada7e8138aa510b0d54509e99ba1fc30995bc /app/models/export.rb | |
parent | 383bb3804bdbd6caa442283cc96ef0cdbfdb4575 (diff) | |
parent | 24696458bf22c8529b49f89b2791e3e07583b7e0 (diff) |
Merge branch 'glitch' into main
Diffstat (limited to 'app/models/export.rb')
-rw-r--r-- | app/models/export.rb | 12 |
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 |