Globally replace all console.logs via codemod (#6827)
This commit replaces all the `console.log` to `logger.log` via an automated script. Related: vector-im/element-web#18425
This commit is contained in:
parent
3a548d4c9c
commit
2d1d42b90e
81 changed files with 396 additions and 258 deletions
|
@ -35,6 +35,8 @@ import { isLoggedIn } from './components/structures/MatrixChat';
|
|||
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||
import { ActionPayload } from "./dispatcher/payloads";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
const KEY_BACKUP_POLL_INTERVAL = 5 * 60 * 1000;
|
||||
|
||||
export default class DeviceListener {
|
||||
|
@ -100,7 +102,7 @@ export default class DeviceListener {
|
|||
* @param {String[]} deviceIds List of device IDs to dismiss notifications for
|
||||
*/
|
||||
async dismissUnverifiedSessions(deviceIds: Iterable<string>) {
|
||||
console.log("Dismissing unverified sessions: " + Array.from(deviceIds).join(','));
|
||||
logger.log("Dismissing unverified sessions: " + Array.from(deviceIds).join(','));
|
||||
for (const d of deviceIds) {
|
||||
this.dismissed.add(d);
|
||||
}
|
||||
|
@ -211,7 +213,7 @@ export default class DeviceListener {
|
|||
private async recheck() {
|
||||
const cli = MatrixClientPeg.get();
|
||||
|
||||
if (!await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing")) return;
|
||||
if (!(await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"))) return;
|
||||
|
||||
if (!cli.isCryptoEnabled()) return;
|
||||
// don't recheck until the initial sync is complete: lots of account data events will fire
|
||||
|
@ -286,8 +288,8 @@ export default class DeviceListener {
|
|||
}
|
||||
}
|
||||
|
||||
console.log("Old unverified sessions: " + Array.from(oldUnverifiedDeviceIds).join(','));
|
||||
console.log("New unverified sessions: " + Array.from(newUnverifiedDeviceIds).join(','));
|
||||
logger.log("Old unverified sessions: " + Array.from(oldUnverifiedDeviceIds).join(','));
|
||||
logger.log("New unverified sessions: " + Array.from(newUnverifiedDeviceIds).join(','));
|
||||
|
||||
// Display or hide the batch toast for old unverified sessions
|
||||
if (oldUnverifiedDeviceIds.size > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue