about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-12-23 15:23:12 +0100
committerGitHub <noreply@github.com>2018-12-23 15:23:12 +0100
commit8a3e4a48838405a7a78f2b46cc2b2a7c8fa412fa (patch)
treeb5d7908956cab9d18dceda381e18cdb4a6e0e4ba /app/models/account.rb
parent1a3088364fe602bb48647d78dda440b174424e17 (diff)
parentcb98e7dbd35c730a58f65112c3fa32ee180a2518 (diff)
Merge pull request #871 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 60ad0788e..99fcbf778 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -159,6 +159,14 @@ class Account < ApplicationRecord
     ResolveAccountService.new.call(acct)
   end
 
+  def silence!
+    update!(silenced: true)
+  end
+
+  def unsilence!
+    update!(silenced: false)
+  end
+
   def suspend!
     transaction do
       user&.disable! if local?