MostroP2P / mostro

Lightning Network peer-to-peer exchange platform on Nostr
https://mostro.network
MIT License
191 stars 32 forks source link

Add a request id field in messages #377

Closed arkanoider closed 2 weeks ago

arkanoider commented 4 weeks ago

Hi @grunch @bilthon ,

as requested from @bilthon as enhancement for clients I have added a very simple request_id in messages that will echo the received one from client messages. I understood that this thing is useful for clients so I want to refactor code with a more clear implementation.

Now I extract from incoming message the field and propagate it in all actions, but in some cases i put an option in the field, for example if there is a resubscribe action of an invoice at mostro startup i cannot add it because i did not receive a message from the client, the are some other cases like that, typically in invoices management. Now I ask you if we need this new field also in these case? @bilthon drop me your ideas of the messages where the echo is needed.

I have in mind two ways to improve this:

Drop me your ideas here...

arkanoider commented 2 weeks ago

Started implementation and almost closed via #376

grunch commented 2 weeks ago

closing it via #376