From 76761d5fc0886e44a7a6eb94ab62aae8204d9e6e Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 17 Dec 2021 23:02:14 +0100 Subject: Add ability for admins to delete canonical email blocks (#16644) * Add admin option to remove canonical email blocks from a deleted account * Add tootctl canonical_email_blocks to inspect and remove canonical email blocks --- app/models/canonical_email_block.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/canonical_email_block.rb') diff --git a/app/models/canonical_email_block.rb b/app/models/canonical_email_block.rb index be8c45bfe..94781386c 100644 --- a/app/models/canonical_email_block.rb +++ b/app/models/canonical_email_block.rb @@ -24,4 +24,8 @@ class CanonicalEmailBlock < ApplicationRecord def self.block?(email) where(canonical_email_hash: email_to_canonical_email_hash(email)).exists? end + + def self.find_blocks(email) + where(canonical_email_hash: email_to_canonical_email_hash(email)) + end end -- cgit