This commit is contained in:
spaced4ndy
2025-10-23 13:09:53 +04:00
parent 11b7d6f69f
commit 88e8aa3972
2 changed files with 4 additions and 24 deletions
@@ -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|
+2 -23
View File
@@ -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