From 7c269422642d15736d66518c9eb2d2664b6a2f38 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 3 Dec 2017 22:52:09 +0200 Subject: [PATCH] Remove some debug messages and add todo --- src/app.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/app.js b/src/app.js index 303b66ef..bb97a14e 100644 --- a/src/app.js +++ b/src/app.js @@ -358,10 +358,8 @@ class MautrixTelegram { * @returns {MatrixUser} The MatrixUser object. */ async getMatrixUserByTelegramID(id) { - console.log("Searching for Matrix user by Telegram ID", id) let user = this.matrixUsersByTelegramID.get(id) if (user) { - console.log("Found in cache", user.userID) return user } @@ -369,7 +367,6 @@ class MautrixTelegram { // FIXME this should be made useless by making sure we always add to the second map when appropriate for (const [_, userByMXID] of this.matrixUsersByID) { if (userByMXID.telegramUserID === id) { - console.log("Found in MXID cache", userByMXID.userID) this.matrixUsersByTelegramID.set(id, userByMXID) return userByMXID } @@ -382,15 +379,12 @@ class MautrixTelegram { // Handle possible db query race conditions if (this.matrixUsersByTelegramID.has(id)) { - console.log("Found in cache after race", user.userID) return this.matrixUsersByTelegramID.get(id) } if (entries.length) { - console.log("Found in db", user.userID) user = MatrixUser.fromEntry(this, entries[0]) } else { - console.log("Not found :(") return undefined } this.matrixUsersByID.set(user.userID, user) @@ -495,6 +489,7 @@ class MautrixTelegram { } async handlePart(sender, evt) { + // TODO handle kicking real Matrix users who have logged in with Telegram? const capture = this.usernameRegex.exec(evt.state_key) if (!capture) { return