From 88e8aa3972cccbb52d7213910db2db1437f0bffa Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:09:53 +0400 Subject: [PATCH] update --- .../Migrations/M20251018_chat_relays.hs | 3 ++- src/Simplex/Chat/Types.hs | 25 ++----------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20251018_chat_relays.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20251018_chat_relays.hs index 51fbcb0289..d9888cc687 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20251018_chat_relays.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20251018_chat_relays.hs @@ -15,8 +15,9 @@ import Database.SQLite.Simple.QQ (sql) -- - group_members.group_relay_id - associates group_members record with a group_relays record for a group owner; -- receiving event to member connection, owner can match it to the relay -- - TBC also inverse link from group_relays to group_members? (group_relays.group_member_id) --- - groups.relay_own_status - indicates for a relay client that it is chat relay for the group (GroupRelayOwnStatus) +-- - groups.relay_own_status - indicates for a relay client that it is chat relay for the group (GroupRelayStatus) -- - connections.group_member_id_messaging - secondary connection for a group member in relayed group +-- TODO link between group_relays and chat_relays m20251018_chat_relays :: Query m20251018_chat_relays = [sql| diff --git a/src/Simplex/Chat/Types.hs b/src/Simplex/Chat/Types.hs index 9131a28443..8fbe2fdcc4 100644 --- a/src/Simplex/Chat/Types.hs +++ b/src/Simplex/Chat/Types.hs @@ -468,7 +468,7 @@ data GroupInfo = GroupInfo groupSummary :: GroupSummary, membersRequireAttention :: Int, viaGroupLinkUri :: Maybe ConnReqContact, - relayOwnStatus :: Maybe GroupRelayOwnStatus + relayOwnStatus :: Maybe GroupRelayStatus } deriving (Eq, Show) @@ -974,33 +974,12 @@ data GroupRelay = GroupRelay } deriving (Eq, Show) --- -- Status tracked by owner per relay --- data GroupRelayStatus --- = GRSNew --- | GRSInvited --- | GRSAccepted --- | GRSAdded --- | GRSNotified --- | GRSConfirmed --- deriving (Eq, Show) - --- -- Own status tracked by relay in a group --- data GroupRelayOwnStatus --- = GROSInvited --- | GROSLinkCreated --- | GROSAccepted --- | GROSNotified --- | GROSConfirmed - --- TODO [chat relays] single type for statuses both on owner and relay side? data GroupRelayStatus = GRSNew -- only for owner | GRSInvited - | GRSVerified -- only for relay - | GRSLinkCreated -- only for relay | GRSAccepted | GRSAdded -- only for owner - | GRSConfirmed + | GRSActive deriving (Eq, Show) data GroupSupportChat = GroupSupportChat