Merge branch 'master' into ep/smp-server-pages

This commit is contained in:
Evgeny Poberezkin
2026-04-07 14:35:17 +01:00
259 changed files with 24717 additions and 3435 deletions
+8
View File
@@ -117,6 +117,8 @@ chatCommandsDocsData =
("APILeaveGroup", [], "Leave group.", ["CRLeftMemberUser", "CRChatCmdError"], [], Just UNBackground, "/_leave #" <> Param "groupId"),
("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")
]
),
@@ -243,6 +245,7 @@ cliCommands =
"MemberRole",
"MuteUser",
"NewGroup",
"NewPublicGroup",
"QuitChat",
"ReactToMessage",
"RejectContact",
@@ -367,6 +370,7 @@ undocumentedCommands =
"APIGetUsageConditions",
"APIGetUserServers",
"APIGroupInfo",
"APIGetUpdatedGroupLinkData",
"APIGroupMemberInfo",
"APIGroupMemberQueueInfo",
"APIHideUser",
@@ -411,6 +415,7 @@ undocumentedCommands =
"APISwitchGroupMember",
"APISyncContactRatchet",
"APISyncGroupMemberRatchet",
"APITestChatRelay",
"APITestProtoServer",
"APIUnhideUser",
"APIUnmuteUser",
@@ -443,6 +448,7 @@ undocumentedCommands =
"GetChatItemTTL",
"GetRemoteFile",
"GetUserProtoServers",
"GetUserChatRelays",
"ListRemoteCtrls",
"ListRemoteHosts",
"ReconnectAllServers",
@@ -460,12 +466,14 @@ undocumentedCommands =
"SetServerOperators",
"SetTempFolder",
"SetUserProtoServers",
"SetUserChatRelays",
"SlowSQLQueries",
"StartRemoteHost",
"StopRemoteCtrl",
"StopRemoteHost",
"StoreRemoteFile",
"SwitchRemoteHost",
"TestChatRelay",
"TestProtoServer",
"TestStorageEncryption",
"VerifyRemoteCtrlSession"
+3 -1
View File
@@ -97,7 +97,9 @@ chatEventsDocsData =
[ ("CEvtConnectedToGroupMember", "Connected to another group member."),
("CEvtMemberAcceptedByOther", "Another group owner, admin or moderator accepted member to the group after review (\"knocking\")."),
("CEvtMemberBlockedForAll", "Another member blocked for all members."),
("CEvtGroupMemberUpdated", "Another group member profile updated.")
("CEvtGroupMemberUpdated", "Another group member profile updated."),
("CEvtGroupLinkDataUpdated", "Group link data updated."),
("CEvtGroupRelayUpdated", "Group relay member updated.")
]
),
( "File events",
+3
View File
@@ -68,6 +68,8 @@ chatResponsesDocsData =
("CRGroupLinkCreated", ""),
("CRGroupLinkDeleted", ""),
("CRGroupCreated", ""),
("CRPublicGroupCreated", ""),
("CRGroupRelays", ""),
("CRGroupMembers", ""),
("CRGroupUpdated", ""),
("CRGroupsList", "Groups"),
@@ -130,6 +132,7 @@ undocumentedResponses =
"CRChatItemInfo",
"CRChatItems",
"CRChatItemTTL",
"CRChatRelayTestResult",
"CRChats",
"CRConnectionsDiff",
"CRChatTags",
+30 -5
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
@@ -256,7 +259,7 @@ chatTypesDocsData =
(sti @FileError, STUnion, "FileErr", [], "", ""),
(sti @FileErrorType, STUnion, "", [], "", ""),
(sti @FileInvitation, STRecord, "", [], "", ""),
(sti @FileProtocol, (STEnum' $ consLower "FP"), "", [], "", ""),
(sti @FileProtocol, STEnum' (consLower "FP"), "", [], "", ""),
(sti @FileStatus, STEnum, "FS", [], "", ""),
(sti @FileTransferMeta, STRecord, "", [], "", ""),
(sti @Format, STUnion, "", ["Unknown"], "", ""),
@@ -269,21 +272,26 @@ chatTypesDocsData =
(sti @GroupFeature, STEnum, "GF", [], "", ""),
(sti @GroupFeatureEnabled, STEnum, "FE", [], "", ""),
(sti @GroupInfo, STRecord, "", [], "", ""),
(sti @GroupKeys, STRecord, "", [], "", ""),
(sti @GroupRootKey, STUnion, "GRK", [], "", ""),
(sti @GroupLink, STRecord, "", [], "", ""),
(sti @GroupLinkPlan, STUnion, "GLP", [], "", ""),
(sti @GroupMember, STRecord, "", [], "", ""),
(sti @GroupMemberAdmission, STRecord, "", [], "", ""),
(sti @GroupMemberCategory, (STEnum' $ dropPfxSfx "GC" "Member"), "", [], "", ""),
(sti @GroupMemberCategory, STEnum' (dropPfxSfx "GC" "Member"), "", [], "", ""),
(sti @GroupMemberRef, STRecord, "", [], "", ""),
(sti @GroupMemberRole, STEnum, "GR", [], "", ""),
(sti @GroupMemberRole, STEnum' (dropPfxSfx "GR" ""), "", ["GRUnknown"], "", ""),
(sti @GroupMemberSettings, STRecord, "", [], "", ""),
(sti @GroupMemberStatus, (STEnum' $ (\case "group_deleted" -> "deleted"; "intro_invited" -> "intro-inv"; s -> s) . consSep "GSMem" '_'), "", [], "", ""),
(sti @GroupMemberStatus, STEnum' ((\case "group_deleted" -> "deleted"; "intro_invited" -> "intro-inv"; s -> s) . consSep "GSMem" '_'), "", [], "", ""),
(sti @GroupPreference, STRecord, "", [], "", ""),
(sti @GroupPreferences, STRecord, "", [], "", ""),
(sti @GroupProfile, STRecord, "", [], "", ""),
(sti @GroupRelay, STRecord, "", [], "", ""),
(sti @GroupShortLinkData, STRecord, "", [], "", ""),
(sti @GroupShortLinkInfo, STRecord, "", [], "", ""),
(sti @GroupSummary, STRecord, "", [], "", ""),
(sti @GroupSupportChat, STRecord, "", [], "", ""),
(sti @GroupType, STEnum1, "GT", ["GTUnknown"], "", ""),
(sti @HandshakeError, STEnum, "", [], "", ""),
(sti @InlineFileMode, STEnum, "IFM", [], "", ""),
(sti @InvitationLinkPlan, STUnion, "ILP", [], "", ""),
@@ -300,6 +308,7 @@ chatTypesDocsData =
(sti @MsgFilter, STEnum, "MF", [], "", ""),
(sti @MsgReaction, STUnion, "MR", [], "", ""),
(sti @MsgReceiptStatus, STEnum, "MR", [], "", ""),
(sti @MsgSigStatus, STEnum, "MSS", [], "", ""),
(sti @NetworkError, STUnion, "NE", [], "", ""),
(sti @NewUser, STRecord, "", [], "", ""),
(sti @NoteFolder, STRecord, "", [], "", ""),
@@ -312,6 +321,8 @@ chatTypesDocsData =
(sti @Profile, STRecord, "", [], "", ""),
(sti @ProxyClientError, STUnion, "Proxy", [], "", ""),
(sti @ProxyError, STUnion, "", [], "", ""),
(sti @PublicGroupData, STRecord, "", [], "", ""),
(sti @PublicGroupProfile, STRecord, "", [], "", ""),
(sti @RatchetSyncState, STEnum, "RS", [], "", ""),
(sti @RCErrorType, STUnion, "RCE", [], "", ""),
(sti @RcvConnEvent, STUnion, "RCE", [], "", ""),
@@ -320,7 +331,9 @@ chatTypesDocsData =
(sti @RcvFileStatus, STUnion, "RFS", [], "", ""),
(sti @RcvFileTransfer, STRecord, "", [], "", ""),
(sti @RcvGroupEvent, STUnion, "RGE", [], "", ""),
(sti @ReportReason, (STEnum' $ dropPfxSfx "RR" ""), "", ["RRUnknown"], "", ""),
(sti @RelayProfile, STRecord, "", [], "", ""),
(sti @RelayStatus, STEnum, "RS", [], "", ""),
(sti @ReportReason, STEnum' (dropPfxSfx "RR" ""), "", ["RRUnknown"], "", ""),
(sti @RoleGroupPreference, STRecord, "", [], "", ""),
(sti @SecurityCode, STRecord, "", [], "", ""),
(sti @SimplePreference, STRecord, "", [], "", ""),
@@ -344,6 +357,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, "", [], "", ""),
@@ -456,6 +470,8 @@ deriving instance Generic GroupChatScopeInfo
deriving instance Generic GroupFeature
deriving instance Generic GroupFeatureEnabled
deriving instance Generic GroupInfo
deriving instance Generic GroupKeys
deriving instance Generic GroupRootKey
deriving instance Generic GroupLink
deriving instance Generic GroupLinkPlan
deriving instance Generic GroupMember
@@ -468,7 +484,10 @@ deriving instance Generic GroupMemberStatus
deriving instance Generic GroupPreference
deriving instance Generic GroupPreferences
deriving instance Generic GroupProfile
deriving instance Generic GroupRelay
deriving instance Generic GroupShortLinkData
deriving instance Generic GroupShortLinkInfo
deriving instance Generic GroupType
deriving instance Generic GroupSummary
deriving instance Generic GroupSupportChat
deriving instance Generic HandshakeError
@@ -493,6 +512,7 @@ deriving instance Generic MsgErrorType
deriving instance Generic MsgFilter
deriving instance Generic MsgReaction
deriving instance Generic MsgReceiptStatus
deriving instance Generic MsgSigStatus
deriving instance Generic NetworkError
deriving instance Generic NewUser
deriving instance Generic NoteFolder
@@ -505,6 +525,8 @@ deriving instance Generic PreparedGroup
deriving instance Generic Profile
deriving instance Generic ProxyClientError
deriving instance Generic ProxyError
deriving instance Generic PublicGroupData
deriving instance Generic PublicGroupProfile
deriving instance Generic RatchetSyncState
deriving instance Generic RCErrorType
deriving instance Generic RcvConnEvent
@@ -513,6 +535,8 @@ deriving instance Generic RcvFileDescr
deriving instance Generic RcvFileStatus
deriving instance Generic RcvFileTransfer
deriving instance Generic RcvGroupEvent
deriving instance Generic RelayProfile
deriving instance Generic RelayStatus
deriving instance Generic ReportReason
deriving instance Generic SecurityCode
deriving instance Generic SimplexLinkType
@@ -535,6 +559,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
+4 -3
View File
@@ -1,5 +1,4 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
@@ -8,9 +7,7 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wno-orphans #-}
@@ -170,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" []
@@ -210,6 +209,8 @@ toTypeInfo tr =
"MemberId",
"Text",
"MREmojiChar",
"PrivateKey",
"PublicKey",
"ProtocolServer",
"SbKey",
"SharedMsgId",