diff --git a/packages/backend/src/nest/libp2p/libp2p.module.ts b/packages/backend/src/nest/libp2p/libp2p.module.ts index d75edc799e..e010bb8b55 100644 --- a/packages/backend/src/nest/libp2p/libp2p.module.ts +++ b/packages/backend/src/nest/libp2p/libp2p.module.ts @@ -1,10 +1,8 @@ import { Module } from '@nestjs/common' -import { SocketModule } from '../socket/socket.module' import { Libp2pService } from './libp2p.service' import { ProcessInChunksService } from './process-in-chunks.service' @Module({ - imports: [SocketModule], providers: [Libp2pService, ProcessInChunksService], exports: [Libp2pService], }) diff --git a/packages/backend/src/nest/socket/socket.service.ts b/packages/backend/src/nest/socket/socket.service.ts index 01978b6187..b7d1a46e0b 100644 --- a/packages/backend/src/nest/socket/socket.service.ts +++ b/packages/backend/src/nest/socket/socket.service.ts @@ -54,9 +54,7 @@ export class SocketService extends EventEmitter implements OnModuleInit { async onModuleInit() { this.logger('init: Started') - await this.init() - this.logger('init: Finished') } @@ -77,6 +75,8 @@ export class SocketService extends EventEmitter implements OnModuleInit { } private readonly attachListeners = () => { + this.logger('Attaching listeners') + // Attach listeners here this.serverIoProvider.io.on(SocketActionTypes.CONNECTION, socket => { this.logger('Socket connection') diff --git a/packages/backend/src/nest/storage/storage.service.ts b/packages/backend/src/nest/storage/storage.service.ts index a1663ea4fb..4b82d40250 100644 --- a/packages/backend/src/nest/storage/storage.service.ts +++ b/packages/backend/src/nest/storage/storage.service.ts @@ -691,6 +691,7 @@ export class StorageService extends EventEmitter { return } try { + this.logger('Sending message:', message.id) await repo.db.add(message) } catch (e) { this.logger.error( diff --git a/packages/state-manager/src/sagas/messages/sendMessage/sendMessage.saga.ts b/packages/state-manager/src/sagas/messages/sendMessage/sendMessage.saga.ts index fee94b4d50..21e7fbccd0 100644 --- a/packages/state-manager/src/sagas/messages/sendMessage/sendMessage.saga.ts +++ b/packages/state-manager/src/sagas/messages/sendMessage/sendMessage.saga.ts @@ -99,6 +99,7 @@ export function* sendMessageSaga( yield* take(publicChannelsActions.setChannelSubscribed) } + console.log('Emitting SEND_MESSAGE', id) yield* apply( socket, socket.emit,