mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-10 06:30:46 +08:00
feat(feishu): add configurable group response mode
This commit is contained in:
parent
1a86fa5013
commit
9950261a49
19 changed files with 615 additions and 150 deletions
|
|
@ -23,6 +23,10 @@ test('PluginConfigStore persists non-secret onboarding facts', async () => {
|
|||
assert.doesNotMatch(raw, /must-not-be-written/);
|
||||
assert.equal((await stat(path)).mode & 0o777, 0o600);
|
||||
assert.equal((await new PluginConfigStore(path).load()).get().appId, 'cli_test');
|
||||
assert.equal(store.get().groupResponseMode, 'mention');
|
||||
|
||||
await store.save({ ...store.get(), groupResponseMode: 'all' });
|
||||
assert.equal((await new PluginConfigStore(path).load()).get().groupResponseMode, 'all');
|
||||
|
||||
await store.clear();
|
||||
assert.equal(store.get(), null);
|
||||
|
|
@ -66,6 +70,7 @@ test('PluginConfigStore migrates a v1 bot atomically without moving its credenti
|
|||
assert.deepEqual(migrated.bots[0].ownerOpenIds, ['ou_legacy']);
|
||||
assert.equal(store.get().ownerOpenId, 'ou_legacy');
|
||||
assert.equal(store.list()[0].appId, 'cli_legacy');
|
||||
assert.equal(store.list()[0].groupResponseMode, 'mention');
|
||||
});
|
||||
|
||||
test('PluginConfigStore rejects an invalid or duplicate v2 document without dropping entries', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue