mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 00:19:39 +02:00
debug: add message handler logging for planta-bot investigation
This commit is contained in:
parent
352388bb78
commit
07a4c1c4bc
1 changed files with 7 additions and 1 deletions
|
|
@ -146,10 +146,11 @@ export abstract class BaseMatrixService implements OnModuleInit, OnModuleDestroy
|
|||
this.client.on('room.message', async (roomId: string, event: MatrixRoomEvent) => {
|
||||
await this.onRoomMessage(roomId, event);
|
||||
});
|
||||
this.logger.log('Message handler registered');
|
||||
|
||||
// Start the client
|
||||
await this.client.start();
|
||||
this.logger.log('Matrix client started');
|
||||
this.logger.log('Matrix client started and syncing');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -198,6 +199,11 @@ export abstract class BaseMatrixService implements OnModuleInit, OnModuleDestroy
|
|||
* Handle incoming room message
|
||||
*/
|
||||
protected async onRoomMessage(roomId: string, event: MatrixRoomEvent): Promise<void> {
|
||||
// Debug: Log all incoming messages
|
||||
this.logger.debug(
|
||||
`[MESSAGE] Room: ${roomId}, Sender: ${event.sender}, Type: ${event.type}, MsgType: ${event.content?.msgtype}`
|
||||
);
|
||||
|
||||
// Ignore own messages
|
||||
if (event.sender === this.botUserId) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue