mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 12:03:38 +02:00
fix(matrix-bots): resolve TypeScript strict null check errors
- Fix parseInt undefined errors in configuration files - Add fallbacks for Matrix client constructor parameters - Fix possibly undefined data accesses with non-null assertions - Update setCurrentConversation to accept null Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f07387d12c
commit
004fe85799
15 changed files with 44 additions and 44 deletions
|
|
@ -60,8 +60,8 @@ export class MatrixService implements OnModuleInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const storage = new SimpleFsStorageProvider(storagePath);
|
||||
this.client = new MatrixClient(homeserverUrl, accessToken, storage);
|
||||
const storage = new SimpleFsStorageProvider(storagePath || './data/bot-storage.json');
|
||||
this.client = new MatrixClient(homeserverUrl || 'http://localhost:8008', accessToken, storage);
|
||||
|
||||
AutojoinRoomsMixin.setupOnClient(this.client);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
export default () => ({
|
||||
port: parseInt(process.env.PORT, 10) || 3326,
|
||||
port: parseInt(process.env.PORT || '3326', 10),
|
||||
matrix: {
|
||||
homeserverUrl: process.env.MATRIX_HOMESERVER_URL || 'http://localhost:8008',
|
||||
accessToken: process.env.MATRIX_ACCESS_TOKEN,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue