-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
没法获取群里有人@我的精确问题 #38
Comments
我这几天研究下wechaty能否区分的,再给方案 |
wechaty 原贴讨论:wechaty/wechaty#2247 |
有人引用我的时候也会, 有人复制了包含@我 也会. 我自动回复结果这些情况都回复了 |
@pkptzx 出现了@你的确实没法区分,正如我贴的wechaty的源码,是不区分的 我理解的是引用回复也是 @提到你的一部分,我建议对于引用回复,手动用正则去匹配内容做区分,以下是一个引用体的消息内容, 其正则表达式如下 const regexp = /「[^」]+」 - - - - - - - - - - - - - -/
const isQuoteMsg = regexp.test("「lccc:@C qqww」 - - - - - - - - - - - - - - - 你好") 这次加了isMentioned 字段其实大部分和 @yourname 的功能一样,也能通过自己编程去做到。但是我实际测试下来可以标记四个场景
|
@danni-cool 想请教下为什么我调用时候isMentioned这个字段始终返回0 |
在微信中@人和内容之间的空白,我之前看的是个空白符(非空格),我以为所有端都一样.
今天发现在macOS PC端居然是空格,其他端都是空白符
这样的话,导致我无法区分是有人@我,还是聊天信息里出现了"@我 "的字符.
我看了wechaty他是有mention信息的(非web接口)
但docker-wechatbot-webhook 没有提供这个字段
或有什么好办法?
The text was updated successfully, but these errors were encountered: