create new conversation on unknown accept
This commit is contained in:
parent
e07b3e5259
commit
c3a830628a
|
@ -1169,6 +1169,13 @@ func (cp *cwtchPeer) eventHandler() {
|
|||
}
|
||||
}
|
||||
case event.PeerStateChange:
|
||||
handle := ev.Data[event.RemotePeer]
|
||||
if connections.ConnectionStateToType()[ev.Data[event.ConnectionState]] == connections.AUTHENTICATED {
|
||||
_, err := cp.FetchConversationInfo(handle)
|
||||
if err != nil {
|
||||
cp.NewContactConversation(handle, model.DefaultP2PAccessControl(), false)
|
||||
}
|
||||
}
|
||||
cp.mutex.Lock()
|
||||
cp.state[ev.Data[event.RemotePeer]] = connections.ConnectionStateToType()[ev.Data[event.ConnectionState]]
|
||||
cp.mutex.Unlock()
|
||||
|
|
Loading…
Reference in New Issue