Add PairSuccessful event
This commit is contained in:
parent
2f5c5e2c6d
commit
ceedfb1192
2 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,13 @@
|
||||||
package events
|
package events
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go.mau.fi/mautrix-gmessages/libgm/binary"
|
||||||
|
)
|
||||||
|
|
||||||
type QRCODE_UPDATED struct {
|
type QRCODE_UPDATED struct {
|
||||||
URL string
|
URL string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PairSuccessful struct {
|
||||||
|
*binary.Container
|
||||||
|
}
|
||||||
|
|
|
@ -153,4 +153,5 @@ func (p *Pairer) pairCallback(pairData *binary.Container) {
|
||||||
p.client.ttl = pairData.PairDeviceData.WebAuthKeyData.ValidFor
|
p.client.ttl = pairData.PairDeviceData.WebAuthKeyData.ValidFor
|
||||||
p.client.devicePair = &DevicePair{Mobile: pairData.PairDeviceData.Mobile, Browser: pairData.PairDeviceData.Browser}
|
p.client.devicePair = &DevicePair{Mobile: pairData.PairDeviceData.Mobile, Browser: pairData.PairDeviceData.Browser}
|
||||||
p.client.pairer.GetWebEncryptionKey()
|
p.client.pairer.GetWebEncryptionKey()
|
||||||
|
p.client.triggerEvent(&events.PairSuccessful{Container: pairData})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue