Skip to content
Snippets Groups Projects
Commit 317ebe1d authored by xaralis's avatar xaralis
Browse files

fix: bad encoding to hex

parent 3a6d8cd4
No related branches found
No related tags found
No related merge requests found
......@@ -49,12 +49,12 @@ function Worker() {
const buildKeepalivePayload = async () => {
const { user } = AuthStore.getRawState();
const payload = user && user.id ? user.id.toString() : "";
const signature = user.secret ? hmacSHA1(payload, user.secret) : null;
const signature = !!user.secret ? hmacSHA1(payload, user.secret) : null;
return {
event: "KEEPALIVE",
payload,
sig: hex.stringify(signature),
sig: signature ? hex.stringify(signature) : null,
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment