Skip to content

Instantly share code, notes, and snippets.

@eingenito
Last active February 13, 2018 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eingenito/a7d72e3f144ab10dd5a4270217e9884a to your computer and use it in GitHub Desktop.
Save eingenito/a7d72e3f144ab10dd5a4270217e9884a to your computer and use it in GitHub Desktop.
{
"client_id": 11827435,
"context": {
"survey_id": 1,
"question": {
"name": "filling_out_for_myself",
"metadata": {
"type": "locally-stored"
}
}
},
"answer": {
"answered_at": "2018-02-06T18:15:25Z",
"responses": [
"true"
]
}
}
@eingenito
Copy link
Author

This is a new proposal for the 'answer changed' message body. Please comment (or just update, or make crazy notes or whatever)

@soulcutter
Copy link

This works for me. The only thing I -might- tweak is nesting "survey_id" and "question" keys under a "context"

@samsm
Copy link

samsm commented Feb 7, 2018

Making it for single answers only makes sense. I wonder if we want to have different options for the circumstance that has led to you getting this payload

action: "answer_change"
initiated_by: "user|cx|migration" // or client12312 == the current kids client mom?

or something. Maybe that's premature.

@eingenito
Copy link
Author

Sam - I think that would be awesome, but it's a feature we'd have to build - there's no notion of what caused a change right now anywhere near the code that publishes this message.

@samsm
Copy link

samsm commented Feb 8, 2018

I guess we could depend on the name of the rabbit stream to know it is an answer update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment