Add support for ingesting quote policies (#34479)

This commit is contained in:
Claire 2025-04-28 10:48:27 +02:00 committed by GitHub
parent 1a1f3f037d
commit 9ed6a14d45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 181 additions and 4 deletions

View file

@ -28,6 +28,7 @@
# trendable :boolean
# ordered_media_attachment_ids :bigint(8) is an Array
# fetched_replies_at :datetime
# quote_approval_policy :integer default(0), not null
#
class Status < ApplicationRecord
@ -44,6 +45,13 @@ class Status < ApplicationRecord
MEDIA_ATTACHMENTS_LIMIT = 4
QUOTE_APPROVAL_POLICY_FLAGS = {
unknown: (1 << 0),
public: (1 << 1),
followers: (1 << 2),
followed: (1 << 3),
}.freeze
rate_limit by: :account, family: :statuses
self.discard_column = :deleted_at