chore_: rename EnableAndSyncInstallation to EnableInstallationAndSync
This commit is contained in:
parent
200389cc08
commit
84df75e861
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/status-im/status-go/protocol/requests"
|
"github.com/status-im/status-go/protocol/requests"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (m *Messenger) EnableAndSyncInstallation(request *requests.EnableAndSyncInstallation) (*MessengerResponse, error) {
|
func (m *Messenger) EnableInstallationAndSync(request *requests.EnableInstallationAndSync) (*MessengerResponse, error) {
|
||||||
if err := request.Validate(); err != nil {
|
if err := request.Validate(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ func (s *MessengerPairingSuite) TestMessengerPairAfterSeedPhrase() {
|
||||||
)
|
)
|
||||||
s.Require().NoError(err)
|
s.Require().NoError(err)
|
||||||
|
|
||||||
_, err = alice1.EnableAndSyncInstallation(&requests.EnableAndSyncInstallation{InstallationID: installationID2})
|
_, err = alice1.EnableInstallationAndSync(&requests.EnableInstallationAndSync{InstallationID: installationID2})
|
||||||
s.Require().NoError(err)
|
s.Require().NoError(err)
|
||||||
|
|
||||||
// check if the display name is synced
|
// check if the display name is synced
|
||||||
|
|
|
@ -4,15 +4,15 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrEnableAndSyncInstallationInvalidID = errors.New("enable and sync installation: invalid installation id")
|
var ErrEnableInstallationAndSyncInvalidID = errors.New("enable installation and sync : invalid installation id")
|
||||||
|
|
||||||
type EnableAndSyncInstallation struct {
|
type EnableInstallationAndSync struct {
|
||||||
InstallationID string `json:"installationId"`
|
InstallationID string `json:"installationId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j *EnableAndSyncInstallation) Validate() error {
|
func (j *EnableInstallationAndSync) Validate() error {
|
||||||
if len(j.InstallationID) == 0 {
|
if len(j.InstallationID) == 0 {
|
||||||
return ErrEnableAndSyncInstallationInvalidID
|
return ErrEnableInstallationAndSyncInvalidID
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -1064,8 +1064,8 @@ func (api *PublicAPI) SyncDevices(ctx context.Context, name, picture string) err
|
||||||
return api.service.messenger.SyncDevices(ctx, name, picture, nil)
|
return api.service.messenger.SyncDevices(ctx, name, picture, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *PublicAPI) EnableAndSyncInstallation(request *requests.EnableAndSyncInstallation) (*protocol.MessengerResponse, error) {
|
func (api *PublicAPI) EnableInstallationAndSync(request *requests.EnableInstallationAndSync) (*protocol.MessengerResponse, error) {
|
||||||
return api.service.messenger.EnableAndSyncInstallation(request)
|
return api.service.messenger.EnableInstallationAndSync(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *PublicAPI) EnableInstallationAndPair(request *requests.EnableInstallationAndPair) (*protocol.MessengerResponse, error) {
|
func (api *PublicAPI) EnableInstallationAndPair(request *requests.EnableInstallationAndPair) (*protocol.MessengerResponse, error) {
|
||||||
|
|
Loading…
Reference in New Issue