@waline/vercel 1.13.3 → 1.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@waline/vercel",
3
- "version": "1.13.3",
3
+ "version": "1.13.4",
4
4
  "description": "vercel server for waline comment system",
5
5
  "repository": "https://github.com/walinejs/waline",
6
6
  "license": "MIT",
7
7
  "author": "lizheming <i@imnerd.org>",
8
8
  "dependencies": {
9
9
  "@cloudbase/node-sdk": "^2.9.0",
10
- "@koa/cors": "^3.2.0",
11
- "akismet": "^2.0.6",
10
+ "@koa/cors": "^3.3.0",
11
+ "akismet": "^2.0.7",
12
12
  "deta": "^1.1.0",
13
13
  "dompurify": "^2.3.6",
14
14
  "fast-csv": "^4.3.6",
@@ -31,8 +31,8 @@
31
31
  "think-logger3": "^1.3.1",
32
32
  "think-model": "^1.5.4",
33
33
  "think-model-mysql": "^1.1.7",
34
- "think-model-postgresql": "1.1.6",
35
- "think-model-sqlite": "^1.2.2",
34
+ "think-model-postgresql": "1.1.7",
35
+ "think-model-sqlite": "^1.2.3",
36
36
  "think-mongo": "^2.1.2",
37
37
  "think-router-rest": "^1.0.5",
38
38
  "thinkjs": "^3.2.14",
@@ -7,6 +7,11 @@ module.exports = [
7
7
  {
8
8
  context: {
9
9
  get serverURL() {
10
+ const { SERVER_URL } = process.env;
11
+ if (SERVER_URL) {
12
+ return SERVER_URL;
13
+ }
14
+
10
15
  const { protocol, host, path, controller } = this;
11
16
  return `${protocol}://${host}${path.slice(0, -controller.length)}`;
12
17
  },
@@ -354,7 +354,7 @@ module.exports = class extends think.Service {
354
354
  }
355
355
 
356
356
  async run(comment, parent, disableAuthorNotify = false) {
357
- const { AUTHOR_EMAIL, BLOGGER_EMAIL } = process.env;
357
+ const { AUTHOR_EMAIL, BLOGGER_EMAIL, DISABLE_AUTHOR_NOTIFY } = process.env;
358
358
  const { mailSubject, mailTemplate, mailSubjectAdmin, mailTemplateAdmin } =
359
359
  think.config();
360
360
  const AUTHOR = AUTHOR_EMAIL || BLOGGER_EMAIL;
@@ -383,7 +383,7 @@ module.exports = class extends think.Service {
383
383
  <br/>
384
384
  </div>`;
385
385
 
386
- if (!isAuthorComment && !disableAuthorNotify) {
386
+ if (!DISABLE_AUTHOR_NOTIFY && !isAuthorComment && !disableAuthorNotify) {
387
387
  const wechat = await this.wechat({ title, content }, comment, parent);
388
388
  const qywxAmWechat = await this.qywxAmWechat(
389
389
  { title, content },