Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session log sorted from most old to most recent #281

Open
zontarian opened this issue Oct 3, 2018 · 0 comments
Open

Session log sorted from most old to most recent #281

zontarian opened this issue Oct 3, 2018 · 0 comments

Comments

@zontarian
Copy link

Right now if I call

https://aida-stg.instedd.org/api/v1/bots/<BOD_ID>/sessions/<SESSION_UUID>/log?access_token=<API_ACCESS_TOKEN>

I get an array of conversation items in a sort of random order. The are not sorted it seems..

{
   "data": [
    ....
    {
      "timestamp": "2018-10-03T15:27:52.234410Z",
      "direction": "outgoing",
      "content_type": "text",
      "content": "Send UNSUBSCRIBE to stop receiving messages."
    },
    {
      "timestamp": "2018-10-03T15:27:52.078404Z",
      "direction": "incoming",
      "content_type": "text",
      "content": "Hello"
    },
    {
      "timestamp": "2018-10-03T15:27:55.633163Z",
      "direction": "incoming",
      "content_type": "text",
      "content": "INTRO"
    },
    {
      "timestamp": "2018-10-03T15:27:52.181208Z",
      "direction": "outgoing",
      "content_type": "text",
      "content": "Welcome to WFP test bot. "
    }
  ]
}

Can we specify a default sorting somehow?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant