kenakamu / UCWA2.0-CS

C# library for UCWA 2.0
MIT License
24 stars 13 forks source link

Lobby Object Participants Property throws Null Reference Exception #23

Closed robraytaylor closed 6 years ago

robraytaylor commented 6 years ago

Been looking at admitting lobby participants using your library today (great job btw), found an issue with the Lobby object. Your class expects the participants to come out as a property, but it doesn't come back like that from the UCWA API, the object looks like this;

{ "_links": { "self": { "href": "/ucwa/oauth/v1/applications/*******/communication/conversations/*******/participants?filter=lobby" }, "participant": [ { "href": "/ucwa/oauth/v1/applications/*******/communication/conversations/*******/participants/user@domain.com", "title": "user" } ] }, "rel": "participants" }

The participants actually come back as an array of links inside the _links property which don't get so with the Lobby object as it is the Participants property throws a null ref exception. To do see the participants you need to then pull those down using the links from the API and then you get the functionality to Admit.

I can have a look at fixing, but didn't want to spend time implementing something that doesn't quite fit.

Let me know if you need any more information.

kenakamu commented 6 years ago

Thanks for pointing this out. If you can pull request I am more than happy to merge it into master

kenakamu commented 6 years ago

Merged thanks!