Fix event names

This commit is contained in:
Tulir Asokan 2023-06-30 16:09:29 +03:00
parent 8da8d5c8ba
commit c09a0063a7
4 changed files with 15 additions and 15 deletions

View file

@ -4,7 +4,7 @@ import (
"go.mau.fi/mautrix-gmessages/libgm/binary"
)
type QRCODE_UPDATED struct {
type QR struct {
URL string
}

View file

@ -5,13 +5,13 @@ import (
"go.mau.fi/mautrix-gmessages/libgm/util"
)
type CLIENT_READY struct {
type ClientReady struct {
Session *util.SessionResponse
Conversations []*binary.Conversation
}
func NewClientReady(session *util.SessionResponse, conversationList *binary.Conversations) *CLIENT_READY {
return &CLIENT_READY{
func NewClientReady(session *util.SessionResponse, conversationList *binary.Conversations) *ClientReady {
return &ClientReady{
Session: session,
Conversations: conversationList.Conversations,
}

View file

@ -1,23 +1,23 @@
package events
type BROWSER_ACTIVE struct {
type BrowserActive struct {
SessionId string
}
func NewBrowserActive(sessionId string) *BROWSER_ACTIVE {
return &BROWSER_ACTIVE{
func NewBrowserActive(sessionId string) *BrowserActive {
return &BrowserActive{
SessionId: sessionId,
}
}
type BATTERY struct{}
type Battery struct{}
func NewBattery() *BATTERY {
return &BATTERY{}
func NewBattery() *Battery {
return &Battery{}
}
type DATA_CONNECTION struct{}
type DataConnection struct{}
func NewDataConnection() *DATA_CONNECTION {
return &DATA_CONNECTION{}
func NewDataConnection() *DataConnection {
return &DataConnection{}
}

View file

@ -67,7 +67,7 @@ func (p *Pairer) RegisterPhoneRelay() (*binary.RegisterPhoneRelayResponse, error
if qrErr != nil {
return nil, qrErr
}
p.client.triggerEvent(&events.QRCODE_UPDATED{URL: url})
p.client.triggerEvent(&events.QR{URL: url})
p.startRefreshRelayTask()
return res, err
}
@ -113,7 +113,7 @@ func (p *Pairer) RefreshPhoneRelay() {
if qrErr != nil {
panic(qrErr)
}
p.client.triggerEvent(&events.QRCODE_UPDATED{URL: url})
p.client.triggerEvent(&events.QR{URL: url})
}
func (p *Pairer) GetWebEncryptionKey() {