make welcome message templatable

This commit is contained in:
zefie
2022-10-15 20:03:30 -04:00
parent 47e87a4ebc
commit 894b2e733e
5 changed files with 74 additions and 17 deletions

View File

@@ -274,8 +274,8 @@ ${(message.subject) ? wtvshared.htmlEntitize(message.subject) : '(No subject)'}
if (typeof message.body === "object" && message.body) {
message.body = wtvshared.decodeBufferText(message.body);
}
data += `
${wtvshared.htmlEntitize(message.body, true)}
message.body = message.body.replace(/\n/g, "<br><br>");
data += `${(message.allow_html) ? message.body : wtvshared.htmlEntitize(message.body, true)}
<br>
<br>`;
if (message.signature) {
@@ -283,7 +283,8 @@ ${wtvshared.htmlEntitize(message.body, true)}
}
data += `<p>
`;
if (message.attachments) {
console.log(message.allow_html)
if (Array.isArray(message.attachments)) {
message.attachments.forEach((v, k) => {
if (v) {
console.log("*****************", v['Content-Type']);

View File

@@ -98,6 +98,8 @@ Display name<br>
bgcolor=#444444 text=#ffdd33 cursor=#cc9933
TYPE="text" ASCIIONLY
SIZE="18"
selected
autoactivate
MAXLENGTH="18">
</a>
</table>