1
0
Fork 0
forked from gitea/nas

Change: 単方向の承認だけでフレンドサーバーが有効になるようにする (#74)

* Test: テストを先に作成

* Fix: テスト不備

* Wip: フレンドサーバーのテストを修正

* Wip: エラーを修正

* 項目のラベリングを修正

* 新しい設定が変更できないのを修正

* Wip: 削除時の処理を修正

* フレンド自動承認設定を削除

* Fix: 申請を受けたドメインのINBOXが空になる問題

* Change: #75 フレンドでないサーバーからのローカル公開を未収載に変換 (#77)
This commit is contained in:
KMY(雪あすか) 2023-10-10 21:46:26 +09:00 committed by GitHub
parent 521932c802
commit 1eb2d78b5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 314 additions and 126 deletions

View file

@ -114,7 +114,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
end
def process_status_params
@status_parser = ActivityPub::Parser::StatusParser.new(@json, followers_collection: @account.followers_url, object: @object, account: @account)
@status_parser = ActivityPub::Parser::StatusParser.new(@json, followers_collection: @account.followers_url, object: @object, account: @account, friend_domain: friend_domain?)
@params = {
uri: @status_parser.uri,
@ -506,6 +506,10 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
FriendDomain.free_receivings.exists?(domain: @account.domain)
end
def friend_domain?
FriendDomain.enabled.find_by(domain: @account.domain)&.accepted?
end
def quote
@quote ||= @object['quote'] || @object['quoteUrl'] || @object['quoteURL'] || @object['_misskey_quote']
end