From 6ccf97b5d016033f49dd604f96e916141a6b9087 Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Mon, 17 May 2021 18:15:09 -0500 Subject: [PATCH] getMessageById query should only select necessary field --- ts/sql/Server.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ts/sql/Server.ts b/ts/sql/Server.ts index 29e83da515..8829828440 100644 --- a/ts/sql/Server.ts +++ b/ts/sql/Server.ts @@ -3076,9 +3076,11 @@ async function removeMessages(ids: Array): Promise { async function getMessageById(id: string): Promise { const db = getInstance(); - const row = db.prepare('SELECT * FROM messages WHERE id = $id;').get({ - id, - }); + const row = db + .prepare('SELECT json FROM messages WHERE id = $id;') + .get({ + id, + }); if (!row) { return undefined;