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

general thoughts - messenger #3

Closed
timoweiss opened this issue Dec 16, 2015 · 3 comments
Closed

general thoughts - messenger #3

timoweiss opened this issue Dec 16, 2015 · 3 comments
Assignees

Comments

@timoweiss
Copy link
Member

  • each message as doc
  • each message has reverence to its conversation
  • a message can have different types (properties)
    • text-messages
    • location as message
    • ...
  • messages can be retrieved paged (eg. page=0, elements=100)
  • conversations should scale with multiple users (rudel)

POST create conversation
GET conversations
GET conversation
GET messages by conversation id


maybe:

  • GET users by conversation

... TBD

@timoweiss timoweiss self-assigned this Dec 16, 2015
@timoweiss
Copy link
Member Author

Message Objects:

Text Message:

{
  "_id": "012bb2568b1842959293402b06d3f998",
  "conversation_id": "012bb2568b1842959293402b06b42170",
  "from": "012bb2568b1842959293402b06b3681b",
  "message": "Pi pa Po",
  "timestamp": 1437494100931,
  "message_type": "text"
}

Location

{
  "_id": "012bb2568b1842959293402b06d3f998",
  "conversation_id": "012bb2568b1842959293402b06b42170",
  "from": "012bb2568b1842959293402b06b3681b",
  "location_id": "89e09a2739e6ca2d544e779fbd123f77",
  "timestamp": 1437494100931,
  "message_type": "location"
}

@timoweiss
Copy link
Member Author

Conversation Objects:

{
  "_id": "11a2ae383bf25eefde31b138608424ad",
  "participants": [
    {
      "user_id": "11a2ae383bf25eefde31b13860842353",
      "last_read": 1450348335519
    },
    {
      "user_id": "11a2ae383bf25eefde31b13860842352",
      "last_read": 1450348335519
    },
    {
      "user_id": "11a2ae383bf25eefde31b13860842353",
      "last_read": 1450348335519
    }
  ],
  "create_date": "2015-07-30T19:31:45.740Z",
  "modified_date": "2015-07-30T19:32:15.864Z"
}

@timoweiss
Copy link
Member Author

@locator-kn/frontend to prevent relentless acknowledgements of messages we can update the last_read read property only when a user

  • leaves the current conversation
  • closes the app (suspended/fully closed)

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