Add: #920 アンテナ・リストに「お気に入りに登録」設定 (#946)

* Add: #920 アンテナ・リストに「お気に入りに登録」設定

* Fix test

* Fix test

* Add fedibird capabilities

* Add kmyblue_favourite_antenna
This commit is contained in:
KMY(雪あすか) 2024-12-09 12:12:15 +09:00 committed by GitHub
parent ee49518125
commit 9201eb151b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 294 additions and 29 deletions

View file

@ -5,13 +5,14 @@
# Table name: lists
#
# id :bigint(8) not null, primary key
# account_id :bigint(8) not null
# exclusive :boolean default(FALSE), not null
# favourite :boolean default(TRUE), not null
# notify :boolean default(FALSE), not null
# replies_policy :integer default("list"), not null
# title :string default(""), not null
# created_at :datetime not null
# updated_at :datetime not null
# replies_policy :integer default("list"), not null
# exclusive :boolean default(FALSE), not null
# notify :boolean default(FALSE), not null
# account_id :bigint(8) not null
#
class List < ApplicationRecord
@ -35,6 +36,14 @@ class List < ApplicationRecord
before_destroy :clean_feed_manager
def favourite!
update!(favourite: true)
end
def unfavourite!
update!(favourite: false)
end
private
def validate_account_lists_limit