Gate bot logic on full account authentication
This commit is contained in:
1 parent
4db6de8bf5
commit
2fd92bf82c
22 files changed
+635
-65
No files matched your search
@@ -8,6 +8,7 @@ import { ChatService } from '../src/services/chat/service.js';
|
||||
import { ChatCache } from '../src/services/chat/cache.js';
|
||||
import { MatrixAuthError, MatrixClient } from '../src/services/chat/matrix/client.js';
|
||||
import { createMockLogger } from './mockLogger.js';
|
||||
import { authenticatedAccountAuth } from './testUtils.js';
|
||||
|
||||
const creds = {
|
||||
homeserver: 'https://matrix.example.test',
|
||||
@@ -47,6 +48,7 @@ describe('ChatService username persistence', () => {
|
||||
tmpCache(logger),
|
||||
undefined,
|
||||
repo,
|
||||
authenticatedAccountAuth,
|
||||
);
|
||||
|
||||
expect(svc.resolveSenderDisplay('@t2_abc:reddit.com')).toBe('alice');
|
||||
@@ -61,6 +63,9 @@ describe('ChatService username persistence', () => {
|
||||
logger,
|
||||
undefined, undefined, undefined, undefined,
|
||||
tmpCache(logger),
|
||||
undefined,
|
||||
undefined,
|
||||
authenticatedAccountAuth,
|
||||
);
|
||||
expect(svc.resolveSenderDisplay('@t2_unknown:reddit.com')).toBe('t2_unknown');
|
||||
});
|
||||
@@ -95,6 +100,7 @@ describe('ChatService username persistence', () => {
|
||||
cache,
|
||||
undefined,
|
||||
repo,
|
||||
authenticatedAccountAuth,
|
||||
);
|
||||
|
||||
await svc.loadCache();
|
||||
@@ -145,6 +151,9 @@ describe('ChatService username persistence', () => {
|
||||
tokenRefresher,
|
||||
usernameResolver,
|
||||
cache,
|
||||
undefined,
|
||||
undefined,
|
||||
authenticatedAccountAuth,
|
||||
);
|
||||
|
||||
await svc.enrichUsernames();
|
||||
|
||||
Reference in new issue
Block a user