Remove unused Account#magic_key (#11327)

This commit is contained in:
ThibG 2019-07-16 14:25:56 +02:00 committed by Eugen Rochko
parent b4c9a860e5
commit 91544a6cb5

View File

@ -301,21 +301,6 @@ class Account < ApplicationRecord
self.fields = tmp self.fields = tmp
end end
def magic_key
modulus, exponent = [keypair.public_key.n, keypair.public_key.e].map do |component|
result = []
until component.zero?
result << [component % 256].pack('C')
component >>= 8
end
result.reverse.join
end
(['RSA'] + [modulus, exponent].map { |n| Base64.urlsafe_encode64(n) }).join('.')
end
def subscription(webhook_url) def subscription(webhook_url)
@subscription ||= OStatus2::Subscription.new(remote_url, secret: secret, webhook: webhook_url, hub: hub_url) @subscription ||= OStatus2::Subscription.new(remote_url, secret: secret, webhook: webhook_url, hub: hub_url)
end end