Skip to content

Commit

Permalink
Fix: LoginOnlyの名前空間も変更
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Oct 10, 2023
1 parent e61350c commit 38370c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/lib/activitypub/activity/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def visibility_from_audience
:public
elsif audience_cc.any? { |cc| ActivityPub::TagManager.instance.public_collection?(cc) }
:unlisted
elsif audience_to.include?('as:LoginOnly') || audience_to.include?('LoginUser')
elsif audience_to.include?('kmyblue:LoginOnly') || audience_to.include?('as:LoginOnly') || audience_to.include?('LoginUser')
:login
elsif audience_to.include?(@account.followers_url)
:private
Expand Down
2 changes: 1 addition & 1 deletion app/lib/activitypub/parser/status_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def visibility
:public
elsif audience_cc.any? { |cc| ActivityPub::TagManager.instance.public_collection?(cc) }
:unlisted
elsif audience_to.include?('as:LoginOnly') || audience_to.include?('LoginUser')
elsif audience_to.include?('kmyblue:LoginOnly') || audience_to.include?('as:LoginOnly') || audience_to.include?('LoginUser')
:login
elsif audience_to.include?(@magic_values[:followers_collection])
:private
Expand Down
2 changes: 1 addition & 1 deletion app/lib/activitypub/tag_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def to(status)
when 'unlisted', 'public_unlisted', 'private'
[account_followers_url(status.account)]
when 'login'
[account_followers_url(status.account), 'as:LoginOnly', 'LoginUser']
[account_followers_url(status.account), 'as:LoginOnly', 'kmyblue:LoginOnly', 'LoginUser']
when 'direct'
if status.account.silenced?
# Only notify followers if the account is locally silenced
Expand Down

0 comments on commit 38370c1

Please sign in to comment.