Add limited_scope support
This commit is contained in:
parent
ec16074def
commit
c1f6d22ad2
17 changed files with 107 additions and 10 deletions
|
@ -133,6 +133,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
reply: @status_parser.reply,
|
||||
sensitive: @account.sensitized? || @status_parser.sensitive || false,
|
||||
visibility: @status_parser.visibility,
|
||||
limited_scope: @status_parser.limited_scope,
|
||||
searchability: searchability,
|
||||
thread: replied_to_status,
|
||||
conversation: conversation_from_uri(@object['conversation']),
|
||||
|
|
|
@ -86,6 +86,14 @@ class ActivityPub::Parser::StatusParser
|
|||
end
|
||||
end
|
||||
|
||||
def limited_scope
|
||||
if @object['limitedScope'] == 'Mutual'
|
||||
:mutual
|
||||
else
|
||||
:none
|
||||
end
|
||||
end
|
||||
|
||||
def language
|
||||
if content_language_map?
|
||||
@object['contentMap'].keys.first
|
||||
|
|
|
@ -221,6 +221,10 @@ class ActivityPub::TagManager
|
|||
nil
|
||||
end
|
||||
|
||||
def limited_scope(status)
|
||||
status.mutual_limited? ? 'Mutual' : ''
|
||||
end
|
||||
|
||||
def subscribable_by(account)
|
||||
account.dissubscribable ? [] : [COLLECTIONS[:public]]
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue