avishaan / lightTribe

LightTribe Backend and Collaboration Doc
2 stars 0 forks source link

Multiple Recipients in chat rooms #79

Closed footnote closed 8 years ago

footnote commented 8 years ago

We expected to receive one participant or partner in the room object, where to we could be able to know that this is the person I should talk with, but I'm wondering why do we receive multiple participants in the same room as follows:

{
_id: "560533242dfd982100585110",
__v: 11,
participants: [
{
_id: "558dd5195c99c61400e2c69b",
username: "string",
password: "$2a$09$k6DSq.ZjbFx1YBSN.ujpFuh9rbZrCwoQ0UcrtRDnE3Yb7un3/riUS",
__v: 0,
follows: [ ],
devices: [ ],
interests: [
"yogaBikram"
],
token: {
expires: "2015-06-26T22:41:29.390Z",
value: "FO1nkP05OgHSSA0ASq"
}
},
{
_id: "55988af5c59137140058c28d",
username: "kiks",
password: "$2a$09$zc6JhF5Tg3SZHbLqCC0W3eaG5FZy1pDkzmqGgAbLVj8hsh3Qe4GtC",
__v: 0,
follows: [ ],
devices: [ ],
interests: [
"yogaBikram"
],
token: {
expires: "2015-07-05T01:40:05.108Z",
value: "cNuWAFAmEX69MIlOsx"
}
}
],
createDate: "2015-09-25T11:42:28.033Z"
}

as well as a lot of wasted information that used such as: follows array, devices array, interests of that user, token, expiry of the token, value, password

avishaan commented 8 years ago

When a user starts a conversation with another user, even if user2 hasn't responded, they should be considered a participant of the conversation and be shown in the participants array.

avishaan commented 8 years ago

can someone confirm this is for the route conversations/{conversationId} ? @ShadiFares. Currently that route is returning a participants array that includes all participants regardless of whether or not they have responded.

footnote commented 8 years ago

The route is GET /v1/conversations

avishaan commented 8 years ago

ah, got it!

avishaan commented 8 years ago

that route also seems to be returning all the participants regardless of whether or not they responded back.

footnote commented 8 years ago

Conversation that has id 5609a798182a69e70096e3f1 contains 1 participant as shown in the attached screenshot, I thought the scenario mentioned in our meeting was the reason behind this...

You can get this response from this route http://lighttribe-dev.herokuapp.com/api/v1/conversations?access_token=cNuWAFAmEX69MIlOsx

screen shot 2015-10-03 at 1 15 17 am
avishaan commented 8 years ago

I think you might not be adding a recipient in the message correctly when you create it. Currently we aren’t checking that field. I can add that in to make sure. If you don’t add a recipient for the message then you will likely end up talking to yourself.

On Oct 2, 2015, at 4:16 PM, footnote.consulting notifications@github.com wrote:

Conversation that has id 5609a798182a69e70096e3f1 contains a conversation with 1 participant as shown in the attached screenshot, I thought the scenario mentioned in our meeting was the reason behind this...

You can get this response from this route http://lighttribe-dev.herokuapp.com/api/v1/conversations?access_token=cNuWAFAmEX69MIlOsx http://lighttribe-dev.herokuapp.com/api/v1/conversations?access_token=cNuWAFAmEX69MIlOsx https://cloud.githubusercontent.com/assets/7980253/10259755/44afa61c-696c-11e5-8aef-7b92e5d5cc56.png — Reply to this email directly or view it on GitHub https://github.com/codeHatcher/lightTribe/issues/79#issuecomment-145181177.

avishaan commented 8 years ago

Please verify this is now closed based on everyone's understanding.

avishaan commented 8 years ago

@footnote can we confirm this is closed?