core, android, desktop, ios: drop comments added with this change

This commit is contained in:
Narasimha-sc
2026-08-20 15:37:29 +00:00
parent 1462b8e012
commit cb4d5e0a3b
7 changed files with 1 additions and 14 deletions
-2
View File
@@ -383,8 +383,6 @@ final class ChatModel: ObservableObject {
// list of chat "previews"
@Published private(set) var chats: [Chat] = []
@Published var deletedChats: Set<String> = []
// ids of contact requests being accepted and of groups being joined,
// to not offer accepting the same invitation from another view
@Published var acceptingContactRequests: Set<Int64> = []
@Published var joiningGroups: Set<Int64> = []
// current chat
@@ -122,8 +122,7 @@ object ChatModel {
val incompleteInitializedDbRemoved = mutableStateOf(false)
// map of connections network statuses, key is agent connection id
val switchingUsersAndHosts = mutableStateOf(false)
// ids of contact requests being accepted and of groups being joined,
// to not offer accepting the same invitation from another view
// ids of contact requests being accepted, to not offer accepting the same request from another view
val acceptingContactRequests = mutableStateListOf<Long>()
val joiningGroups = mutableStateListOf<Long>()
-3
View File
@@ -3771,9 +3771,6 @@ processChatCommand cxt nm = \case
Nothing -> connect' groupLinkId Nothing (Just $ Just gInfo)
Just conn@Connection {connStatus, xContactId} -> case connStatus of
ConnPrepared -> joinPreparedConn' xContactId conn (Just $ Just gInfo)
-- the connection is only advanced past ConnPrepared once the join succeeded (see joinContact),
-- so retrying a join that failed reuses it above, and reaching here means it already joined -
-- connecting again would create a second connection for the same member.
_ -> throwCmdError "group is already being joined"
Nothing ->
withFastStore' (\db -> getConnReqContactXContactId db cxt user cReqHash1 cReqHash2) >>= \case
-2
View File
@@ -921,8 +921,6 @@ acceptContactRequest nm user@User {userId} UserContactRequest {agentInvitationId
dm <- encodeConnInfoPQ pqSup' chatV $ XInfo profileToSend
sqSecured <-
withAgent (\a -> acceptContact a nm (aUserId user) (aConnId conn) True invId dm pqSup' subMode)
-- the agent marks the invitation accepted only once joining succeeded (see acceptContact'),
-- so not finding it is what tells an accepted request from an accept that failed and can be retried
`catchAllErrors` \case
ChatErrorAgent {agentError = CMD PROHIBITED _} -> throwCmdError "contact request already accepted"
e -> throwError e
-2
View File
@@ -3505,8 +3505,6 @@ createNewUnknownGroupMember db cxt user@User {userId, userContactId} GroupInfo {
where
VersionRange minV maxV = vr cxt
-- Re-use owner member record on retry: owners are created before the relay loop,
-- which is what fails when the network does (see getCreateRelayForMember)
getCreateLinkOwnerMember :: DB.Connection -> StoreCxt -> User -> GroupInfo -> Maybe ContactId -> MemberId -> C.PublicKeyEd25519 -> ExceptT StoreError IO GroupMember
getCreateLinkOwnerMember db cxt user gInfo contactId_ memberId ownerKey =
liftIO (runExceptT $ getGroupMemberByMemberId db cxt user gInfo memberId) >>= \case
-2
View File
@@ -8908,8 +8908,6 @@ testChannelConnectTwice ps =
withNewTestChat ps "cath" cathProfile $ \cath -> do
(shortLink, fullLink) <- prepareChannel1Relay "team" alice bob
memberJoinChannel "team" [bob] [alice] shortLink fullLink cath
-- connecting again reuses the owner members the first connection created,
-- and is rejected before it can create a second connection to the relay
cath ##> "/_connect group #1"
cath <## "bad chat command: group is already being joined"
alice #> "#team hi"
-1
View File
@@ -3783,7 +3783,6 @@ testShortLinkPrepareGroupConnectTwice = testChat3 aliceProfile bobProfile cathPr
cath <## "#team: alice added bob (Bob) to the group (connecting...)"
cath <## "#team: new member bob is connected"
]
-- connecting again is rejected before it can create a second connection to the host member
bob ##> "/_connect group #1"
bob <## "bad chat command: group is already being joined"
alice #> "#team 1"