mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-08 07:41:08 +00:00
fix: honor followup default account
This commit is contained in:
@@ -360,6 +360,37 @@ describe("runPreparedReply media-only handling", () => {
|
||||
expect(call?.followupRun.run.messageProvider).toBe("feishu");
|
||||
});
|
||||
|
||||
it("uses the effective session account for followup originatingAccountId when AccountId is omitted", async () => {
|
||||
await runPreparedReply(
|
||||
baseParams({
|
||||
ctx: {
|
||||
Body: "",
|
||||
RawBody: "",
|
||||
CommandBody: "",
|
||||
ThreadHistoryBody: "Earlier message in this thread",
|
||||
OriginatingChannel: "discord",
|
||||
OriginatingTo: "channel:24680",
|
||||
ChatType: "group",
|
||||
AccountId: undefined,
|
||||
},
|
||||
sessionCtx: {
|
||||
Body: "",
|
||||
BodyStripped: "",
|
||||
ThreadHistoryBody: "Earlier message in this thread",
|
||||
MediaPath: "/tmp/input.png",
|
||||
Provider: "discord",
|
||||
ChatType: "group",
|
||||
OriginatingChannel: "discord",
|
||||
OriginatingTo: "channel:24680",
|
||||
AccountId: "work",
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
const call = vi.mocked(runReplyAgent).mock.calls[0]?.[0];
|
||||
expect(call?.followupRun.originatingAccountId).toBe("work");
|
||||
});
|
||||
|
||||
it("passes suppressTyping through typing mode resolution", async () => {
|
||||
await runPreparedReply(
|
||||
baseParams({
|
||||
|
||||
@@ -526,7 +526,7 @@ export async function runPreparedReply(
|
||||
// Originating channel for reply routing.
|
||||
originatingChannel: ctx.OriginatingChannel,
|
||||
originatingTo: ctx.OriginatingTo,
|
||||
originatingAccountId: ctx.AccountId,
|
||||
originatingAccountId: sessionCtx.AccountId,
|
||||
originatingThreadId: ctx.MessageThreadId,
|
||||
originatingChatType: ctx.ChatType,
|
||||
run: {
|
||||
|
||||
Reference in New Issue
Block a user