WIP Persist zaps, create and send zap receipts
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user