ios: channels and chat relays ui (#6634)

This commit is contained in:
spaced4ndy
2026-03-05 09:13:24 +00:00
committed by GitHub
parent 567a89d49d
commit b97868d79f
80 changed files with 4170 additions and 971 deletions

View File

@@ -118,6 +118,7 @@ chatCommandsDocsData =
("APIListMembers", [], "Get group members.", ["CRGroupMembers", "CRChatCmdError"], [], Nothing, "/_members #" <> Param "groupId"),
("APINewGroup", [], "Create group.", ["CRGroupCreated", "CRChatCmdError"], [], Nothing, "/_group " <> Param "userId" <> OnOffParam "incognito" "incognito" (Just False) <> " " <> Json "groupProfile"),
("APINewPublicGroup", [], "Create public group.", ["CRPublicGroupCreated", "CRChatCmdError"], [], Just UNInteractive, "/_public group " <> Param "userId" <> OnOffParam "incognito" "incognito" (Just False) <> " " <> Join ',' "relayIds" <> " " <> Json "groupProfile"),
("APIGetGroupRelays", [], "Get group relays.", ["CRGroupRelays", "CRChatCmdError"], [], Nothing, "/_get relays #" <> Param "groupId"),
("APIUpdateGroupProfile", [], "Update group profile.", ["CRGroupUpdated", "CRChatCmdError"], [], Just UNBackground, "/_group_profile #" <> Param "groupId" <> " " <> Json "groupProfile")
]
),

View File

@@ -69,6 +69,7 @@ chatResponsesDocsData =
("CRGroupLinkDeleted", ""),
("CRGroupCreated", ""),
("CRPublicGroupCreated", ""),
("CRGroupRelays", ""),
("CRGroupMembers", ""),
("CRGroupUpdated", ""),
("CRGroupsList", "Groups"),

View File

@@ -2,6 +2,7 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedLists #-}
@@ -31,6 +32,8 @@ import Simplex.Chat.Messages.CIContent.Events
import Simplex.Chat.Protocol
import Simplex.Chat.Store.Profiles
import Simplex.Chat.Store.Shared
import Simplex.Chat.Operators
import Simplex.Messaging.Agent.Store.Entity (DBStored (..))
import Simplex.Chat.Types
import Simplex.Chat.Types.Preferences
import Simplex.Chat.Types.Shared
@@ -349,6 +352,7 @@ chatTypesDocsData =
(sti @UIThemeEntityOverrides, STRecord, "", [], "", ""),
(sti @UpdatedMessage, STRecord, "", [], "", ""),
(sti @User, STRecord, "", [], "", ""),
((sti @UserChatRelay) {typeName = "UserChatRelay"}, STRecord, "", [], "", ""),
(sti @UserContact, STRecord, "", [], "", ""),
(sti @UserContactLink, STRecord, "", [], "", ""),
(sti @UserContactRequest, STRecord, "", [], "", ""),
@@ -545,6 +549,7 @@ deriving instance Generic UIThemeEntityOverride
deriving instance Generic UIThemeEntityOverrides
deriving instance Generic UpdatedMessage
deriving instance Generic User
deriving instance Generic (UserChatRelay' 'DBStored)
deriving instance Generic UserContact
deriving instance Generic UserContactLink
deriving instance Generic UserContactRequest

View File

@@ -167,12 +167,14 @@ toTypeInfo tr =
_ -> TIType (simpleType tr)
simpleType tr' = primitiveToLower $ case tyConName (typeRepTyCon tr') of
"AgentUserId" -> ST TInt64 []
"DBEntityId'" -> ST TInt64 []
"Integer" -> ST TInt64 []
"Version" -> ST TInt []
"BoolDef" -> ST TBool []
"PQEncryption" -> ST TBool []
"PQSupport" -> ST TBool []
"ACreatedConnLink" -> ST "CreatedConnLink" []
"UserChatRelay'" -> ST "UserChatRelay" []
"CChatItem" -> ST "ChatItem" []
"FormatColor" -> ST "Color" []
"CustomData" -> ST "JSONObject" []