From bd1c3d46c4b3b7996fe8800a0d62dda5f901daeb Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 17 Dec 2024 23:34:42 +1300 Subject: [PATCH] rename method --- src/js/FileTransferAPI.js | 2 +- src/js/FileTransferrer.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/FileTransferAPI.js b/src/js/FileTransferAPI.js index 1d22f96..8118f4a 100644 --- a/src/js/FileTransferAPI.js +++ b/src/js/FileTransferAPI.js @@ -36,7 +36,7 @@ class FileTransferAPI { } - static async sendFileTransferRequest(nodeId, fileTransferId, fileName, fileSize) { + static async offerFileTransfer(nodeId, fileTransferId, fileName, fileSize) { await this.sendFileTransferPacket(nodeId, { offerFileTransfer: { id: fileTransferId, diff --git a/src/js/FileTransferrer.js b/src/js/FileTransferrer.js index 7c8ec8d..71fe40f 100644 --- a/src/js/FileTransferrer.js +++ b/src/js/FileTransferrer.js @@ -48,11 +48,11 @@ class FileTransferrer { // add to file transfers list GlobalState.fileTransfers.push(fileTransfer); - // send file transfer request + // send file transfer offer for(var attempt = 1; attempt <= this.MAX_PACKET_ATTEMPTS; attempt++){ try { this.log(`offerFileTransfer attempt ${attempt}`); - await FileTransferAPI.sendFileTransferRequest(to, fileTransferId, fileName, fileSize); + await FileTransferAPI.offerFileTransfer(to, fileTransferId, fileName, fileSize); this.log(`offerFileTransfer attempt ${attempt} success`); return; } catch(e) {