mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add following_url to accounts (#36093)
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
# outbox_url :string default(""), not null
|
||||
# shared_inbox_url :string default(""), not null
|
||||
# followers_url :string default(""), not null
|
||||
# following_url :string default(""), not null
|
||||
# protocol :integer default("ostatus"), not null
|
||||
# memorial :boolean default(FALSE), not null
|
||||
# moved_to_account_id :bigint(8)
|
||||
@@ -123,6 +124,7 @@ class Account < ApplicationRecord
|
||||
validates_with EmptyProfileFieldNamesValidator, if: -> { local? && will_save_change_to_fields? }
|
||||
with_options on: :create, if: :local? do
|
||||
validates :followers_url, absence: true
|
||||
validates :following_url, absence: true
|
||||
validates :inbox_url, absence: true
|
||||
validates :shared_inbox_url, absence: true
|
||||
validates :uri, absence: true
|
||||
|
||||
@@ -102,6 +102,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
||||
@account.outbox_url = valid_collection_uri(@json['outbox'])
|
||||
@account.shared_inbox_url = valid_collection_uri(@json['endpoints'].is_a?(Hash) ? @json['endpoints']['sharedInbox'] : @json['sharedInbox'])
|
||||
@account.followers_url = valid_collection_uri(@json['followers'])
|
||||
@account.following_url = valid_collection_uri(@json['following'])
|
||||
@account.url = url || @uri
|
||||
@account.uri = @uri
|
||||
@account.actor_type = actor_type
|
||||
|
||||
Reference in New Issue
Block a user