@waline/vercel 1.35.0 → 1.35.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.
- package/package.json +1 -1
- package/src/service/notify.js +12 -12
package/package.json
CHANGED
package/src/service/notify.js
CHANGED
|
@@ -244,7 +244,7 @@ module.exports = class extends think.Service {
|
|
|
244
244
|
|
|
245
245
|
return fetch(`${qmsgHost}/send/${QMSG_KEY}`, {
|
|
246
246
|
method: 'POST',
|
|
247
|
-
|
|
247
|
+
headers: form.getHeaders(),
|
|
248
248
|
body: form,
|
|
249
249
|
}).then((resp) => resp.json());
|
|
250
250
|
}
|
|
@@ -288,7 +288,7 @@ module.exports = class extends think.Service {
|
|
|
288
288
|
\`\`\`
|
|
289
289
|
{{-self.commentLink}}
|
|
290
290
|
*邮箱:*\`{{self.mail}}\`
|
|
291
|
-
*审核:*{{self.status}}
|
|
291
|
+
*审核:*{{self.status}}
|
|
292
292
|
|
|
293
293
|
仅供评论预览,点击[查看完整內容]({{site.postUrl}})`;
|
|
294
294
|
|
|
@@ -306,18 +306,18 @@ module.exports = class extends think.Service {
|
|
|
306
306
|
},
|
|
307
307
|
};
|
|
308
308
|
|
|
309
|
-
const form = new FormData();
|
|
310
|
-
|
|
311
|
-
form.append('text', this.controller.locale(contentTG, data));
|
|
312
|
-
form.append('chat_id', TG_CHAT_ID);
|
|
313
|
-
form.append('parse_mode', 'MarkdownV2');
|
|
314
|
-
|
|
315
309
|
const resp = await fetch(
|
|
316
310
|
`https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMessage`,
|
|
317
311
|
{
|
|
318
312
|
method: 'POST',
|
|
319
|
-
|
|
320
|
-
|
|
313
|
+
headers: {
|
|
314
|
+
'Content-Type': 'application/json',
|
|
315
|
+
},
|
|
316
|
+
body: JSON.stringify({
|
|
317
|
+
chat_id: TG_CHAT_ID,
|
|
318
|
+
text: this.controller.locale(contentTG, data),
|
|
319
|
+
parse_mode: 'MarkdownV2',
|
|
320
|
+
}),
|
|
321
321
|
},
|
|
322
322
|
).then((resp) => resp.json());
|
|
323
323
|
|
|
@@ -367,7 +367,7 @@ module.exports = class extends think.Service {
|
|
|
367
367
|
|
|
368
368
|
return fetch(`http://www.pushplus.plus/send/${PUSH_PLUS_KEY}`, {
|
|
369
369
|
method: 'POST',
|
|
370
|
-
|
|
370
|
+
headers: form.getHeaders(),
|
|
371
371
|
body: form,
|
|
372
372
|
}).then((resp) => resp.json());
|
|
373
373
|
}
|
|
@@ -406,7 +406,7 @@ module.exports = class extends think.Service {
|
|
|
406
406
|
|
|
407
407
|
return fetch(DISCORD_WEBHOOK, {
|
|
408
408
|
method: 'POST',
|
|
409
|
-
|
|
409
|
+
headers: form.getHeaders(),
|
|
410
410
|
body: form,
|
|
411
411
|
}).then((resp) => resp.statusText);
|
|
412
412
|
// Expected return value: No Content
|