Closed Bug 1129453 Opened 7 years ago Closed 7 years ago

Display new answers from other people when viewing a question

Categories

(support.mozilla.org :: BuddyUp, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
2015Q1

People

(Reporter: rik, Assigned: rik)

References

Details

(Whiteboard: p=2 s=bu.2015.4 [blocker])

Attachments

(1 file)

43 bytes, text/x-github-pull-request
rehandalal+mozilla
: review+
Details | Review
We currently don't receive the new answers. We're thinking of receiving them from a different SimplePush notification.
Depends on: 1129470
Whiteboard: [blocker]
Can you expand on this? Does this mean messages between two people work, but others joining won't have their message displayed? Or something else?
Flags: needinfo?(anthony)
This is about the "liveness" of the chat. When you are viewing a question, you don't see new messages sent by people in real time.
Flags: needinfo?(anthony)
The server will forgot about the client 10 minutes after a simplepush notification has been set. So if we get a 404 when checking the last questions, we should just refresh the view.
Notes on the API format:

POST /api/2/realtime/
{
endpoint: https://updates.mozil…
content_type: 'question',
object_id: question_id
}
-> { id }

DELETE /api/2/realtime/{id}/

GET /api/2/realtime/{id}/updates/
-> [
  {
    action_object: {answer_object}
    actor: {user_object}
    id: 
    target: {question_object}
    timestamp:
    verb: "answered"
  }
]
  
Later: ?timestamp_gt= 2015-02-27T14:13:25Z
Status: NEW → ASSIGNED
Whiteboard: [blocker] → s=bu.2015.4 [blocker]
Whiteboard: s=bu.2015.4 [blocker] → p=2 s=bu.2015.4 [blocker]
Target Milestone: --- → 2015Q1
Assignee: nobody → anthony
I have the functionality working and some unit tests. I'm missing one functionality missing but I'll open a bug and we'll see in triage if this is a blocker.
I still have some unit tests to write and then cleanup the code.
My current progress is at https://github.com/Rik/buddyup/tree/realtime-1129453.
See Also: → 1139899
I've updated my branch with new tests. I lost some time today with the test harness being broken. Writing tests for QuestionController was also a bit involved because those are the first ones. Everything is here now, I just need to clean the code to pass jshint, remove console.log calls and that kind of stuff. I'll have this in review tomorrow morning.
Attachment #8573862 - Flags: review?(rdalal)
Comment on attachment 8573862 [details] [review]
https://github.com/mozilla/buddyup/pull/106

couple of nits, but once those are fixed. r+
Attachment #8573862 - Flags: review?(rdalal) → review+
https://github.com/mozilla/buddyup/commit/03a9c2d7bdd7084438df78069a273bbfefd0a955
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Flags: needinfo?(hcondei)
Flags: needinfo?(fredy)
Status: RESOLVED → VERIFIED
Flags: needinfo?(fredy)
Flags: needinfo?(hcondei)
You need to log in before you can comment on or make changes to this bug.