diff --git a/auth/request.go b/auth/request.go index 8fd4aaac2ca098b37654ebcbcb09e2b9435ce04f..d37385815b55d2f6b1e87fabc5e1f167bb704360 100644 --- a/auth/request.go +++ b/auth/request.go @@ -31,11 +31,11 @@ import ( const terminator = ";" +// Error constant strings. Any changes to these should go over usages of the +// affected messages in other applications (if applicable) const ( // ErrChannelExists is a message returned in state.Request when an // authenticated channel exists between the partner and me. - // Note that modifications to this should go over usages of this message - // in other packages (if applicable). ErrChannelExists = "Authenticated channel already established with partner" ) diff --git a/connect/connect.go b/connect/connect.go index f2cd63c90456697ea347e48178ea8882ee6e17d3..f6aace42dcd2d3f5170fd4cc4ef7fd8c105ca1c0 100644 --- a/connect/connect.go +++ b/connect/connect.go @@ -8,7 +8,6 @@ package connect import ( "io" - "strings" "sync/atomic" "time" @@ -96,16 +95,6 @@ func Connect(recipient contact.Contact, messenger *xxdk.E2e, // Perform the auth request _, err := messenger.GetAuth().Request(recipient, nil) if err != nil { - // Return connection if a partnership already exists - if strings.Contains(err.Error(), auth.ErrChannelExists) { - newPartner, err := messenger.GetE2E().GetPartner(recipient.ID) - if err != nil { - return nil, err - } - conn := BuildConnection(newPartner, - messenger.GetE2E(), messenger.GetAuth(), p) - return conn, nil - } return nil, err }