From 3340d10c9be6019964b561f94517eb9a765ce7b5 Mon Sep 17 00:00:00 2001 From: Greg Fodor <gfodor@gmail.com> Date: Sun, 6 May 2018 21:10:22 -0700 Subject: [PATCH] Don't send full URL --- src/utils/xfer-channel.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/utils/xfer-channel.js b/src/utils/xfer-channel.js index 5c05514e0..1b282e1fa 100644 --- a/src/utils/xfer-channel.js +++ b/src/utils/xfer-channel.js @@ -29,7 +29,7 @@ export default class XferChannel { const channel = this.socket.channel(`xfer:${code}`, { timeout: 10000 }); const cancel = () => channel.leave(); - channel.on("expired", () => finished("expired")); + channel.on("xfer_expired", () => finished("expired")); channel.on("presence_state", state => { if (Object.keys(state).length > 0) { @@ -43,12 +43,9 @@ export default class XferChannel { channel.on("xfer_request", () => { if (readyToSend) { - const payload = { - location: [location.protocol, "//", location.host, location.pathname].join("") - }; + const payload = { path: location.pathname }; - // Copy profile data to xfer'ed device, and apply it on the other side - // if hasChangedName is false. + // Copy profile data to xfer'ed device if it's been set. if (this.store.state.activity.hasChangedName) { payload.profile = { ...this.store.state.profile }; } -- GitLab