From ceedfb1192b39e7198bc46123629ba0f7940bd7b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 30 Jun 2023 14:48:58 +0300 Subject: [PATCH] Add PairSuccessful event --- libgm/events/qr.go | 8 ++++++++ libgm/pair.go | 1 + 2 files changed, 9 insertions(+) diff --git a/libgm/events/qr.go b/libgm/events/qr.go index 68e5712..01a9668 100644 --- a/libgm/events/qr.go +++ b/libgm/events/qr.go @@ -1,5 +1,13 @@ package events +import ( + "go.mau.fi/mautrix-gmessages/libgm/binary" +) + type QRCODE_UPDATED struct { URL string } + +type PairSuccessful struct { + *binary.Container +} diff --git a/libgm/pair.go b/libgm/pair.go index b9999ba..a7a889e 100644 --- a/libgm/pair.go +++ b/libgm/pair.go @@ -153,4 +153,5 @@ func (p *Pairer) pairCallback(pairData *binary.Container) { p.client.ttl = pairData.PairDeviceData.WebAuthKeyData.ValidFor p.client.devicePair = &DevicePair{Mobile: pairData.PairDeviceData.Mobile, Browser: pairData.PairDeviceData.Browser} p.client.pairer.GetWebEncryptionKey() + p.client.triggerEvent(&events.PairSuccessful{Container: pairData}) }