Update nostr gem, switch to Ruby for bech32 encoding
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user