Commit 0a530837 authored by nanahira's avatar nanahira

fix special apps without agent info

parent b9f4f426
...@@ -191,6 +191,10 @@ export class WeComBot extends Bot<BotConfig> { ...@@ -191,6 +191,10 @@ export class WeComBot extends Bot<BotConfig> {
const agent = data.agentlist.find( const agent = data.agentlist.find(
(a) => a.agentid.toString() === this.selfId, (a) => a.agentid.toString() === this.selfId,
); );
if (!agent) {
// special things
return { userId: this.selfId };
}
const self: Bot.User = { const self: Bot.User = {
userId: agent.agentid.toString(), userId: agent.agentid.toString(),
username: agent.name, username: agent.name,
......
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