twikoo-func 1.5.0 → 1.5.1

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.
Files changed (2) hide show
  1. package/index.js +10 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  /*!
2
- * Twikoo cloudbase function v1.5.0
2
+ * Twikoo cloudbase function
3
3
  * (c) 2020-present iMaeGoo
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  // 三方依赖 / 3rd party dependencies
8
+ const { version: VERSION } = require('./package.json')
8
9
  const tcb = require('@cloudbase/node-sdk') // 云开发 SDK
9
10
  const md5 = require('blueimp-md5') // MD5 加解密
10
11
  const bowser = require('bowser') // UserAgent 格式化
@@ -33,7 +34,6 @@ const window = new JSDOM('').window
33
34
  const DOMPurify = createDOMPurify(window)
34
35
 
35
36
  // 常量 / constants
36
- const VERSION = '1.5.0'
37
37
  const RES_CODE = {
38
38
  SUCCESS: 0,
39
39
  FAIL: 1000,
@@ -989,7 +989,12 @@ async function noticePushoo (comment) {
989
989
  const sendResult = await pushoo(config.PUSHOO_CHANNEL, {
990
990
  token: config.PUSHOO_TOKEN,
991
991
  title: pushContent.subject,
992
- content: pushContent.content
992
+ content: pushContent.content,
993
+ options: {
994
+ bark: {
995
+ url: pushContent.url
996
+ }
997
+ }
993
998
  })
994
999
  console.log('即时消息通知结果:', sendResult)
995
1000
  }
@@ -1013,7 +1018,8 @@ function getIMPushContent (comment) {
1013
1018
  原文链接:[${POST_URL}](${POST_URL})`
1014
1019
  return {
1015
1020
  subject,
1016
- content
1021
+ content,
1022
+ url: POST_URL
1017
1023
  }
1018
1024
  }
1019
1025
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twikoo-func",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "A simple comment system based on Tencent CloudBase (tcb).",
5
5
  "author": "imaegoo <hello@imaegoo.com> (https://github.com/imaegoo)",
6
6
  "license": "MIT",