dmails: fixup exceptions when verifying dmail keys.
Fix show action throwing exceptions when viewing a dmail without a dmail key.
This commit is contained in:
@@ -15,5 +15,9 @@ module Danbooru
|
||||
def verify(*args, **options)
|
||||
verifier.verify(*args, purpose: purpose, **options)
|
||||
end
|
||||
|
||||
def verified(*args, **options)
|
||||
verifier.verified(*args, purpose: purpose, **options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -121,7 +121,7 @@ class Dmail < ApplicationRecord
|
||||
end
|
||||
|
||||
def valid_key?(key)
|
||||
id == verifier.verify(key)
|
||||
id == verifier.verified(key)
|
||||
end
|
||||
|
||||
def visible_to?(user, key)
|
||||
|
||||
Reference in New Issue
Block a user