Skip to content

Commit 9128021

Browse files
committed
refactor: remove unnecessary console.log statements in ProfilesService, StateService, and definitions to clean up code and improve performance
1 parent 89ca9dd commit 9128021

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

packages/federation-sdk/src/services/profiles.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ export class ProfilesService {
205205
for (const [, event] of state.entries()) {
206206
// PersistentEventBase has an event getter that contains the actual event data
207207
pdus.push(event.event);
208-
console.log('event ->>>', event);
209208
// Get the complete auth chain for this event
210209
try {
211210
const authChain = await getAuthChain(event, store);

packages/federation-sdk/src/services/state.service.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ export class StateService {
247247
return new Map();
248248
}
249249

250-
console.log('pdu ->>>', pdu.isState(), pdu.type);
251250
// Retrieves a snapshot of a room's state at a given event, in the form of event IDs. This performs the same function as calling /state/{roomId}, however this returns just the event IDs rather than the full events.
252251
const stateId = !pdu.isState()
253252
? event.stateId
@@ -256,9 +255,6 @@ export class StateService {
256255
const { delta: lastStateDelta, prevStateIds = [] } =
257256
(await this.stateRepository.getStateById(stateId)) ?? {};
258257

259-
console.log('prevStateIds ->>>', prevStateIds);
260-
console.log('stateId ->>>', stateId);
261-
262258
this.logger.debug({ delta: lastStateDelta, prevStateIds }, 'last state');
263259

264260
if (!lastStateDelta) {

packages/room/src/state_resolution/definitions/definitions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ export async function getAuthChain(
106106
}
107107

108108
const authEvents = await event.getAuthorizationEvents(store);
109-
console.log('authEvents ->>>', authEvents);
110109
if (authEvents.length === 0) {
111110
eventIdToAuthChainMap.set(eventId, existingAuthChainPart);
112111
return existingAuthChainPart;
@@ -117,7 +116,6 @@ export async function getAuthChain(
117116
let newAuthChainPart = existingAuthChainPart.union(authEventIdsSet);
118117

119118
for (const authEvent of authEvents) {
120-
console.log('authEvent ->>>', authEvent);
121119
const nextAuthChainPart = await _getAuthChain(
122120
authEvent,
123121
newAuthChainPart,

0 commit comments

Comments
 (0)