Conversation
JesseOlmer
left a comment
There was a problem hiding this comment.
The change to ConnectionApprovalResponse type, and the callback change from Func to Action are both breaking changes which should constitute a 2.0 rev of ngo. @ThusWroteNomad @lpmaurice is that on the table currently?
since we haven't released NGO 1.0 yet, this area (connection approval) was one of the exceptions post pre.9 that we said OK for API breaking changes — and since we already changed the API just a few weeks ago, making this modification before we fully release NGO 1.0 should be OK too. not ideal but still better than leaving the door open for misuse after 1.0 release or leaving it as is right now and taking away the functionality of delaying approval result from devs. |
SamuelBellomo
left a comment
There was a problem hiding this comment.
Tested with boss room and I confirm we can receive custom messages with this
Adjust the connection approval flow, which was changed in previous release. This puts back the ability to delay approval.
public Action<ConnectionApprovalRequest, ConnectionApprovalResponse> ConnectionApprovalCallback;ConnectionApprovalResponsegoes from astructto aclass, and gets reference semantics.ConnectionApprovalResponse, they write to the response we allocate for them.Pendingmember totrue, to indicate it is still processing the approval and set.Pendingto false, later, once it has decide to approve or reject the connection.Changelog
Pending changes will come in a later commit.
Testing and Documentation
MultiClientConnectionApproval now tests both immediate and delayed approval.