mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:50:45 +00:00
fix: isolate external direct-message runtime policy
This commit is contained in:
@@ -1697,7 +1697,7 @@ describe("createTelegramBot", () => {
|
||||
expect(replySpy).toHaveBeenCalledTimes(1);
|
||||
const payload = replySpy.mock.calls[0][0];
|
||||
expect(payload.AccountId).toBe("opie");
|
||||
expect(payload.SessionKey).toBe("agent:opie:telegram:opie:direct:999");
|
||||
expect(payload.SessionKey).toBe("agent:opie:main");
|
||||
});
|
||||
|
||||
it("reloads DM routing bindings between messages without recreating the bot", async () => {
|
||||
@@ -1705,7 +1705,12 @@ describe("createTelegramBot", () => {
|
||||
const configForAgent = (agentId: string) => ({
|
||||
channels: {
|
||||
telegram: {
|
||||
defaultAccount: "work",
|
||||
accounts: {
|
||||
work: {
|
||||
botToken: "tok-work",
|
||||
dmPolicy: "open",
|
||||
},
|
||||
opie: {
|
||||
botToken: "tok-opie",
|
||||
dmPolicy: "open",
|
||||
@@ -1809,7 +1814,12 @@ describe("createTelegramBot", () => {
|
||||
loadConfig.mockReturnValue({
|
||||
channels: {
|
||||
telegram: {
|
||||
defaultAccount: "work",
|
||||
accounts: {
|
||||
work: {
|
||||
botToken: "tok-work",
|
||||
dmPolicy: "open",
|
||||
},
|
||||
opie: {
|
||||
botToken: "tok-opie",
|
||||
dmPolicy: "open",
|
||||
|
||||
Reference in New Issue
Block a user