XML Output
The view of the TalkController should output XML instead of plain text. This improves the response and could also be useful for Mai Server. For this to work the view (and controller) and connection.js should be changed.
TalkController should output XML as stated below:
<?xml version="1.0" encoding="utf-8" ?>
<mai-response>
<type>*type of response*</type>
<message>
</mai-resposne>
Connection.js should parse this xml and take action based on the fields. In the case of a normal response (1) the message should be outputted to the conversation log. When the message type is 2 (server) connection.js should take actions based on the contents of <message>.
Blueprint information
- Status:
- Complete
- Approver:
- Wouter Bulten
- Priority:
- High
- Drafter:
- Wouter Bulten
- Direction:
- Approved
- Assignee:
- Daan Sprenkels
- Definition:
- Approved
- Series goal:
- Accepted for 0.2
- Implementation:
- Implemented
- Milestone target:
- 0.2.1
- Started by
- Daan Sprenkels
- Completed by
- Wouter Bulten
Whiteboard
Could we do the type different?
Not an integer (1,2), but a response id:
Here are some examples
mai - Mai says something.
logout - User logged out.
notice - Server notice.
error - An error occurred and you will be redirected to the bugtracker.
noxml - This is when an error occurred, and the server isn't able to return a valid XML string. Of course this message-type can only be specified by the JavaScript itself. (bugtracker)
<message> can still be used, <type> will only be for the type of handling.
Work Items
Dependency tree
* Blueprints in grey have been implemented.