Lhdang88 / cloud_computing_ws

Cloud Computing WS Demo App
Apache License 2.0
1 stars 1 forks source link

[WebSockets] Answer to a getUsersInRoom request can't be identified #4

Open bmo-at opened 7 years ago

bmo-at commented 7 years ago

When asking the server to return all the users that have joined a room, you have to pass the server the roomId like this: {"action": "getUsersInRoom", "roomId": "ExampleRoom"} It then returns an array of users, but this array can't be associated with the request, since it only gives u the usernames: ["Anderer Daniel","Bot","Daniel","Hackerman","Jan-Robin","amilabell","amilabell2","dhbw","marco","someoneelse","supersayavic","the System","vic"]

A way to identify the room would be nice, like returning an object like this: {"roomId": "ExampleRoom", "users": "["Anderer Daniel","Bot","Daniel","Hackerman","Jan-Robin","amilabell","amilabell2","dhbw","marco","someoneelse","supersayavic","the System","vic"]"}

Lhdang88 commented 7 years ago

agreed.

can you implement this change ?