about summary refs log tree commit diff
path: root/app/models/follow.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/follow.rb')
-rw-r--r--app/models/follow.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/follow.rb b/app/models/follow.rb
index 3fce14b9a..714f4e898 100644
--- a/app/models/follow.rb
+++ b/app/models/follow.rb
@@ -32,6 +32,11 @@ class Follow < ApplicationRecord
     false # Force uri_for to use uri attribute
   end
 
+  def revoke_request!
+    FollowRequest.create!(account: account, target_account: target_account, show_reblogs: show_reblogs, uri: uri)
+    destroy!
+  end
+
   before_validation :set_uri, only: :create
   after_destroy :remove_endorsements