Update gaia pairing message types
This commit is contained in:
parent
f240c7533e
commit
4cac56381b
1 changed files with 5 additions and 1 deletions
|
@ -383,6 +383,10 @@ func (c *Client) cancelGaiaPairing(sess PairingSession) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) sendGaiaPairingMessage(ctx context.Context, sess PairingSession, action gmproto.ActionType, msg []byte) (*gmproto.GaiaPairingResponseContainer, error) {
|
func (c *Client) sendGaiaPairingMessage(ctx context.Context, sess PairingSession, action gmproto.ActionType, msg []byte) (*gmproto.GaiaPairingResponseContainer, error) {
|
||||||
|
msgType := gmproto.MessageType_GAIA_2
|
||||||
|
if action == gmproto.ActionType_CREATE_GAIA_PAIRING_CLIENT_FINISHED {
|
||||||
|
msgType = gmproto.MessageType_BUGLE_MESSAGE
|
||||||
|
}
|
||||||
respCh, err := c.sessionHandler.sendAsyncMessage(SendMessageParams{
|
respCh, err := c.sessionHandler.sendAsyncMessage(SendMessageParams{
|
||||||
Action: action,
|
Action: action,
|
||||||
Data: &gmproto.GaiaPairingRequestContainer{
|
Data: &gmproto.GaiaPairingRequestContainer{
|
||||||
|
@ -393,7 +397,7 @@ func (c *Client) sendGaiaPairingMessage(ctx context.Context, sess PairingSession
|
||||||
},
|
},
|
||||||
DontEncrypt: true,
|
DontEncrypt: true,
|
||||||
CustomTTL: (300 * time.Second).Microseconds(),
|
CustomTTL: (300 * time.Second).Microseconds(),
|
||||||
MessageType: gmproto.MessageType_GAIA_2,
|
MessageType: msgType,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue