Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

chore: replace publish response with a channel #463

Closed
wants to merge 1 commit into from

Conversation

im-adithya
Copy link
Member

No description provided.

@im-adithya im-adithya requested review from bumi and rolznz June 18, 2024 14:38
Response: resp,
Tags: &nostr.Tags{},
}
close(respChan)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does using channels actually make this code easier and more readable? and why do we need to close here every single time?

Copy link
Member Author

@im-adithya im-adithya Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that we can also use the same channel for multi-pay/mutli-keysend requests where there might be more than one message on the channel

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, to be honest just having one function to call seems simpler to me

@rolznz
Copy link
Collaborator

rolznz commented Jun 20, 2024

@im-adithya thanks for looking into this. I chatted about it with Bumi and we agreed it does not really make things simpler or more understandable and maybe this can be better solved in the future with middleware for example, which might be able to be addressed as part of getAlby/hub#52 in the future. I will close this for now.

@rolznz rolznz closed this Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants