Closed
Bug 1090951
Opened 10 years ago
Closed 10 years ago
POST /rooms should return full information for created room
Categories
(Hello (Loop) :: Server, defect)
Hello (Loop)
Server
Tracking
(Not tracked)
VERIFIED
INVALID
People
(Reporter: NiKo, Unassigned)
References
Details
Atm creating a new room makes the server answers with partial information for the created room, as per the spec[0], eg.:
{"roomToken":"s0r76py7Xik","roomUrl":"http://localhost:3000/#room/s0r76py7Xik","expiresAt":1414608441}
It would be nice (and useful) that the server would answer with the full information available for that created room, including participants (most likely an empty array), and the `ctime` field, which is useful to sort the room list in Loop panel.
[0]: https://wiki.mozilla.org/Loop/Architecture/Rooms#POST_.2Frooms
Comment 1•10 years ago
|
||
I confirm this is the case currently with how the server is implemented. See https://github.com/mozilla-services/loop-server/blob/master/loop/routes/rooms.js#L147-L151.
I'm not sure to understand why we should return an empty array with the participants, since it's supposed to always be the case on creation.
Also, we could return the `ctime` and all the other options, but you already have this information if you do a GET request to the room endpoint.
I'm okay to change the APIs if that makes sense for the client, but I would ask Adam for feedback here since he designed the APIs.
Flags: needinfo?(adam)
Comment 2•10 years ago
|
||
What I understood is that Adam wanted the push notification to update the client all at once.
So basically when you create the room, you don't need to bother about the roomlist, it will get updated automatically with the push notification.
Comment 3•10 years ago
|
||
I spoke with Nico about this over IRC, and we've concluded that we don't need this, since the room creation should trigger a push notification, which then causes the client to retrieve a full set of room information.
It appears that the Loop server doesn't currently trigger this push notification, but that would be a different issue.
At Nico's suggestion, I'm closing this bug as invalid.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(adam)
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•