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

Allow enabling auto-accept when accepting connection invitation #583

Closed
jakubkoci opened this issue Dec 16, 2021 · 3 comments
Closed

Allow enabling auto-accept when accepting connection invitation #583

jakubkoci opened this issue Dec 16, 2021 · 3 comments

Comments

@jakubkoci
Copy link
Contributor

jakubkoci commented Dec 16, 2021

I found the following TODO in ConnectionResponseHandler:

// TODO: should we only send ping message in case of autoAcceptConnection or always?
// In AATH we have a separate step to send the ping. So for now we'll only do it
// if auto accept is enable

I would expect that the connection will be completed after I call acceptInvitation. Maybe, there is a reason why we have a separate step in AATH. But, what if we allow to update autoAcceptConnections via a config parameter in acceptInvitation? Or, maybe, we should set autoAcceptConnections automatically when user calls acceptInvitation? 🤷‍♂️

@jakubkoci
Copy link
Contributor Author

To put more context... I'm trying to make the follwing test pass: make a connection based on OOB invitation and process requests after the acceptation, where I call receiveInvitation and then acceptInvitation expecting that after acceptInvitation is called, the connection will be finished and oob message request processed.

@TimoGlastra
Copy link
Contributor

The idea was that you set autoAccept when calling createConnection or acceptInvitation but I think allowing for autoAcceptConnection in acceptInvitation makes sense. Automatically setting auto accept when calling acceptInvitation feels like a bigger change as it changes how AFJ works. We then reduce the connection protocol a 2-step exchange from the POV of a framework user, which we haven't done with any of the other protocols. This is exactly where the agent auto accept config can be used for, to make it feel like connections only needes create invitation / accept invitation

@jakubkoci
Copy link
Contributor Author

jakubkoci commented Jan 3, 2022

Solved by #589

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

No branches or pull requests

2 participants