Commit e20ce810 authored by nanahira's avatar nanahira

fix event name

parent 76497462
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"fast-xml-parser": "^4.0.6", "fast-xml-parser": "^4.0.6",
"file-type": "^16.5.3", "file-type": "^16.5.3",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"koishi-thirdeye": "^11.1.14", "koishi-thirdeye": "^11.1.16",
"raw-body": "^2.5.1" "raw-body": "^2.5.1"
}, },
"devDependencies": { "devDependencies": {
...@@ -5823,16 +5823,16 @@ ...@@ -5823,16 +5823,16 @@
} }
}, },
"node_modules/koishi-thirdeye": { "node_modules/koishi-thirdeye": {
"version": "11.1.14", "version": "11.1.16",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.14.tgz", "resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.16.tgz",
"integrity": "sha512-poQZwMfkiurvDMdEhfa0TnhRhe/7VNismNDo6xcZAZVUfDl4Q8USCYEVwlmUvi6GSWl4X+4a51YL3VUZQX+GrA==", "integrity": "sha512-s+GnBykpqJkHkB4g0y3o3guU/qPGkRNBP/JQqZO7yqnK26shDvdlZTMdYm8taccajfP9lkhTuLnLsjk4XyEfUQ==",
"dependencies": { "dependencies": {
"minato-decorators": "^2.2.1", "minato-decorators": "^2.2.1",
"rxjs": "^7.5.6", "rxjs": "^7.5.6",
"satori-decorators": "^1.1.1" "satori-decorators": "^1.1.1"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.10.4" "koishi": "^4.10.6"
} }
}, },
"node_modules/leven": { "node_modules/leven": {
...@@ -12548,9 +12548,9 @@ ...@@ -12548,9 +12548,9 @@
} }
}, },
"koishi-thirdeye": { "koishi-thirdeye": {
"version": "11.1.14", "version": "11.1.16",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.14.tgz", "resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-11.1.16.tgz",
"integrity": "sha512-poQZwMfkiurvDMdEhfa0TnhRhe/7VNismNDo6xcZAZVUfDl4Q8USCYEVwlmUvi6GSWl4X+4a51YL3VUZQX+GrA==", "integrity": "sha512-s+GnBykpqJkHkB4g0y3o3guU/qPGkRNBP/JQqZO7yqnK26shDvdlZTMdYm8taccajfP9lkhTuLnLsjk4XyEfUQ==",
"requires": { "requires": {
"minato-decorators": "^2.2.1", "minato-decorators": "^2.2.1",
"rxjs": "^7.5.6", "rxjs": "^7.5.6",
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
"fast-xml-parser": "^4.0.6", "fast-xml-parser": "^4.0.6",
"file-type": "^16.5.3", "file-type": "^16.5.3",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"koishi-thirdeye": "^11.1.14", "koishi-thirdeye": "^11.1.16",
"raw-body": "^2.5.1" "raw-body": "^2.5.1"
}, },
"koishi": { "koishi": {
......
...@@ -38,8 +38,7 @@ export function adaptSession(bot: WeComBot, input: WecomEventResponse) { ...@@ -38,8 +38,7 @@ export function adaptSession(bot: WeComBot, input: WecomEventResponse) {
timestamp: body.CreateTime, timestamp: body.CreateTime,
}; };
if (body.MsgType === 'event' && !body.Event.startsWith('template_card_')) { if (body.MsgType === 'event' && !body.Event.startsWith('template_card_')) {
session.type = `wecom/${body.Event.replace('LOCATION', 'location')}`; session.type = `wecom/${body.Event}`;
console.log(`Got event ${session.type}`);
} else { } else {
switch (body.MsgType) { switch (body.MsgType) {
case 'text': case 'text':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment