types, notes

This commit is contained in:
spaced4ndy
2025-10-20 17:17:54 +04:00
parent 961ca8bccf
commit 7651ec4447
3 changed files with 72 additions and 3 deletions

View File

@@ -329,7 +329,7 @@ data ChatMsgEvent (e :: MsgEncoding) where
XGrpLinkMem :: Profile -> ChatMsgEvent 'Json
XGrpLinkAcpt :: GroupAcceptance -> GroupMemberRole -> MemberId -> ChatMsgEvent 'Json
XGrpRelayInv :: GroupRelayInvitation -> ChatMsgEvent 'Json
XGrpRelayAcpt :: ConnLinkContact -> ChatMsgEvent 'Json -- TBC short/long/any
XGrpRelayAcpt :: ConnLinkContact -> ChatMsgEvent 'Json -- TODO [chat relays] TBC short/long/any
XGrpRelayReady :: ChatMsgEvent 'Json
XGrpMemNew :: MemberInfo -> Maybe MsgScope -> ChatMsgEvent 'Json
XGrpMemIntro :: MemberInfo -> Maybe MemberRestrictions -> ChatMsgEvent 'Json
@@ -1223,7 +1223,13 @@ data ContactShortLinkData = ContactShortLinkData
deriving (Show)
data GroupShortLinkData = GroupShortLinkData
{ groupProfile :: GroupProfile
{ groupProfile :: GroupProfile,
chatRelays :: [ChatRelayInfo]
}
deriving (Show)
data ChatRelayInfo = ChatRelayInfo
{ relayLink :: ConnLinkContact
}
deriving (Show)

View File

@@ -118,7 +118,7 @@ instance ToField AgentUserId where toField (AgentUserId uId) = toField uId
aUserId :: User -> UserId
aUserId User {agentUserId = AgentUserId uId} = uId
-- TODO [chat relay] filter out chat relay users where necessary (e.g. loading list of users for UI)
-- TODO [chat relays] filter out chat relay users where necessary (e.g. loading list of users for UI)
data User = User
{ userId :: UserId,
agentUserId :: AgentUserId,