refactor!: rename chat providers to channels
This commit is contained in:
1 parent
0cd632ba84
commit
90342a4f3a
393 files changed
+8004
-6737
No files matched your search
@@ -126,18 +126,20 @@ describe("resolveTextChunkLimit", () => {
|
||||
});
|
||||
|
||||
it("supports provider overrides", () => {
|
||||
const cfg = { telegram: { textChunkLimit: 1234 } };
|
||||
const cfg = { channels: { telegram: { textChunkLimit: 1234 } } };
|
||||
expect(resolveTextChunkLimit(cfg, "whatsapp")).toBe(4000);
|
||||
expect(resolveTextChunkLimit(cfg, "telegram")).toBe(1234);
|
||||
});
|
||||
|
||||
it("prefers account overrides when provided", () => {
|
||||
const cfg = {
|
||||
telegram: {
|
||||
textChunkLimit: 2000,
|
||||
accounts: {
|
||||
default: { textChunkLimit: 1234 },
|
||||
primary: { textChunkLimit: 777 },
|
||||
channels: {
|
||||
telegram: {
|
||||
textChunkLimit: 2000,
|
||||
accounts: {
|
||||
default: { textChunkLimit: 1234 },
|
||||
primary: { textChunkLimit: 777 },
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -147,8 +149,10 @@ describe("resolveTextChunkLimit", () => {
|
||||
|
||||
it("uses the matching provider override", () => {
|
||||
const cfg = {
|
||||
discord: { textChunkLimit: 111 },
|
||||
slack: { textChunkLimit: 222 },
|
||||
channels: {
|
||||
discord: { textChunkLimit: 111 },
|
||||
slack: { textChunkLimit: 222 },
|
||||
},
|
||||
};
|
||||
expect(resolveTextChunkLimit(cfg, "discord")).toBe(111);
|
||||
expect(resolveTextChunkLimit(cfg, "slack")).toBe(222);
|
||||
|
||||
Reference in new issue
Block a user