fix(feishu): centralize action integer parsing · openclaw/openclaw@4c4e8a2
steipete
·
2026-05-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1047,6 +1047,25 @@ describe("feishuPlugin actions", () => {
|
1047 | 1047 | expect(requireRecord(peers[0], "peer").id).toBe("ou_1"); |
1048 | 1048 | }); |
1049 | 1049 | |
| 1050 | +it("accepts plus-signed channel-list limits", async () => { |
| 1051 | +listFeishuDirectoryGroupsLiveMock.mockResolvedValueOnce([{ kind: "group", id: "oc_group_1" }]); |
| 1052 | + |
| 1053 | +await feishuPlugin.actions?.handleAction?.({ |
| 1054 | +action: "channel-list", |
| 1055 | +params: { query: "eng", limit: "+05", scope: "groups" }, |
| 1056 | + cfg, |
| 1057 | +accountId: undefined, |
| 1058 | +} as never); |
| 1059 | + |
| 1060 | +expect(listFeishuDirectoryGroupsLiveMock).toHaveBeenCalledWith({ |
| 1061 | + cfg, |
| 1062 | +query: "eng", |
| 1063 | +limit: 5, |
| 1064 | +fallbackToStatic: false, |
| 1065 | +accountId: undefined, |
| 1066 | +}); |
| 1067 | +}); |
| 1068 | + |
1050 | 1069 | it("ignores malformed channel-list limits", async () => { |
1051 | 1070 | listFeishuDirectoryGroupsLiveMock.mockResolvedValueOnce([{ kind: "group", id: "oc_group_1" }]); |
1052 | 1071 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。