Skip to content

Commit

Permalink
fix(webhooks): fixed text.html field for messageNew if notifyWebSafeH…
Browse files Browse the repository at this point in the history
…tml is true
  • Loading branch information
andris9 committed Jan 15, 2024
1 parent a869640 commit 47e64a8
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 38 deletions.
2 changes: 1 addition & 1 deletion data/google-crawlers.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"creationTime": "2024-01-02T23:00:58.000000",
"creationTime": "2024-01-09T23:00:41.000000",
"prefixes": [
{
"ipv6Prefix": "2001:4860:4801:2008::/64"
Expand Down
7 changes: 4 additions & 3 deletions lib/webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,10 @@ class WebhooksHandler {
}
}

if (payload.text && payload.text._generatedHtml) {
payload.text.html = payload.text._generatedHtml;
delete payload.text._generatedHtml;
if (payload && payload.data && payload.data.text && payload.data.text._generatedHtml) {
payload.data.text.html = payload.data.text._generatedHtml;

delete payload.data.text._generatedHtml;
}

return payload;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"libmime": "5.2.1",
"libqp": "2.0.1",
"license-checker": "25.0.1",
"mailparser": "3.6.5",
"mailparser": "3.6.6",
"mailsplit": "5.4.0",
"marked": "9.1.6",
"minimist": "1.2.8",
Expand All @@ -104,7 +104,7 @@
"socks": "2.7.1",
"speakeasy": "2.0.0",
"startbootstrap-sb-admin-2": "3.3.7",
"timezones-list": "3.0.2",
"timezones-list": "3.0.3",
"undici": "5.28.2",
"uuid": "9.0.1",
"wild-config": "1.7.1",
Expand Down
2 changes: 1 addition & 1 deletion sbom.json

Large diffs are not rendered by default.

62 changes: 36 additions & 26 deletions static/licenses.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html><html><head><meta charset="utf-8"><title>EmailEngine Licenses</title><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous"></head><body>
<div class="container-fluid">
<h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following software packages:</p>
<h1>EmailEngine v2.39.6</h1><p>EmailEngine includes code from the following software packages:</p>
<table class="table table-sm">
<tr><thead class="thead-dark"><th>Package</th><th>Version</th><th>License</th><th>Publisher</th><th>Publisher's Email</th><th>Package URL</th></tr>
<tbody>
Expand Down Expand Up @@ -106,7 +106,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/@babel/runtime">@babel/runtime</a></td>
<td>7.23.7</td>
<td>7.23.8</td>
<td>MIT</td>
<td>The Babel Team</td>
<td></td>
Expand Down Expand Up @@ -636,7 +636,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/@humanwhocodes/config-array">@humanwhocodes/config-array</a></td>
<td>0.11.13</td>
<td>0.11.14</td>
<td>Apache-2.0</td>
<td>Nicholas C. Zakas</td>
<td></td>
Expand All @@ -656,7 +656,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/@humanwhocodes/object-schema">@humanwhocodes/object-schema</a></td>
<td>2.0.1</td>
<td>2.0.2</td>
<td>BSD-3-Clause</td>
<td>Nicholas C. Zakas</td>
<td></td>
Expand Down Expand Up @@ -726,7 +726,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/@jridgewell/trace-mapping">@jridgewell/trace-mapping</a></td>
<td>0.3.20</td>
<td>0.3.21</td>
<td>MIT</td>
<td>Justin Ridgewell</td>
<td>[email protected]</td>
Expand Down Expand Up @@ -4554,6 +4554,16 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/linkify-it">linkify-it</a></td>
<td>5.0.0</td>
<td>MIT</td>
<td></td>
<td></td>
<td>
<a href="https://github.com/markdown-it/linkify-it">github.com/markdown-it/linkify-it</a>
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/locate-path">locate-path</a></td>
<td>5.0.0</td>
<td>MIT</td>
Expand Down Expand Up @@ -4645,7 +4655,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/loupe">loupe</a></td>
<td>3.0.2</td>
<td>3.1.0</td>
<td>MIT</td>
<td>Veselin Todorov</td>
<td>[email protected]</td>
Expand Down Expand Up @@ -4715,7 +4725,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/mailparser">mailparser</a></td>
<td>3.6.5</td>
<td>3.6.6</td>
<td>MIT</td>
<td>Andris Reinman</td>
<td></td>
Expand Down Expand Up @@ -5495,7 +5505,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/node-abi">node-abi</a></td>
<td>3.52.0</td>
<td>3.54.0</td>
<td>MIT</td>
<td>Lukas Geiger</td>
<td></td>
Expand Down Expand Up @@ -5555,16 +5565,6 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/nodemailer">nodemailer</a></td>
<td>6.9.3</td>
<td>MIT-0</td>
<td>Andris Reinman</td>
<td></td>
<td>
<a href="https://github.com/nodemailer/nodemailer">github.com/nodemailer/nodemailer</a>
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/nodemailer">nodemailer</a></td>
<td>6.9.4</td>
<td>MIT-0</td>
<td>Andris Reinman</td>
Expand Down Expand Up @@ -6815,7 +6815,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/set-function-length">set-function-length</a></td>
<td>1.1.1</td>
<td>1.2.0</td>
<td>MIT</td>
<td>Jordan Harband</td>
<td>[email protected]</td>
Expand Down Expand Up @@ -6955,7 +6955,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/sonic-boom">sonic-boom</a></td>
<td>3.7.0</td>
<td>3.8.0</td>
<td>MIT</td>
<td>Matteo Collina</td>
<td>[email protected]</td>
Expand Down Expand Up @@ -7265,7 +7265,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/swagger-ui-dist">swagger-ui-dist</a></td>
<td>5.10.5</td>
<td>5.11.0</td>
<td>Apache-2.0</td>
<td></td>
<td></td>
Expand Down Expand Up @@ -7355,7 +7355,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/timezones-list">timezones-list</a></td>
<td>3.0.2</td>
<td>3.0.3</td>
<td>MIT</td>
<td>Om Srivastava</td>
<td></td>
Expand All @@ -7365,17 +7365,17 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/tlds">tlds</a></td>
<td>1.240.0</td>
<td>1.244.0</td>
<td>MIT</td>
<td>Stephen Mathieson</td>
<td>[email protected]</td>
<td></td>
<td>
<a href="https://github.com/stephenmathieson/node-tlds">github.com/stephenmathieson/node-tlds</a>
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/tlds">tlds</a></td>
<td>1.244.0</td>
<td>1.247.0</td>
<td>MIT</td>
<td>Stephen Mathieson</td>
<td></td>
Expand All @@ -7385,7 +7385,7 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/tlds">tlds</a></td>
<td>1.247.0</td>
<td>1.248.0</td>
<td>MIT</td>
<td>Stephen Mathieson</td>
<td></td>
Expand Down Expand Up @@ -7574,6 +7574,16 @@ <h1>EmailEngine v2.39.5</h1><p>EmailEngine includes code from the following soft
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/uc.micro">uc.micro</a></td>
<td>2.0.0</td>
<td>MIT</td>
<td></td>
<td></td>
<td>
<a href="https://github.com/markdown-it/uc.micro">github.com/markdown-it/uc.micro</a>
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/uglify-js">uglify-js</a></td>
<td>3.17.4</td>
<td>BSD-2-Clause</td>
Expand Down
10 changes: 5 additions & 5 deletions translations/messages.pot
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=ascii\n"
"POT-Creation-Date: 2024-01-03 18:14+0000\n"
"POT-Creation-Date: 2024-01-15 10:21+0000\n"

#: views/config/license.hbs:48
msgid "%d day"
msgid_plural "%d days"
msgstr[0] ""
msgstr[1] ""

#: views/redirect.hbs:1
msgid "Click <a href=\"%s\">here</a> to continue&mldr;"
msgstr ""

#: views/unsubscribe.hbs:1
#: views/unsubscribe.hbs:79
msgid "Unsubscribe"
Expand Down Expand Up @@ -57,6 +53,10 @@ msgstr ""
msgid "Enter your email address"
msgstr ""

#: views/redirect.hbs:1
msgid "Click <a href=\"%s\">here</a> to continue&mldr;"
msgstr ""

#: views/accounts/register/imap.hbs:11
msgid "Your name"
msgstr ""
Expand Down

0 comments on commit 47e64a8

Please sign in to comment.