mirror of https://github.com/openclaw/openclaw.git
Feishu: skip comment events before bot identity recovery
This commit is contained in:
parent
6d981e17ea
commit
4bbce18e99
|
|
@ -308,6 +308,18 @@ describe("resolveDriveCommentEventTurn", () => {
|
|||
|
||||
expect(turn).toBeNull();
|
||||
});
|
||||
|
||||
it("skips comment notices when bot open_id is unavailable", async () => {
|
||||
const synthetic = await resolveDriveCommentSyntheticEvent({
|
||||
cfg: buildMonitorConfig(),
|
||||
accountId: "default",
|
||||
event: makeDriveCommentEvent(),
|
||||
botOpenId: undefined,
|
||||
createClient: () => makeOpenApiClient({}) as never,
|
||||
});
|
||||
|
||||
expect(synthetic).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("drive.notice.comment_add_v1 monitor handler", () => {
|
||||
|
|
|
|||
|
|
@ -479,6 +479,13 @@ async function resolveDriveCommentEventCore(params: ResolveDriveCommentEventPara
|
|||
logger?.(`feishu[${accountId}]: unsupported drive comment notice type ${noticeType}`);
|
||||
return null;
|
||||
}
|
||||
if (!botOpenId) {
|
||||
logger?.(
|
||||
`feishu[${accountId}]: skipping drive comment notice because bot open_id is unavailable ` +
|
||||
`event=${eventId}`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
if (senderId === botOpenId) {
|
||||
logger?.(
|
||||
`feishu[${accountId}]: ignoring self-authored drive comment notice event=${eventId} sender=${senderId}`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue