mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-07 15:23:11 +00:00
core: do not regenerate key when accepting connection to avoid invalidating invitation link on bad networks (#5018)
* core: prepare conn (plan)
* update
* group join
* comment
* comment
* wip
* Revert "wip"
This reverts commit 0849f43377.
* accept
* save contact_id, reuse contact
* refactor
* simplexmq
* set contactUsed
* support retrying join
* exclude prepared connections from API responses
* avoid race with events
* avoid race better
* fix UI
* update library
* tmp
* update
* display error details on ios cmd prohibited
* underscore instead of empty
* Update apps/ios/Shared/Model/SimpleXAPI.swift
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
* test
* update simplexmq
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
Co-authored-by: Diogo <diogofncunha@gmail.com>
This commit is contained in:
@@ -125,6 +125,17 @@ data ConnectionEntity
|
||||
|
||||
$(JQ.deriveJSON (sumTypeJSON fstToLower) ''ConnectionEntity)
|
||||
|
||||
connEntityInfo :: ConnectionEntity -> String
|
||||
connEntityInfo = \case
|
||||
RcvDirectMsgConnection c ct_ -> ctInfo ct_ <> ", status: " <> show (connStatus c)
|
||||
RcvGroupMsgConnection c g m -> mInfo g m <> ", status: " <> show (connStatus c)
|
||||
SndFileConnection c _ft -> "snd file, status: " <> show (connStatus c)
|
||||
RcvFileConnection c _ft -> "rcv file, status: " <> show (connStatus c)
|
||||
UserContactConnection c _uc -> "user address, status: " <> show (connStatus c)
|
||||
where
|
||||
ctInfo = maybe "connection" $ \Contact {contactId} -> "contact " <> show contactId
|
||||
mInfo GroupInfo {groupId} GroupMember {groupMemberId} = "group " <> show groupId <> ", member " <> show groupMemberId
|
||||
|
||||
updateEntityConnStatus :: ConnectionEntity -> ConnStatus -> ConnectionEntity
|
||||
updateEntityConnStatus connEntity connStatus = case connEntity of
|
||||
RcvDirectMsgConnection c ct_ -> RcvDirectMsgConnection (st c) ((\ct -> (ct :: Contact) {activeConn = Just $ st c}) <$> ct_)
|
||||
|
||||
Reference in New Issue
Block a user