* Add Follow#revoke_request! * Implement Undo { Accept { Follow } } (fixes #8234)
This commit is contained in:
parent
1ee675d68b
commit
59f7f4c923
4 changed files with 53 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue