Merge branch 'master' into chat-relays

This commit is contained in:
spaced4ndy
2026-01-15 13:52:08 +04:00
104 changed files with 7212 additions and 40 deletions

View File

@@ -136,6 +136,14 @@ chatEventsDocsData =
],
[]
),
( "Network connection events",
"",
[ ("CEvtHostConnected", "Messaging or file server connected"),
("CEvtHostDisconnected", "Messaging or file server disconnected"),
("CEvtSubscriptionStatus", "Messaging subscription status changed")
],
[]
),
( "Error events",
"Bots may log these events for debugging. \
\There will be many error events - this does NOT indicate a malfunction - \
@@ -178,9 +186,6 @@ undocumentedEvents =
"CEvtCustomChatEvent",
"CEvtGroupMemberRatchetSync",
"CEvtGroupMemberSwitch",
"CEvtHostConnected",
"CEvtHostDisconnected",
"CEvtSubscriptionStatus",
"CEvtNewRemoteHost",
"CEvtNoMemberContactCreating",
"CEvtNtfMessage",

View File

@@ -176,6 +176,7 @@ ciQuoteType =
updateRecord (RecordTypeInfo name fields) = RecordTypeInfo name $ map optChatDir fields
in st {recordTypes = map updateRecord records} -- need to map even though there is one constructor in this type
-- type info, JSON encoding, constructor prefix, removed constructors, string encoding for commands, description
chatTypesDocsData :: [(SumTypeInfo, SumTypeJsonEncoding, String, [ConsName], Expr, Text)]
chatTypesDocsData =
[ ((sti @(Chat 'CTDirect)) {typeName = "AChat"}, STRecord, "", [], "", ""),
@@ -332,6 +333,7 @@ chatTypesDocsData =
(sti @SndGroupEvent, STUnion, "SGE", [], "", ""),
(sti @SrvError, STUnion, "SrvErr", [], "", ""),
(sti @StoreError, STUnion, "SE", [], "", ""),
(sti @SubscriptionStatus, STUnion, "SS", [], "", ""),
(sti @SwitchPhase, STEnum, "SP", [], "", ""),
(sti @TimedMessagesGroupPreference, STRecord, "", [], "", ""),
(sti @TimedMessagesPreference, STRecord, "", [], "", ""),
@@ -522,6 +524,7 @@ deriving instance Generic SndFileTransfer
deriving instance Generic SndGroupEvent
deriving instance Generic SrvError
deriving instance Generic StoreError
deriving instance Generic SubscriptionStatus
deriving instance Generic SwitchPhase
deriving instance Generic TimedMessagesGroupPreference
deriving instance Generic TimedMessagesPreference

View File

@@ -194,6 +194,7 @@ toTypeInfo tr =
primitiveToLower st@(ST t ps) = let t' = fstToLower t in if t' `elem` primitiveTypes then ST t' ps else st
stringTypes =
[ "AConnectionLink",
"AProtocolType",
"AgentConnId",
"AgentInvId",
"AgentRcvFileId",
@@ -212,6 +213,7 @@ toTypeInfo tr =
"ProtocolServer",
"SbKey",
"SharedMsgId",
"TransportHost",
"UIColor",
"UserPwd",
"XContactId"