mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-18 09:37:34 +00:00
core: filter all messages with links in text when link content filter is used (#6591)
* core: change msg_content_tag stored as blob to text * track if items have links and use has_link when searching for links (MCLink_ MsgContentTag is passed) * fix test (broken in master) * merge migrations, update api and schema * minor fixes * tests * update plans * update migrations
This commit is contained in:
@@ -440,7 +440,8 @@ CREATE TABLE chat_items(
|
||||
user_mention INTEGER NOT NULL DEFAULT 0,
|
||||
group_scope_tag TEXT,
|
||||
group_scope_group_member_id INTEGER REFERENCES group_members(group_member_id) ON DELETE CASCADE,
|
||||
show_group_as_sender INTEGER NOT NULL DEFAULT 0
|
||||
show_group_as_sender INTEGER NOT NULL DEFAULT 0,
|
||||
has_link INTEGER NOT NULL DEFAULT 0
|
||||
) STRICT;
|
||||
CREATE TABLE sqlite_sequence(name,seq);
|
||||
CREATE TABLE chat_item_messages(
|
||||
@@ -1199,6 +1200,24 @@ CREATE INDEX idx_chat_items_note_folder_msg_content_tag_created_at ON chat_items
|
||||
msg_content_tag,
|
||||
created_at
|
||||
);
|
||||
CREATE INDEX idx_chat_items_groups_has_link_item_ts ON chat_items(
|
||||
user_id,
|
||||
group_id,
|
||||
has_link,
|
||||
item_ts
|
||||
);
|
||||
CREATE INDEX idx_chat_items_contacts_has_link_created_at ON chat_items(
|
||||
user_id,
|
||||
contact_id,
|
||||
has_link,
|
||||
created_at
|
||||
);
|
||||
CREATE INDEX idx_chat_items_note_folder_has_link_created_at ON chat_items(
|
||||
user_id,
|
||||
note_folder_id,
|
||||
has_link,
|
||||
created_at
|
||||
);
|
||||
CREATE TRIGGER on_group_members_insert_update_summary
|
||||
AFTER INSERT ON group_members
|
||||
FOR EACH ROW
|
||||
|
||||
Reference in New Issue
Block a user