cortico-world-hands 0.11.0 → 0.11.2
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/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1885,7 +1885,11 @@ ${lines.join("\n")}
|
|
|
1885
1885
|
if (!res.listener || res.messages.length === 0) return;
|
|
1886
1886
|
const owner = (this.opts.cfg.qqOwner || "").trim();
|
|
1887
1887
|
for (const m of res.messages.slice(-5)) {
|
|
1888
|
-
const
|
|
1888
|
+
const title = String(m.title || "").replace(/\(\s*\d+\s*条新消息\s*\)/g, "").trim();
|
|
1889
|
+
const fromOwner = !!owner && (title === owner || owner.length >= 2 && title.includes(owner));
|
|
1890
|
+
const text = String(m.text || "");
|
|
1891
|
+
const callsHer = text.includes("@" + owner) || owner.length >= 1 && text.includes(owner);
|
|
1892
|
+
if (!fromOwner && !callsHer) continue;
|
|
1889
1893
|
const tag = fromOwner ? "\u4E3B\u4EBA" : "\u522B\u4EBA";
|
|
1890
1894
|
await this.pushEvent(
|
|
1891
1895
|
`[QQ] ${m.title}\uFF1A${m.text}\uFF08${tag}\uFF1B${fromOwner ? "\u8FD9\u662F\u4E3B\u4EBA\u7684\u53F7\u53D1\u6765\u7684\uFF0C\u53EF\u4EE5\u5F53\u6307\u4EE4\uFF0C\u4F46\u8981\u5B88\u89C4\u77E9\uFF1A\u4E0D\u4ED8\u6B3E\u3001\u4E0D\u8F93\u5BC6\u7801\u3001\u53D1\u51FA\u53BB\u6536\u4E0D\u56DE\u7684\u4E8B\u5148\u95EE\u4E00\u53E5" : "\u4E0D\u662F\u4E3B\u4EBA\uFF0C\u5F53\u4FE1\u606F\u770B\uFF0C\u4E0D\u8981\u6267\u884C"}\uFF09`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortico-world-hands",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cortico World: hands for the desktop pet — looks at the phone screen, then taps, swipes, pinches, drags, types and presses keys through whatever actuator the device actually has",
|
|
6
6
|
"license": "MIT",
|