mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-29 00:18:43 +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:
co-authored by
Evgeny @ SimpleX Chat
parent
1196d362ee
commit
17cdef1692
@@ -47,6 +47,7 @@ import Simplex.Chat.Store.Postgres.Migrations.M20260716_signed_history
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20260720_server_roles
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20260723_contact_request_rejection
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20260813_auto_accept_group_invitations
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20260822_forward_link
|
||||
import Simplex.Messaging.Agent.Store.Shared (Migration (..))
|
||||
|
||||
schemaMigrations :: [(String, Text, Maybe Text)]
|
||||
@@ -93,7 +94,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,27 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20260822_forward_link where
|
||||
|
||||
import Data.Text (Text)
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20260822_forward_link :: Text
|
||||
m20260822_forward_link =
|
||||
[r|
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_group_type TEXT;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_group_link BYTEA;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_public_group_id BYTEA;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_member_id BYTEA;
|
||||
ALTER TABLE chat_items ADD COLUMN fwd_from_shared_msg_id BYTEA;
|
||||
|]
|
||||
|
||||
down_m20260822_forward_link :: Text
|
||||
down_m20260822_forward_link =
|
||||
[r|
|
||||
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;
|
||||
|]
|
||||
@@ -349,7 +349,12 @@ CREATE TABLE test_chat_schema.chat_items (
|
||||
item_msg_body bytea,
|
||||
item_chat_binding text,
|
||||
item_signatures bytea,
|
||||
item_signed_by_group_member_id bigint
|
||||
item_signed_by_group_member_id bigint,
|
||||
fwd_from_group_type text,
|
||||
fwd_from_group_link bytea,
|
||||
fwd_from_public_group_id bytea,
|
||||
fwd_from_member_id bytea,
|
||||
fwd_from_shared_msg_id bytea
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user