chb / indivo_server

The Indivo™ Personally Controlled Health Record
http://indivohealth.org
GNU General Public License v3.0
103 stars 40 forks source link

Return better info when posting message to record/account #17

Closed Travers closed 12 years ago

Travers commented 12 years ago

Currently, a successful message send to a record returns "". This should be expanded to include standard info about the message.

Travers commented 12 years ago

Since a message sent to a record can create multiple messages behind the scenes (one to each account owner), we can only send back basic info such as the subject, severity, and body. Is this information really desirable above the "" currently sent back?

johnomoore commented 12 years ago

Does this mean that an id for the message cannot be returned because multiple messages are actually created behind the scenes?

My main motivation for bringing up this issue was that, in order to produce "instant message" capability on two clients, I wanted to pass the id for the message between the clients (using a rtmp server). That way the receiving client could make a call to the Indivo server to retrieve the new message directly using the id rather than retrieving all of the messages again.

Maybe the id of each message that is created behind the scenes could be returned? This would mean that there would need to be an indication of the id of the message for each account.

johnomoore commented 12 years ago

We are using the api for sending a message to an account. In that instance, then the response can provide all of the information about the message, including the id.

Travers commented 12 years ago

In the case of sending a message to an account, we can definitely provide all of the information about the message back. What needs to change is how we handle external_id during message send and retrieval, since the current documentation and implementation are a bit fuzzy.

Travers commented 12 years ago

You will now get info back when posting messages to accounts, but to protect from information leakage and general confusion, posting to records still returns no real info