Râu Cao c6c5d80fb4
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
WIP Persist zaps, create and send zap receipts
2024-05-09 14:31:37 +02:00

18 lines
279 B
Ruby

class Zap < ApplicationRecord
belongs_to :user
def request_event
nostr_event_from_hash(request)
end
def receipt_event
nostr_event_from_hash(receipt)
end
private
def nostr_event_from_hash(hash)
Nostr::Event.new(**hash.symbolize_keys)
end
end