include AccountInteractions
include Attachmentable
include Remotable
+ include Paginable
+ MAX_NOTE_LENGTH = 500
+
enum protocol: [:ostatus, :activitypub]
# Local users
#
# Table name: follows
#
+ # id :integer not null, primary key
# created_at :datetime not null
# updated_at :datetime not null
-# account_id :integer not null
-# target_account_id :integer not null
+# account_id :bigint not null
+# id :bigint not null, primary key
+# target_account_id :bigint not null
+# show_reblogs :boolean default(TRUE), not null
#
class Follow < ApplicationRecord
#
# Table name: follow_requests
#
+ # id :integer not null, primary key
# created_at :datetime not null
# updated_at :datetime not null
-# account_id :integer not null
-# target_account_id :integer not null
+# account_id :bigint not null
+# id :bigint not null, primary key
+# target_account_id :bigint not null
+# show_reblogs :boolean default(TRUE), not null
#
class FollowRequest < ApplicationRecord
deliver_to_self(status) if status.account.local?
+ render_anonymous_payload(status)
+
if status.direct_visibility?
deliver_to_mentioned_followers(status)
+ deliver_to_direct_timelines(status)
else
deliver_to_followers(status)
+ deliver_to_lists(status)
end
return if status.account.silenced? || !status.public_visibility? || status.reblog?
add_foreign_key "follow_requests", "accounts", name: "fk_76d644b0e7", on_delete: :cascade
add_foreign_key "follows", "accounts", column: "target_account_id", name: "fk_745ca29eac", on_delete: :cascade
add_foreign_key "follows", "accounts", name: "fk_32ed1b5560", on_delete: :cascade
+ add_foreign_key "glitch_keyword_mutes", "accounts", on_delete: :cascade
add_foreign_key "imports", "accounts", name: "fk_6db1b6e408", on_delete: :cascade
+ add_foreign_key "list_accounts", "accounts", on_delete: :cascade
+ add_foreign_key "list_accounts", "follows", on_delete: :cascade
+ add_foreign_key "list_accounts", "lists", on_delete: :cascade
+ add_foreign_key "lists", "accounts", on_delete: :cascade
add_foreign_key "media_attachments", "accounts", name: "fk_96dd81e81b", on_delete: :nullify
add_foreign_key "media_attachments", "statuses", on_delete: :nullify
add_foreign_key "mentions", "accounts", name: "fk_970d43f9d1", on_delete: :cascade