mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Add notes to domain blocks and mutes (#193)
This commit is contained in:
@@ -19,6 +19,8 @@ class AccountDomainBlock < ApplicationRecord
|
||||
after_create :remove_blocking_cache
|
||||
after_destroy :remove_blocking_cache
|
||||
|
||||
has_one :note, class_name: 'Glitch::Note', as: :target
|
||||
|
||||
private
|
||||
|
||||
def remove_blocking_cache
|
||||
|
||||
@@ -21,6 +21,8 @@ class Block < ApplicationRecord
|
||||
after_create :remove_blocking_cache
|
||||
after_destroy :remove_blocking_cache
|
||||
|
||||
has_one :note, class_name: 'Glitch::Note', as: :target
|
||||
|
||||
private
|
||||
|
||||
def remove_blocking_cache
|
||||
|
||||
@@ -22,6 +22,8 @@ class Mute < ApplicationRecord
|
||||
after_create :remove_blocking_cache
|
||||
after_destroy :remove_blocking_cache
|
||||
|
||||
has_one :note, class_name: 'Glitch::Note', as: :target
|
||||
|
||||
private
|
||||
|
||||
def remove_blocking_cache
|
||||
|
||||
Reference in New Issue
Block a user