Commit de0bb236 authored by Benjamin Krause's avatar Benjamin Krause
Browse files

Mail body changed to json format

parent a1e9c3f3
......@@ -79,7 +79,7 @@ async function fillChat() {
const text = document.createElement("li");
const date = new Date(element.date);
const dateString = `${date.getDate()}.${date.getMonth()}.${date.getFullYear()} ${date.getHours()}:${date.getMinutes()}`
text.innerText = `${element.mail_from} - ${dateString} - ${element.body}`;
text.innerText = `${element.mail_from} - ${dateString} - ${JSON.parse(element.body).message}`;
parent.appendChild(text);
});
}
......@@ -128,7 +128,9 @@ function init() {
password: "",
},
subject: "Test",
message: (document.querySelector("#text") as HTMLInputElement).value,
message: JSON.stringify({
message: (document.querySelector("#text") as HTMLInputElement).value
}, null, "\t"),
};
work(obj);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment