-
Notifications
You must be signed in to change notification settings - Fork 3
Store decrypted request method and content data #359
Conversation
this allows use to create an event log in the future and list the actual requests per app connection
It should not fail and if it fails it does not matter much I guess
@@ -541,6 +541,10 @@ func (svc *Service) HandleEvent(ctx context.Context, sub *nostr.Subscription, ev | |||
return | |||
} | |||
|
|||
requestEvent.Method = nip47Request.Method | |||
requestEvent.ContentData = payload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the ContentData
be nip47Request.params
?
{
"method": "pay_invoice",
"params": {
"invoice": "lnbc50n1...", // bolt11 invoice
"amount": 123, // invoice amount in msats, optional
}
}
And should we call it params
to be consistent with the spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think that's better?
then I have to JSON dump the params here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Maybe the way you did it is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to store the Content
then? or we can remove this along with the content in the response event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
this allows use to create an event log in the future and list the actual requests per app connection