CaliOpen / Caliopen

Entry point for Caliopen messaging platform project
GNU Affero General Public License v3.0
316 stars 26 forks source link

Handle mail multipart on the client #1395

Open MonsieurLanza opened 5 years ago

MonsieurLanza commented 5 years ago

Two cases :

message is unencrypted :

MIME Parsing is done by the backend, client will receive a fully constructed message json.

message is encrypted :

MIME Parsing will occur in the client. Content encoding will need attention, as will HTML sanitization.

Displaying multiple parts

In the case of multiple text inline & attachments parts or fowarded mails, use a similar expand/collapse mechanism than #1393

iamdey commented 5 years ago

what could be the expected message structure ? how the content should be displayed (witch properties, order) ? how the client code could be organized ? etc.

MonsieurLanza commented 5 years ago

According to this Image Pasted at 2019-5-23 15-45 Message structure could have 3 fields, replacing current body and body_is_plain

All of them should be arrays, of objects with metadata (MIME type, size), and data or uri to fetch that data, ordered by order of appearance in the MIME tree. Display choice between text_body and html_body if both are not empty would rely on user settings.

Main question is : what about mail message in attachments ? Recursive structure, separate one ?