gmessages/libgm/payload/refreshPhoneRelay.go

29 lines
584 B
Go
Raw Normal View History

2023-06-30 09:54:08 +00:00
package payload
import (
"go.mau.fi/mautrix-gmessages/libgm/binary"
"go.mau.fi/mautrix-gmessages/libgm/util"
)
func RefreshPhoneRelay(rpcKey []byte) ([]byte, *binary.Container, error) {
2023-06-30 09:54:08 +00:00
payload := &binary.Container{
PhoneRelay: &binary.PhoneRelayBody{
2023-06-30 13:26:46 +00:00
ID: util.RandomUUIDv4(),
2023-06-30 09:54:08 +00:00
Bugle: "Bugle",
RpcKey: rpcKey,
2023-06-30 09:54:08 +00:00
Date: &binary.Date{
Year: 2023,
Seq1: 6,
2023-07-02 14:19:00 +00:00
Seq2: 22,
2023-06-30 09:54:08 +00:00
Seq3: 4,
Seq4: 6,
},
},
}
encodedPayload, err2 := binary.EncodeProtoMessage(payload)
if err2 != nil {
return nil, payload, err2
}
return encodedPayload, payload, nil
}