forked from openprivacy/libricochet-go
Remove V3 Contact Request
This commit is contained in:
parent
b34fe84917
commit
90231b0be9
|
@ -2,7 +2,6 @@ package application
|
|||
|
||||
import (
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connectivity"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
|
@ -91,7 +90,7 @@ func (ra *RicochetApplication) Open(onionAddress string, requestMessage string)
|
|||
|
||||
och := connection.HandleOutboundConnection(rc)
|
||||
|
||||
known, err := och.ProcessAuthAsV3Client(ra.v3identity)
|
||||
_, err = och.ProcessAuthAsV3Client(ra.v3identity)
|
||||
|
||||
if err != nil {
|
||||
log.Errorf("There was an error authenticating the connection: %v", err)
|
||||
|
@ -100,20 +99,6 @@ func (ra *RicochetApplication) Open(onionAddress string, requestMessage string)
|
|||
rai := ra.aif.GetApplicationInstance(rc)
|
||||
go rc.Process(rai)
|
||||
|
||||
if !known {
|
||||
err := rc.Do(func() error {
|
||||
_, err := rc.RequestOpenChannel("im.ricochet.contact.request",
|
||||
&channels.ContactRequestChannel{
|
||||
Handler: new(AcceptAllContactHandler),
|
||||
Name: ra.name,
|
||||
Message: requestMessage,
|
||||
})
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
log.Errorf("could not contact %s", err)
|
||||
}
|
||||
}
|
||||
ra.HandleApplicationInstance(rai)
|
||||
return rai, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue