mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-05 10:12:59 +00:00
core: check known relays before file reception, support user approval of unknown relays (#4043)
* core: check known relays before file reception, support user approval of unknown relays * comment * reset on not approved agent error * add privacyAskToApproveRelays to AppSettings * filter distinct servers * update simplexmq * remember user_approved_relays * refactor * rename * update simplexmq --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Migrations.M20240515_rcv_files_user_approved_relays where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
m20240515_rcv_files_user_approved_relays :: Query
|
||||
m20240515_rcv_files_user_approved_relays =
|
||||
[sql|
|
||||
ALTER TABLE rcv_files ADD COLUMN user_approved_relays INTEGER NOT NULL DEFAULT 0;
|
||||
|]
|
||||
|
||||
down_m20240515_rcv_files_user_approved_relays :: Query
|
||||
down_m20240515_rcv_files_user_approved_relays =
|
||||
[sql|
|
||||
ALTER TABLE rcv_files DROP COLUMN user_approved_relays;
|
||||
|]
|
||||
@@ -229,7 +229,8 @@ CREATE TABLE rcv_files(
|
||||
REFERENCES xftp_file_descriptions ON DELETE SET NULL,
|
||||
agent_rcv_file_id BLOB NULL,
|
||||
agent_rcv_file_deleted INTEGER DEFAULT 0 CHECK(agent_rcv_file_deleted NOT NULL),
|
||||
to_receive INTEGER
|
||||
to_receive INTEGER,
|
||||
user_approved_relays INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
CREATE TABLE snd_file_chunks(
|
||||
file_id INTEGER NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user