From ad55ff1f8024ac88b7948a6d88598dc331054ac5 Mon Sep 17 00:00:00 2001 From: rstular Date: Thu, 14 May 2020 11:57:37 +0200 Subject: Attempt 1 at fixing encryption --- js/messaging.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/js/messaging.js b/js/messaging.js index 60072f0..a5e5f6c 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -1,5 +1,8 @@ const API_ENDPOINT = "https://gimb.tk/test.php"; const DIRECTORY_URL = "/directory.json"; + +const ENCRYPTED_MESSAGE_REGEX = /(\S+?)/g; + // "Global" object for name directory var directory = null; @@ -249,8 +252,9 @@ async function deleteMsg(id) { } function displayMessage(id, data) { - if(data["telo"].substring(0, 21) == " - ${msgcontent} - ${sjcl.encrypt($("#msg-e2ee-pass-input").val(), $("#msg-body").val())} + ${sjcl.encrypt($("#msg-e2ee-pass-input").val(), msgcontent)} ` } -- cgit v1.2.3