about summary refs log tree commit diff
path: root/app/controllers/oauth/tokens_controller.rb
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-05-04 12:00:22 -0500
committerStarfall <us@starfall.systems>2022-05-04 12:00:22 -0500
commite9b2e11520056d0ec822ac0862923d00c6a1289c (patch)
tree53b22a4fecda9846fc6c77cf4067c071a6287df0 /app/controllers/oauth/tokens_controller.rb
parent9ec0ecda66745c892961a917b18354f42dfc1f19 (diff)
parent58ac5ae643dc57ffd20017c54e7be523deaef156 (diff)
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/controllers/oauth/tokens_controller.rb')
-rw-r--r--app/controllers/oauth/tokens_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/oauth/tokens_controller.rb b/app/controllers/oauth/tokens_controller.rb
index fa6d58f25..34087b20b 100644
--- a/app/controllers/oauth/tokens_controller.rb
+++ b/app/controllers/oauth/tokens_controller.rb
@@ -2,7 +2,8 @@
 
 class Oauth::TokensController < Doorkeeper::TokensController
   def revoke
-    unsubscribe_for_token if authorized? && token.accessible?
+    unsubscribe_for_token if token.present? && authorized? && token.accessible?
+
     super
   end