msp301 / pinbox-server

Self-hosted webmail client greatly inspired by Google Inbox (Backend)
GNU General Public License v3.0
12 stars 3 forks source link

Cannot access email threads #8

Open msp301 opened 4 years ago

msp301 commented 4 years ago

Describe the bug The API returns lists of threads that contain messages. If we take the returned thread ID and give it to /api/messages/XXXXX it fails to do anything.

To Reproduce

  1. GET /api/messages or GET /api/inbox
  2. Take first any returned thread ID e.g. "0001"
  3. GET /api/messages/0001

Expected behaviour Get a successful response with maybe including the full thead info and some metadata for its messages

Actual behaviour Error 500 - Failed to read message

msp301 commented 4 years ago

This highlights a flaw in the API design. I think we should be modelling the thread -> message relationship in the endpoints. e.g.