Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: 企业微信群聊机器人通知 || [Feature]: Enterprise WeChat group chat robot notification #2661

Open
axiaoxin opened this issue Aug 11, 2024 · 5 comments
Labels
discussion Question or dicussion enhancement New feature or request

Comments

@axiaoxin
Copy link

axiaoxin commented Aug 11, 2024

功能概述 | Describe the feature

curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=the-bot-key' \
   -H 'Content-Type: application/json' \
   -d '
   {
        "msgtype": "text",
        "text": {
            "content": "hello world"
        }
   }'

Feature Overview | Describe the feature

curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=the-bot-key' \
   -H 'Content-Type: application/json' \
   -d '
   {
        "msgtype": "text",
        "text": {
            "content": "hello world"
        }
   }'
@axiaoxin axiaoxin added discussion Question or dicussion enhancement New feature or request labels Aug 11, 2024
@github-actions github-actions bot changed the title [Feature]: 企业微信群聊机器人通知 [Feature]: 企业微信群聊机器人通知 || [Feature]: Enterprise WeChat group chat robot notification Aug 11, 2024
@lizheming
Copy link
Collaborator

我们是支持企业微信通知的 https://waline.js.org/guide/features/notification.html#%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E5%BA%94%E7%94%A8%E9%80%9A%E7%9F%A5

由于企业微信不怎么在外网使用,所以并没有在英文文档中描述。

如果你认为功能有差异,你也可以使用 WEBHOOK 环境变量 https://waline.js.org/reference/server/env.html#%E9%AB%98%E7%BA%A7%E9%85%8D%E7%BD%AE 或者是自己写一个 Waline 插件来实现 https://waline.js.org/reference/server/plugin.html

@axiaoxin
Copy link
Author

axiaoxin commented Aug 12, 2024

好的。是有一点功能差异,我目前就是采用的你提到的webhook方式实现的。
确实需求比较小众,我的应用场景是个人身份是有群聊机器人接收通知,个人没有办法认证企业,应该是没有企业ID,群聊机器人则没有限制,server酱的接入链接也没法打开,所以提了这个功能请求。我看官方文档有飞书的群聊机器人,其实差不多。


OK There are some functional differences. I currently implement it using the webhook method you mentioned.
It is true that the demand is relatively niche. My application scenario is that a group chat robot receives notifications for personal identity. There is no way for individuals to authenticate the company. There should be no corporate ID. There is no limit for group chat robots, and the access link of the server sauce cannot be opened. , so this feature request was made. I saw that the official documentation includes Feishu’s group chat robot, which is actually pretty much the same.

@mapxn
Copy link
Contributor

mapxn commented Oct 18, 2024

@axiaoxin

个人没有办法认证企业,应该是没有企业ID

非认证企业也是有企业ID的,对个人用户的限制主要在可信ip,企业应用必须配置一个固定的可信ip才能正常使用。


对于企业微信,现在新建的企业是强制要求配置可信ip(于2022年6月开始强制要求,见官方通知)。如果使用Vercel等serverless方式部署,每次的调用ip都可能不同,需要使用有固定ip的服务器进行中转,但既然有服务器了为什么还要使用serverless呢?

对于企业微信群机器人,则没有可信ip的限制,还是建议加上官方支持比较好。(看到飞书群聊机器人已经支持了,这两个非常类似)


@xiaoxin

There is no way for an individual to authenticate an enterprise, as there should be no enterprise ID.

Non-certified enterprises also have enterprise IDs. The restrictions on individual users are mainly based on trusted IP. Enterprise applications must be configured with a fixed trusted IP to be used normally.


For enterprise WeChat, it is now mandatory for newly established enterprises to configure trusted IP (it will be mandatory in June 2022, see official notice). If you use serverless deployment methods such as Vercel, the IP address may be different each time, and you need to use a server with a fixed IP for transfer. But since you already have a server, why use serverless?

For enterprise WeChat group robots, there are no restrictions on trusted IPs. It is recommended to add official support. (See that Feishu Group Chat Robot has been supported, the two are very similar)

@axiaoxin
Copy link
Author

axiaoxin commented Oct 18, 2024

我现在是用一个接口接收回调,然后再转发到企业微信群聊做和简单新评论通知😂
目前使用中有两个体验问题感觉可以优化一下,一是我在后台回复别人也会收到评论通知,二是我在后台回复是没法快捷添加表情包


I now use an interface to receive callbacks, and then forward them to the corporate WeChat group chat for simple new comment notifications😂
There are currently two experience issues in use that I feel can be optimized. One is that I will receive comment notifications when I reply to others in the background, and the other is that I cannot quickly add emoticons when replying in the background

@mapxn
Copy link
Contributor

mapxn commented Oct 18, 2024

@axiaoxin 这个Feature并没有被添加进来,可以把这个Feature Request重新打开吗?
我觉得可以根据飞书群机器人的实现 照葫芦画瓢添加一个,顺便解决你发现的问题。看有没有哪位可爱的大佬提个PR


@axiaoxin This Feature has not been added. Can you reopen this Feature Request?
I think you can add one according to the implementation of Feishuqun robot, and solve the problems you found. Let’s see if any cute boss can suggest a PR

@lizheming lizheming reopened this Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Question or dicussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants