Remove V3 Contact Request

This commit is contained in:
Sarah Jamie Lewis 2019-01-08 11:05:01 -08:00
parent b34fe84917
commit 90231b0be9
1 changed files with 1 additions and 16 deletions

View File

@ -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
}