Fix message decoding

This commit is contained in:
Christoph Hagen 2022-05-01 13:46:54 +02:00
parent 457dc11945
commit 5df23a97c8

View File

@ -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 {