mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 02:00:26 +00:00
fix: align channel owner context test types
This commit is contained in:
@@ -11,6 +11,8 @@ export type StoredConversationReference = {
|
||||
lastSeenAt?: string;
|
||||
/** Activity ID from the last message */
|
||||
activityId?: string;
|
||||
/** Channel thread root activity ID for threaded replies. */
|
||||
threadId?: string;
|
||||
/** User who sent the message */
|
||||
user?: { id?: string; name?: string; aadObjectId?: string };
|
||||
/** Agent/bot that received the message */
|
||||
|
||||
@@ -558,12 +558,15 @@ describe("msteams monitor handler authz", () => {
|
||||
} as unknown as Parameters<typeof handler>[0]);
|
||||
|
||||
expect(conversationStore.upsert).toHaveBeenCalledTimes(1);
|
||||
const storedArg = conversationStore.upsert.mock.calls[0]?.[1] as Record<string, unknown>;
|
||||
expect(storedArg).toBeDefined();
|
||||
// Top-level tenantId must not be present when no source is available.
|
||||
expect(storedArg.tenantId).toBeUndefined();
|
||||
// aadObjectId still captured from `from.aadObjectId` when present.
|
||||
expect(storedArg.aadObjectId).toBe("sender-aad");
|
||||
expect(conversationStore.upsert).toHaveBeenCalledWith(
|
||||
"19:no-tenant@thread.tacv2",
|
||||
expect.not.objectContaining({ tenantId: expect.anything() }),
|
||||
);
|
||||
expect(conversationStore.upsert).toHaveBeenCalledWith(
|
||||
"19:no-tenant@thread.tacv2",
|
||||
expect.objectContaining({ aadObjectId: "sender-aad" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("logs an info drop reason when dmPolicy allowlist rejects a sender", async () => {
|
||||
|
||||
Reference in New Issue
Block a user