diff --git a/node/src/client.js b/node/src/client.js index 7b04ae7..efaa17a 100644 --- a/node/src/client.js +++ b/node/src/client.js @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . import { Long } from "bson" + import { AuthApiClient, OAuthApiClient, @@ -22,10 +23,10 @@ import { KnownAuthStatusCode, util, } from "node-kakao" +/** @typedef {import("node-kakao").OAuthCredential} OAuthCredential */ + import chat from "node-kakao/chat" const { KnownChatType } = chat -/** @typedef {import("node-kakao").OAuthCredential} OAuthCredential */ -/** @typedef {import("./clientmanager.js").default} ClientManager} */ import { emitLines, promisify } from "./util.js" @@ -82,20 +83,21 @@ class UserClient { export default class PeerClient { /** - * @param {ClientManager} manager + * @param {import("./clientmanager.js").default} manager * @param {import("net").Socket} socket * @param {number} connID - * @param {Map} userClients */ constructor(manager, socket, connID) { this.manager = manager this.socket = socket this.connID = connID + this.stopped = false this.notificationID = 0 this.maxCommandID = 0 this.peerID = null + /** @type {Map} */ this.userClients = new Map() } @@ -444,6 +446,7 @@ export default class PeerClient { this.log("Ignoring old request", req.id) return } + this.log("Received request", req.id, "with command", req.command) this.maxCommandID = req.id let handler if (!this.peerID) {