node-karin 1.3.8 → 1.3.10
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/CHANGELOG.md +14 -0
- package/dist/index.js +47 -42
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.3.10](https://github.com/KarinJS/Karin/compare/core-v1.3.9...core-v1.3.10) (2025-02-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Bug Fixes
|
|
7
|
+
|
|
8
|
+
* 负责捕获处理非OneBOT11标准适配器报错的问题 ([#267](https://github.com/KarinJS/Karin/issues/267)) ([9291a0c](https://github.com/KarinJS/Karin/commit/9291a0c1de9cf02aa54439807d497ecd511cb49a))
|
|
9
|
+
|
|
10
|
+
## [1.3.9](https://github.com/KarinJS/Karin/compare/core-v1.3.8...core-v1.3.9) (2025-02-14)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### 🐛 Bug Fixes
|
|
14
|
+
|
|
15
|
+
* 鉴权失败打印auth ([a0a4df6](https://github.com/KarinJS/Karin/commit/a0a4df6d2300f7ee08326a309bfcb38ae674f30d))
|
|
16
|
+
|
|
3
17
|
## [1.3.8](https://github.com/KarinJS/Karin/compare/core-v1.3.7...core-v1.3.8) (2025-02-14)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.js
CHANGED
|
@@ -13633,49 +13633,54 @@ var init_event = __esm({
|
|
|
13633
13633
|
import fs28 from "node:fs";
|
|
13634
13634
|
function AdapterConvertKarin(data = []) {
|
|
13635
13635
|
const elements = [];
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
|
|
13636
|
+
try {
|
|
13637
|
+
for (const i of data) {
|
|
13638
|
+
switch (i.type) {
|
|
13639
|
+
case "text":
|
|
13640
|
+
elements.push(segment_exports.text(i.data.text));
|
|
13641
|
+
break;
|
|
13642
|
+
case "face":
|
|
13643
|
+
elements.push(segment_exports.face(Number(i.data.id)));
|
|
13644
|
+
break;
|
|
13645
|
+
case "image":
|
|
13646
|
+
elements.push(segment_exports.image(i.data.url || i.data.file, { fileType: i.data.type }));
|
|
13647
|
+
break;
|
|
13648
|
+
case "record":
|
|
13649
|
+
elements.push(segment_exports.record(i.data.url || i.data.file, i.data.magic === 1));
|
|
13650
|
+
break;
|
|
13651
|
+
case "video":
|
|
13652
|
+
elements.push(segment_exports.video(i.data.url || i.data.file));
|
|
13653
|
+
break;
|
|
13654
|
+
case "at":
|
|
13655
|
+
elements.push(segment_exports.at(i.data.qq, i.data.name));
|
|
13656
|
+
break;
|
|
13657
|
+
case "contact":
|
|
13658
|
+
elements.push(segment_exports.contact(i.data.type === "qq" ? "friend" : "group", i.data.id));
|
|
13659
|
+
break;
|
|
13660
|
+
case "location":
|
|
13661
|
+
elements.push(segment_exports.location(
|
|
13662
|
+
Number(i.data.lat),
|
|
13663
|
+
Number(i.data.lon),
|
|
13664
|
+
i.data.title || "",
|
|
13665
|
+
i.data.content || ""
|
|
13666
|
+
));
|
|
13667
|
+
break;
|
|
13668
|
+
case "reply":
|
|
13669
|
+
elements.push(segment_exports.reply(i.data.id));
|
|
13670
|
+
break;
|
|
13671
|
+
case "json":
|
|
13672
|
+
elements.push(segment_exports.json(i.data.data));
|
|
13673
|
+
break;
|
|
13674
|
+
case "xml":
|
|
13675
|
+
elements.push(segment_exports.xml(i.data.data));
|
|
13676
|
+
break;
|
|
13677
|
+
default: {
|
|
13678
|
+
elements.push(segment_exports.text(JSON.stringify(i)));
|
|
13679
|
+
}
|
|
13677
13680
|
}
|
|
13678
13681
|
}
|
|
13682
|
+
} catch (error) {
|
|
13683
|
+
return elements;
|
|
13679
13684
|
}
|
|
13680
13685
|
return elements;
|
|
13681
13686
|
}
|
|
@@ -16150,7 +16155,7 @@ var init_server2 = __esm({
|
|
|
16150
16155
|
}
|
|
16151
16156
|
const auth2 = this.request.headers["authorization"];
|
|
16152
16157
|
if (auth2 !== `Bearer ${token}`) {
|
|
16153
|
-
this.logger("error", `[oneBot11][\u9274\u6743\u5931\u8D25] address: ${this.adapter.address} token: ${token}`);
|
|
16158
|
+
this.logger("error", `[oneBot11][\u9274\u6743\u5931\u8D25] address: ${this.adapter.address} token: ${token} auth: ${auth2}`);
|
|
16154
16159
|
this.socket.close();
|
|
16155
16160
|
return false;
|
|
16156
16161
|
}
|