mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 20:05:46 -06:00
fix(media): reject account-only route conflicts
This commit is contained in:
committed by
Ayaan Zaidi
parent
253180a265
commit
908a71ab57
@@ -482,6 +482,17 @@ describe("createMediaGenerationTaskLifecycle", () => {
|
||||
to: undefined,
|
||||
accountId: "bot-a",
|
||||
});
|
||||
|
||||
const accountOnlyHandle = lifecycle.createTaskRun({
|
||||
sessionKey: "agent:main:telegram:shared",
|
||||
requesterOrigin: { accountId: "bot-a" },
|
||||
prompt: "account-only proof image",
|
||||
});
|
||||
expect(accountOnlyHandle?.requesterOrigin).toEqual({
|
||||
channel: undefined,
|
||||
to: undefined,
|
||||
accountId: "bot-a",
|
||||
});
|
||||
});
|
||||
|
||||
it("returns the completion wake delivery result", async () => {
|
||||
|
||||
@@ -70,7 +70,6 @@ function resolvePinnedMediaRequesterOrigin(params: {
|
||||
const requesterOrigin = normalizeDeliveryContext(params.requesterOrigin);
|
||||
const sessionOrigin = normalizeDeliveryContext(params.sessionOrigin);
|
||||
const accountsConflict =
|
||||
requesterOrigin?.channel === sessionOrigin?.channel &&
|
||||
requesterOrigin?.accountId &&
|
||||
sessionOrigin?.accountId &&
|
||||
requesterOrigin.accountId !== sessionOrigin.accountId;
|
||||
|
||||
Reference in New Issue
Block a user