forked from github/cinny
Remove unneeded logger.errors
This commit is contained in:
@@ -214,17 +214,6 @@ export class SmallWidget extends EventEmitter {
|
|||||||
this.feedEvent(ev);
|
this.feedEvent(ev);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
private onStateUpdate = (ev: MatrixEvent): void => {
|
|
||||||
if (this.messaging === null) return;
|
|
||||||
const raw = ev.getEffectiveEvent();
|
|
||||||
logger.error(raw);
|
|
||||||
this.messaging.feedEvent(raw as IRoomEvent).catch((e) => {
|
|
||||||
logger.error('Error sending state update to widget: ', e);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
private onToDeviceEvent = async (ev: MatrixEvent): Promise<void> => {
|
private onToDeviceEvent = async (ev: MatrixEvent): Promise<void> => {
|
||||||
await this.client.decryptEventIfNeeded(ev);
|
await this.client.decryptEventIfNeeded(ev);
|
||||||
if (ev.isDecryptionFailure()) return;
|
if (ev.isDecryptionFailure()) return;
|
||||||
|
|||||||
@@ -301,16 +301,11 @@ export function CallProvider({ children }: CallProviderProps) {
|
|||||||
);
|
);
|
||||||
return Promise.reject(new Error('Mismatched active call clientWidgetApi'));
|
return Promise.reject(new Error('Mismatched active call clientWidgetApi'));
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
logger.debug(
|
logger.debug(
|
||||||
`CallContext: Sending action '${action}' via active clientWidgetApi (room: ${activeClientWidgetApiRoomId}) with data:`,
|
`CallContext: Sending action '${action}' via active clientWidgetApi (room: ${activeClientWidgetApiRoomId}) with data:`,
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
await activeClientWidgetApi.transport.send(action as WidgetApiAction, data);
|
await activeClientWidgetApi.transport.send(action as WidgetApiAction, data);
|
||||||
} catch (error) {
|
|
||||||
logger.error(`CallContext: Error sending action '${action}':`, error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
[activeClientWidgetApi, activeCallRoomId, activeClientWidgetApiRoomId]
|
[activeClientWidgetApi, activeCallRoomId, activeClientWidgetApiRoomId]
|
||||||
);
|
);
|
||||||
@@ -326,7 +321,6 @@ export function CallProvider({ children }: CallProviderProps) {
|
|||||||
});
|
});
|
||||||
logger.debug(`CallContext: Successfully sent audio toggle action.`);
|
logger.debug(`CallContext: Successfully sent audio toggle action.`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`CallContext: Failed to send audio toggle action. Reverting state.`, error);
|
|
||||||
setIsAudioEnabledState(!newState);
|
setIsAudioEnabledState(!newState);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
@@ -343,7 +337,6 @@ export function CallProvider({ children }: CallProviderProps) {
|
|||||||
});
|
});
|
||||||
logger.debug(`CallContext: Successfully sent video toggle action.`);
|
logger.debug(`CallContext: Successfully sent video toggle action.`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`CallContext: Failed to send video toggle action. Reverting state.`, error);
|
|
||||||
setIsVideoEnabledState(!newState);
|
setIsVideoEnabledState(!newState);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
|
|||||||
const smallWidget = new SmallWidget(app);
|
const smallWidget = new SmallWidget(app);
|
||||||
smallWidgetRef.current = smallWidget;
|
smallWidgetRef.current = smallWidget;
|
||||||
|
|
||||||
try {
|
|
||||||
const widgetApiInstance = smallWidget.startMessaging(iframeElement);
|
const widgetApiInstance = smallWidget.startMessaging(iframeElement);
|
||||||
widgetApiRef.current = widgetApiInstance;
|
widgetApiRef.current = widgetApiInstance;
|
||||||
if (skipLobby) {
|
if (skipLobby) {
|
||||||
@@ -128,12 +127,7 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
|
|||||||
widgetApiInstance.once('ready', () => {
|
widgetApiInstance.once('ready', () => {
|
||||||
logger.info(`PersistentCallContainer: Widget for ${roomIdToSet} is ready.`);
|
logger.info(`PersistentCallContainer: Widget for ${roomIdToSet} is ready.`);
|
||||||
});
|
});
|
||||||
} catch (error) {
|
|
||||||
logger.error(
|
|
||||||
`PersistentCallContainer: Error initializing widget messaging for ${roomIdToSet}:`,
|
|
||||||
error
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -572,7 +572,6 @@ export function Space() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
logger.error('Unknown item type in virtualized list:', item);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user