Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: extract inbound transporter from agent constructor #245

Merged
merged 3 commits into from
Apr 15, 2021
Merged

refactor: extract inbound transporter from agent constructor #245

merged 3 commits into from
Apr 15, 2021

Conversation

jakubkoci
Copy link
Contributor

It aligns API with the setting of the outbound transporter. It's also better for the cases when a developer wants to pass messages into the agent by themself.

BREAKING CHANGE

Signed-off-by: Jakub Koci jakub.koci@gmail.com

Signed-off-by: Jakub Koci <jakub.koci@gmail.com>
@jakubkoci jakubkoci requested a review from a team as a code owner April 15, 2021 07:55
src/agent/Agent.ts Show resolved Hide resolved
return this.inboundTransporter.start(this)
if (this.inboundTransporter) {
await this.inboundTransporter.start(this)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should log a warning for both the inbound/outbound transporter if they are not set at initialization yet. Just for information

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, actually I can imagine it's not a problem not having an inbound transported set. But at least the info could be good. For example, I run AFJ as a mediator with Nest.js framework and it's quite convenient I don't have to set inbound transport but I handle it by myself.

@TimoGlastra
Copy link
Contributor

Please merge my other PR #244 first. Otherwise I need to do quite some manual work again

jakubkoci and others added 2 commits April 15, 2021 11:57
Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Jakub Koci <jakub.koci@gmail.com>
Signed-off-by: Jakub Koci <jakub.koci@gmail.com>
@jakubkoci jakubkoci merged commit 0724593 into openwallet-foundation:main Apr 15, 2021
genaris pushed a commit to genaris/credo-ts that referenced this pull request Apr 24, 2021
…let-foundation#245)

BREAKING CHANGE

Signed-off-by: Jakub Koci jakub.koci@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants