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

Conversation messages are unsorted #114

Open
eatyourgreens opened this issue May 2, 2017 · 1 comment
Open

Conversation messages are unsorted #114

eatyourgreens opened this issue May 2, 2017 · 1 comment

Comments

@eatyourgreens
Copy link

Reported on Talk by am.zooni and a couple of other people. Only seems to occur for relatively long PM conversations.

The PM inbox requests conversation messages by conversation_id without specifying a sort order.
talkClient.type('messages').get({conversation_id, page_size: count}) # show all of them

I'd expect the resulting query to come back sorted by message ID, but the responses are being returned in a seemingly random order. This makes it pretty much impossible to follow the thread of a conversation in your inbox.

Here's a sample response supplied by am.zooni for conversation 2387

{
"messages": [
{
"href": "/messages/8753",
"links": {
"conversation": "2387",
"user": "1300590"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-17T01:39:47.384Z",
"id": "8753",
"updated_at": "2017-03-17T01:39:47.384Z",
"user_id": "1300590"
},
{
"href": "/messages/8754",
"links": {
"conversation": "2387",
"user": "1220914"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-17T13:47:38.960Z",
"id": "8754",
"updated_at": "2017-03-17T13:47:38.960Z",
"user_id": "1220914"
},
{
"href": "/messages/9240",
"links": {
"conversation": "2387",
"user": "1300590"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-30T23:54:13.078Z",
"id": "9240",
"updated_at": "2017-03-30T23:54:13.078Z",
"user_id": "1300590"
},
{
"href": "/messages/9234",
"links": {
"conversation": "2387",
"user": "1220914"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-30T23:14:57.974Z",
"id": "9234",
"updated_at": "2017-03-30T23:14:57.974Z",
"user_id": "1220914"
},
{
"href": "/messages/9235",
"links": {
"conversation": "2387",
"user": "1300590"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-30T23:33:11.244Z",
"id": "9235",
"updated_at": "2017-03-30T23:33:11.244Z",
"user_id": "1300590"
},
{
"href": "/messages/9238",
"links": {
"conversation": "2387",
"user": "1220914"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-30T23:50:00.292Z",
"id": "9238",
"updated_at": "2017-03-30T23:50:00.292Z",
"user_id": "1220914"
},
{
"href": "/messages/9236",
"links": {
"conversation": "2387",
"user": "1220914"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-30T23:40:12.405Z",
"id": "9236",
"updated_at": "2017-03-30T23:40:12.405Z",
"user_id": "1220914"
},
{
"href": "/messages/9237",
"links": {
"conversation": "2387",
"user": "1300590"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-03-30T23:44:40.143Z",
"id": "9237",
"updated_at": "2017-03-30T23:44:40.143Z",
"user_id": "1300590"
},
{
"href": "/messages/9876",
"links": {
"conversation": "2387",
"user": "1300590"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-04-16T12:12:15.812Z",
"id": "9876",
"updated_at": "2017-04-16T12:12:15.812Z",
"user_id": "1300590"
},
{
"href": "/messages/9877",
"links": {
"conversation": "2387",
"user": "1220914"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-04-16T13:47:05.596Z",
"id": "9877",
"updated_at": "2017-04-16T13:47:05.596Z",
"user_id": "1220914"
},
{
"href": "/messages/9931",
"links": {
"conversation": "2387",
"user": "1300590"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-04-17T17:14:04.507Z",
"id": "9931",
"updated_at": "2017-04-17T17:14:04.507Z",
"user_id": "1300590"
},
{
"href": "/messages/10038",
"links": {
"conversation": "2387",
"user": "1300590"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-04-20T01:22:40.849Z",
"id": "10038",
"updated_at": "2017-04-20T01:22:40.849Z",
"user_id": "1300590"
},
{
"href": "/messages/10039",
"links": {
"conversation": "2387",
"user": "1220914"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-04-20T01:38:40.600Z",
"id": "10039",
"updated_at": "2017-04-20T01:38:40.600Z",
"user_id": "1220914"
},
{
"href": "/messages/10032",
"links": {
"conversation": "2387",
"user": "1220914"
},
"body": "<snip>",
"conversation_id": "2387",
"created_at": "2017-04-19T23:36:58.259Z",
"id": "10032",
"updated_at": "2017-04-19T23:36:58.259Z",
"user_id": "1220914"
}
],
"links": {
"messages.conversation": {
"href": "/conversations/{messages.conversation}",
"type": "conversations"
}
},
"meta": {
"messages": {
"page": 1,
"page_size": 14,
"count": 14,
"include": [

 ],
"page_count": 1,
"previous_page": null,
"next_page": null,
"first_href": "/messages?page_size=14\u0026conversation_id=2387",
"previous_href": null,
"next_href": null,
"last_href": "/messages?page_size=14\u0026conversation_id=2387",
"current_sort": "",
"default_sort": null,
"sortable_attributes": [
"conversation_id",
"created_at"
]
}
}
}
@eatyourgreens
Copy link
Author

Bumping this because it came up again on Talk today. https://www.zooniverse.org/talk/17/311244?comment=754212&page=2

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