This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
能否增加企业微信通知或者提供一个自定义的WebHook #32
Labels
enhancement
New feature or request
Comments
企业微信的接口文档在这里 https://developer.work.weixin.qq.com/document/path/90372 (不用谢😂 |
开启 WebHook 后,创建新评论将以 POST 方式携带 ArtalkGo 配置文件 artalk-go.yml admin_notify:
webhook:
enabled: true
url: "http://localhost:23387/" WebHook 请求数据样本 {
"notify_subject": "",
"notify_body": "@测试用户:\n\n测试内容\n\nhttps://127.0.0.1/index.html?atk_comment=1057",
"comment": {
"id": 1057,
"content": "测试内容",
"user_id": 226,
"nick": "测试用户",
"email_encrypted": "654236c1e78i4c09a17c4869c9d43910",
"link": "https://qwqaq.com",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 12_4_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36",
"date": "2022-05-23 17:00:23",
"is_collapsed": false,
"is_pending": false,
"is_pinned": false,
"is_allow_reply": false,
"rid": 0,
"badge_name": "",
"badge_color": "",
"visible": true,
"vote_up": 0,
"vote_down": 0,
"page_key": "/index.html",
"page_url": "https://127.0.0.1/index.html",
"site_name": "ArtalkDocs"
},
"parent_comment": null
} 服务器端处理 WebHook 请求示例 webhook_server.js const http = require("http");
const requestListener = function (req, res) {
// receive json request
let body = "";
req.on("data", function (data) {
body += data;
});
req.on("end", function () {
let json = "";
try {
json = JSON.parse(body);
} catch {}
// do something with json
console.log(json);
res.end();
});
res.writeHead(200);
res.end("Hello, World!");
};
const server = http.createServer(requestListener);
server.listen(23387); $ node webhook_server.js |
v2.1.8 新增通知 WebHook 支持,微信接入比较麻烦... 🤣 先搁置 |
微信那个能用的只是文本信息那个 API,其他的花里胡哨的模板只能通过微信企业版查阅。
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
由于朋友的安利,打算从Waline转Artalk来啦~
大概看了一下文档,好像没有支持企业微信的通知,不知后面是否有支持的计划?
The text was updated successfully, but these errors were encountered: