Commit ea556fe3 authored by nanahira's avatar nanahira

no lock

parent afcf741e
This diff is collapsed.
......@@ -45,7 +45,7 @@
"testEnvironment": "node"
},
"peerDependencies": {
"koishi": "^4.11.6",
"koishi": "^4.13.5",
"koishi-plugin-cache-aragami": "^2.5.0"
},
"devDependencies": {
......@@ -64,7 +64,7 @@
"ts-jest": "^27.1.5",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
"typescript": "^5.1.6",
"webpack": "^5.75.0",
"webpack-cli": "^4.10.0",
"ws": "^8.11.0"
......
......@@ -192,14 +192,14 @@ export default class WeComBot extends Bot<Partial<WeComBotConfig>> {
}
}
getToken() {
return this.aragami.lock(this.selfId, async () => {
const tokenObject = await this.aragami.get(WeComToken, this.selfId);
if (tokenObject) {
return tokenObject.token;
}
return this.fetchNewToken();
});
async getToken() {
// return this.aragami.lock(this.selfId, async () => {
const tokenObject = await this.aragami.get(WeComToken, this.selfId);
if (tokenObject) {
return tokenObject.token;
}
return this.fetchNewToken();
// });
}
async handleMenuEvent(event: string, session: Session) {
......
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