mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 08:33:09 +00:00
core: include channel link and name when forwarding messages (#7409)
* core: include channel link and name when forwarding messages * wip * simplify * add member ID * refactor * refactor * refactor * update api types * store forward source group type * rename * api types * simpler layout * layout, translations * refactor ios * public * simpler * refactor kotlin * padding * padding --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
1 parent
1196d362ee
commit
17cdef1692
65 files changed
+806
-162
No files matched your search
@@ -170,6 +170,7 @@ import Simplex.Chat.Store.SQLite.Migrations.M20260716_signed_history
|
||||
import Simplex.Chat.Store.SQLite.Migrations.M20260720_server_roles
|
||||
import Simplex.Chat.Store.SQLite.Migrations.M20260723_contact_request_rejection
|
||||
import Simplex.Chat.Store.SQLite.Migrations.M20260813_auto_accept_group_invitations
|
||||
import Simplex.Chat.Store.SQLite.Migrations.M20260822_forward_link
|
||||
import Simplex.Messaging.Agent.Store.Shared (Migration (..))
|
||||
|
||||
schemaMigrations :: [(String, Query, Maybe Query)]
|
||||
@@ -339,7 +340,8 @@ schemaMigrations =
|
||||
("20260716_signed_history", m20260716_signed_history, Just down_m20260716_signed_history),
|
||||
("20260720_server_roles", m20260720_server_roles, Just down_m20260720_server_roles),
|
||||
("20260723_contact_request_rejection", m20260723_contact_request_rejection, Just down_m20260723_contact_request_rejection),
|
||||
("20260813_auto_accept_group_invitations", m20260813_auto_accept_group_invitations, Just down_m20260813_auto_accept_group_invitations)
|
||||
("20260813_auto_accept_group_invitations", m20260813_auto_accept_group_invitations, Just down_m20260813_auto_accept_group_invitations),
|
||||
("20260822_forward_link", m20260822_forward_link, Just down_m20260822_forward_link)
|
||||
]
|
||||
|
||||
-- | The list of migrations in ascending order by date
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.SQLite.Migrations.M20260822_forward_link where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
m20260822_forward_link :: Query
|
||||
m20260822_forward_link =
|
||||
[sql|
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_group_type TEXT;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_group_link BLOB;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_public_group_id BLOB;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_member_id BLOB;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_shared_msg_id BLOB;
|
||||
|]
|
||||
|
||||
down_m20260822_forward_link :: Query
|
||||
down_m20260822_forward_link =
|
||||
[sql|
|
||||
ALTER TABLE chat_items DROP COLUMN fwd_from_group_type;
|
||||
ALTER TABLE chat_items DROP COLUMN fwd_from_group_link;
|
||||
ALTER TABLE chat_items DROP COLUMN fwd_from_public_group_id;
|
||||
ALTER TABLE chat_items DROP COLUMN fwd_from_member_id;
|
||||
ALTER TABLE chat_items DROP COLUMN fwd_from_shared_msg_id;
|
||||
|]
|
||||
@@ -514,7 +514,12 @@ CREATE TABLE chat_items(
|
||||
item_msg_body BLOB,
|
||||
item_chat_binding TEXT,
|
||||
item_signatures BLOB,
|
||||
item_signed_by_group_member_id INTEGER REFERENCES group_members ON DELETE SET NULL
|
||||
item_signed_by_group_member_id INTEGER REFERENCES group_members ON DELETE SET NULL,
|
||||
fwd_from_group_type TEXT,
|
||||
fwd_from_group_link BLOB,
|
||||
fwd_from_public_group_id BLOB,
|
||||
fwd_from_member_id BLOB,
|
||||
fwd_from_shared_msg_id BLOB
|
||||
) STRICT;
|
||||
CREATE TABLE sqlite_sequence(name,seq);
|
||||
CREATE TABLE chat_item_messages(
|
||||
|
||||
Reference in new issue
Block a user