parent
7b73002a2c
commit
b31f9106a1
4 changed files with 10 additions and 3 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
## Features
|
||||
* Add tags to tumblr posts [#8244](https://github.com/diaspora/diaspora/pull/8244)
|
||||
* Add blocks to the archive export [#8263](https://github.com/diaspora/diaspora/pull/8263)
|
||||
|
||||
# 0.7.15.0
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class Block < ApplicationRecord
|
|||
belongs_to :person
|
||||
belongs_to :user
|
||||
|
||||
delegate :name, to: :person, prefix: true
|
||||
delegate :name, :diaspora_handle, to: :person, prefix: true
|
||||
|
||||
validates :person_id, uniqueness: {scope: :user_id}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ module Export
|
|||
:show_community_spotlight_in_stream,
|
||||
:auto_follow_back,
|
||||
:auto_follow_back_aspect,
|
||||
:strip_exif
|
||||
:strip_exif,
|
||||
:blocks
|
||||
has_one :profile, serializer: FederationEntitySerializer
|
||||
has_many :contact_groups, each_serializer: Export::AspectSerializer
|
||||
has_many :contacts, each_serializer: Export::ContactSerializer
|
||||
|
|
@ -45,6 +46,10 @@ module Export
|
|||
}
|
||||
end
|
||||
|
||||
def blocks
|
||||
object.blocks.map(&:person_diaspora_handle)
|
||||
end
|
||||
|
||||
%i[comments likes poll_participations].each {|collection|
|
||||
delegate collection, to: :person
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ describe Export::UserSerializer do
|
|||
show_community_spotlight_in_stream: user.show_community_spotlight_in_stream,
|
||||
auto_follow_back: user.auto_follow_back,
|
||||
auto_follow_back_aspect: user.auto_follow_back_aspect,
|
||||
strip_exif: user.strip_exif
|
||||
strip_exif: user.strip_exif,
|
||||
blocks: user.blocks
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue