summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAmolith2019-10-03 08:39:51 -0400
committerAmolith2019-10-03 08:39:51 -0400
commite6eab33e2d8cd10d0cd9d2bc9ec35e65ca002849 (patch)
tree5603932e212f88a204069366268c8bbc0486725f /lib
parent7182fecf5b81b9a64d61f6d3030155d3afa7b025 (diff)
remove legacy code to solve #58
Signed-off-by: Amolith <amolith@nixnet.xyz>
Diffstat (limited to 'lib')
-rw-r--r--lib/realtime.js10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index d85d728e..5dea47cc 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -277,16 +277,6 @@ function extractNoteIdFromSocket (socket) {
}
if (socket.handshake.query && socket.handshake.query.noteId) {
return socket.handshake.query.noteId
- } else if (socket.handshake.headers) {
- // this part is only for backward compatibility only; current code
- // should be using noteId query parameter instead.
- var referer = socket.handshake.headers.referer
- if (!referer) {
- return false
- }
- var hostUrl = url.URL.parse(referer)
- var noteId = config.urlPath ? hostUrl.pathname.slice(config.urlPath.length + 1, hostUrl.pathname.length).split('/')[1] : hostUrl.pathname.split('/')[1]
- return noteId
} else {
return false
}