Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `.github/ISSUE_TEMPLATE/bug_report.md`: Upstream added the `bug` label to bug reports. Did the same. - `app/services/fan_out_on_write_service.rb`: Upstream put DMs back into timelines, glitch-soc was already doing it. Ignored upstream changes.
This commit is contained in:
@@ -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
|
||||
|
@@ -24,7 +24,7 @@ class Import < ApplicationRecord
|
||||
|
||||
belongs_to :account
|
||||
|
||||
enum type: [:following, :blocking, :muting, :domain_blocking]
|
||||
enum type: [:following, :blocking, :muting, :domain_blocking, :bookmarks]
|
||||
|
||||
validates :type, presence: true
|
||||
|
||||
|
Reference in New Issue
Block a user