Update nostr gem, switch to Ruby for bech32 encoding
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2024-01-15 12:37:41 +03:00
parent 1a5a2177b4
commit b4f0c60ea0
9 changed files with 32 additions and 22 deletions

View File

@@ -1,3 +1,5 @@
require 'nostr'
class User < ApplicationRecord
include EmailValidatable
@@ -185,6 +187,11 @@ class User < ApplicationRecord
ldap.delete_attribute(dn,:service)
end
def nostr_pubkey_bech32
return nil unless nostr_pubkey.present?
Nostr::PublicKey.new(nostr_pubkey).to_bech32
end
private
def ldap