From 5df23a97c844731a6d4a36551e72de40f157ff69 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sun, 1 May 2022 13:46:54 +0200 Subject: [PATCH] Fix message decoding --- Sources/App/API/ServerMessage.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/App/API/ServerMessage.swift b/Sources/App/API/ServerMessage.swift index 9ee46f4..ce84f55 100644 --- a/Sources/App/API/ServerMessage.swift +++ b/Sources/App/API/ServerMessage.swift @@ -27,7 +27,7 @@ struct ServerMessage { return nil } self.authToken = Data(data.prefix(ServerMessage.authTokenSize)) - self.message = Message(decodeFrom: Data(data.dropFirst(ServerMessage.length))) + self.message = Message(decodeFrom: Data(data.dropFirst(ServerMessage.authTokenSize))) } var encoded: Data {