From 317b1687ecf4c254174a735de4792cbc5d8f1c3f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 16 Sep 2026 15:15:12 +0300 Subject: [PATCH 01/84] changelog: fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0d718c..94898c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # v26.09 * Bumped minimum Go version to 1.26. -* Updated libsignal to v1.102.2. +* Updated libsignal to v0.102.2. * Fixed handling messages with invalid values in formatting body ranges. * Fixed websocket request retrying not working correctly if the first attempt times out. From 8771d18686c7a8590c8807ebd3914900d591f1d0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 16 Sep 2026 15:31:42 +0300 Subject: [PATCH 02/84] msgconv/imagepack: optimize creating unique shortcodes --- pkg/msgconv/imagepack.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkg/msgconv/imagepack.go b/pkg/msgconv/imagepack.go index 310f810..2a26850 100644 --- a/pkg/msgconv/imagepack.go +++ b/pkg/msgconv/imagepack.go @@ -158,18 +158,24 @@ func (mc *MessageConverter) DownloadImagePack(ctx context.Context, url string) ( imagesByID[stickerID] = mxc return mxc, nil } + duplicateCounter := make(map[string]int) for _, sticker := range manifest.Stickers { mxc, err := uploadImage(sticker) if err != nil { return nil, err } shortcode := emojishortcodes.Get(sticker.GetEmoji()) - realShortcode := shortcode - i := 2 - for _, alreadyExists := content.Images[realShortcode]; alreadyExists; i++ { - realShortcode = fmt.Sprintf("%s_%d", shortcode, i) + if _, alreadyExists := content.Images[shortcode]; alreadyExists { + counter, ok := duplicateCounter[shortcode] + if !ok { + counter = 2 + } else { + counter++ + } + duplicateCounter[shortcode] = counter + shortcode = fmt.Sprintf("%s_%d", shortcode, counter) } - content.Images[realShortcode] = &event.ImagePackImage{ + content.Images[shortcode] = &event.ImagePackImage{ URL: mxc, Body: sticker.GetEmoji(), Info: &event.FileInfo{ From 7667ed1d4bbbc43eec3b82992ed34b99f870d66f Mon Sep 17 00:00:00 2001 From: Toni Spets Date: Fri, 18 Sep 2026 11:56:29 +0300 Subject: [PATCH 03/84] signalmeow: fix stop deadlock in key check loop (#669) Co-authored-by: Tulir Asokan --- pkg/signalmeow/receiving.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 0254a21..5e7dd51 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -133,7 +133,7 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection callbackCount = 0 case nextTS := <-cbc: if callbackCount >= 4 && time.Since(writeCallbackTimer) > 1*time.Minute { - err := cli.Store.EventBuffer.DeleteBufferedEventsOlderThan(ctx, writeCallbackTimer) + err := cli.Store.EventBuffer.DeleteBufferedEventsOlderThan(loopCtx, writeCallbackTimer) if err != nil { log.Err(err).Msg("Failed to delete old buffered event hashes") } @@ -244,8 +244,12 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection } if statusToSend.Event != 0 && statusToSend.Event != cli.lastConnectionStatus.Event { log.Info().Any("status_to_send", statusToSend).Msg("Sending connection status") - statusChan <- statusToSend - cli.lastConnectionStatus = statusToSend + select { + case <-loopCtx.Done(): + return + case statusChan <- statusToSend: + cli.lastConnectionStatus = statusToSend + } } } }() @@ -259,18 +263,15 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection return case <-initialConnectChan: log.Info().Msg("Both websockets connected, sending contacts sync request") - err = cli.RegisterCapabilities(ctx) + err = cli.RegisterCapabilities(loopCtx) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to register capabilities") } else { zerolog.Ctx(ctx).Debug().Msg("Successfully registered capabilities") } - // Start loop to check for and upload more prekeys - cli.loopWg.Add(1) - go func() { - defer cli.loopWg.Done() - cli.keyCheckLoop(loopCtx) - }() + // Start loop to check for and upload more prekeys. Not included in loopWg + // as it may call StopReceiveLoops which waits for the wait group. + go cli.keyCheckLoop(loopCtx) // TODO hacky if cli.SyncContactsOnConnect { cli.SendContactSyncRequest(loopCtx) From 32b9e0ca68322f3dec5196a89762580e98c7623a Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 20 Sep 2026 17:10:45 +0300 Subject: [PATCH 04/84] signalmeow/retry: fix handling retry receipts with no sender key info --- go.mod | 4 ++-- go.sum | 8 ++++---- pkg/signalmeow/receiving.go | 7 +------ pkg/signalmeow/retry.go | 28 +++++++++++++++++++++++++++- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 93eb572..87adb6a 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/rs/zerolog v1.35.1 github.com/stretchr/testify v1.12.0 github.com/tidwall/gjson v1.19.0 - go.mau.fi/util v0.10.1 + go.mau.fi/util v0.10.2-0.20260918225449-a4c0d5b86aa8 golang.org/x/crypto v0.57.0 golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba golang.org/x/net v0.59.0 @@ -22,7 +22,7 @@ require ( google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.31.0 + maunium.net/go/mautrix v0.31.1-0.20260919103532-1f3ae33f3f52 ) require ( diff --git a/go.sum b/go.sum index 606a4ad..8b8cbe9 100644 --- a/go.sum +++ b/go.sum @@ -65,8 +65,8 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/yuin/goldmark v1.8.6 h1:d0VcaP1sx9GkFVkoW+KtggpGi2KZ965i14b0+bDQST4= github.com/yuin/goldmark v1.8.6/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -go.mau.fi/util v0.10.1 h1:1oSqb4TwzLA0cUDY0aomyBPFKkZ3J5fqCmrXV3VH3GQ= -go.mau.fi/util v0.10.1/go.mod h1:40TDo7/ekSeOjgr8KAmX31Yf4zrOF94j83WQB+u5ZPc= +go.mau.fi/util v0.10.2-0.20260918225449-a4c0d5b86aa8 h1:PxaO4u8ti7Eef1WKPAINXrcUkqKshE+n239UtbbJOn4= +go.mau.fi/util v0.10.2-0.20260918225449-a4c0d5b86aa8/go.mod h1:40TDo7/ekSeOjgr8KAmX31Yf4zrOF94j83WQB+u5ZPc= go.mau.fi/zeroconfig v0.2.0 h1:e/OGEERqVRRKlgaro7E6bh8xXiKFSXB3eNNIud7FUjU= go.mau.fi/zeroconfig v0.2.0/go.mod h1:J0Vn0prHNOm493oZoQ84kq83ZaNCYZnq+noI1b1eN8w= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= @@ -113,5 +113,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.31.0 h1:x6XNBSa0kOaBgcleI+ZBLkGvBdHIE0qdeY6TZ4wWUeI= -maunium.net/go/mautrix v0.31.0/go.mod h1:vfPYtoGAjlTnIF+W8tl+rjX3yB4PEfqYR2sDXvQo4Co= +maunium.net/go/mautrix v0.31.1-0.20260919103532-1f3ae33f3f52 h1:+BGvyZlokeXN63W5Iog7YCqyFYxUtJ44zUVb3P9ylBo= +maunium.net/go/mautrix v0.31.1-0.20260919103532-1f3ae33f3f52/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 5e7dd51..98d9b7f 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -534,12 +534,7 @@ func (cli *Client) handleDecryptedResult( if err != nil { log.Warn().Err(err).Msg("Failed to unmarshal decryption error message") } else { - go func() { - err := cli.handleRetryRequest(ctx, result, dem) - if err != nil { - log.Err(err).Msg("Failed to handle decryption error message in background") - } - }() + go cli.tryHandleRetryRequest(ctx, result, dem) } return } else if result.Unencrypted { diff --git a/pkg/signalmeow/retry.go b/pkg/signalmeow/retry.go index 0faf04a..ed4c36b 100644 --- a/pkg/signalmeow/retry.go +++ b/pkg/signalmeow/retry.go @@ -20,10 +20,12 @@ import ( "context" "fmt" "math/rand/v2" + "runtime/debug" "slices" "time" "github.com/rs/zerolog" + "go.mau.fi/util/exerrors" "go.mau.fi/util/random" "go.mau.fi/mautrix-signal/pkg/libsignalgo" @@ -80,6 +82,24 @@ func (cli *Client) sendRetryRequest(ctx context.Context, result DecryptionResult return nil } +func (cli *Client) tryHandleRetryRequest( + ctx context.Context, + result DecryptionResult, + dem *libsignalgo.DecryptionErrorMessage, +) { + defer func() { + if v := recover(); v != nil { + zerolog.Ctx(ctx).Err(exerrors.RecoverToError(v)). + Bytes(zerolog.ErrorStackFieldName, debug.Stack()). + Msg("Panic in retry request handler") + } + }() + err := cli.handleRetryRequest(ctx, result, dem) + if err != nil { + zerolog.Ctx(ctx).Err(err).Msg("Failed to handle decryption error message in background") + } +} + func (cli *Client) handleRetryRequest( ctx context.Context, result DecryptionResult, @@ -141,7 +161,13 @@ func (cli *Client) handleRetryRequest( if err != nil { return fmt.Errorf("failed to get own address: %w", err) } - if slices.Contains(ski.SharedWith[serviceID], int(deviceID)) { + if ski == nil { + zerolog.Ctx(ctx).Debug(). + Stringer("group_id", result.GroupID). + Stringer("sender_service_id", serviceID). + Uint("sender_device_id", deviceID). + Msg("No sender key info for group for retry receipt") + } else if slices.Contains(ski.SharedWith[serviceID], int(deviceID)) { skdm, err := libsignalgo.NewSenderKeyDistributionMessage(ctx, myAddress, ski.DistributionID, cli.Store.SenderKeyStore) if err != nil { return fmt.Errorf("failed to create sender key distribution message: %w", err) From da844912790d6cd156dd25e8c51e96bf8b497b30 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Fri, 25 Sep 2026 20:54:08 +0100 Subject: [PATCH 05/84] signalmeow/storageservice: serialize storage syncs and coalesce fetch latest notices (#670) --- pkg/connector/client.go | 4 ++-- pkg/signalmeow/client.go | 4 ++++ pkg/signalmeow/receiving.go | 4 ++-- pkg/signalmeow/storageservice.go | 12 +++++++++++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pkg/connector/client.go b/pkg/connector/client.go index 4fcf188..723b029 100644 --- a/pkg/connector/client.go +++ b/pkg/connector/client.go @@ -342,7 +342,7 @@ func (s *SignalClient) tryConnect(ctx context.Context, retryCount int, noLoginSy if s.Client.Store.EphemeralBackupKey != nil { go func() { if s.Client.Store.MasterKey != nil { - s.Client.SyncStorage(ctx) + s.Client.StorageSync(ctx) } else { s.UserLogin.Log.Warn().Msg("No master key for storage sync before backup sync") } @@ -351,7 +351,7 @@ func (s *SignalClient) tryConnect(ctx context.Context, retryCount int, noLoginSy } else { cancel() if s.Client.Store.MasterKey != nil { - go s.Client.SyncStorage(ctx) + s.Client.QueueStorageSync(ctx) } } } diff --git a/pkg/signalmeow/client.go b/pkg/signalmeow/client.go index b72e33b..e6a03f4 100644 --- a/pkg/signalmeow/client.go +++ b/pkg/signalmeow/client.go @@ -23,6 +23,7 @@ import ( "net/http" "net/url" "sync" + "sync/atomic" "time" "github.com/rs/zerolog" @@ -69,6 +70,9 @@ type Client struct { cdAuth *basicExpiringCredentials cdToken []byte + storageSyncLock sync.Mutex + storageSyncQueued atomic.Bool + writeCallbackCounter chan time.Time } diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 98d9b7f..9773943 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -713,13 +713,13 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess log.Err(err).Msg("Failed to save device after receiving master key") } else { log.Info().Msg("Received master key") - go cli.SyncStorage(ctx) + cli.QueueStorageSync(ctx) } case *signalpb.SyncMessage_FetchLatest_: switch content.FetchLatest.GetType() { case signalpb.SyncMessage_FetchLatest_STORAGE_MANIFEST: log.Debug().Msg("Received storage manifest fetch latest notice") - go cli.SyncStorage(ctx) + cli.QueueStorageSync(ctx) default: log.Debug(). Stringer("fetch_latest_type", content.FetchLatest.GetType()). diff --git a/pkg/signalmeow/storageservice.go b/pkg/signalmeow/storageservice.go index df26a8d..cfc2951 100644 --- a/pkg/signalmeow/storageservice.go +++ b/pkg/signalmeow/storageservice.go @@ -42,7 +42,17 @@ import ( "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) -func (cli *Client) SyncStorage(ctx context.Context) { +// A sync that is already waiting to start will see whatever change triggered this call. +func (cli *Client) QueueStorageSync(ctx context.Context) { + if cli.storageSyncQueued.CompareAndSwap(false, true) { + go cli.StorageSync(ctx) + } +} + +func (cli *Client) StorageSync(ctx context.Context) { + cli.storageSyncLock.Lock() + defer cli.storageSyncLock.Unlock() + cli.storageSyncQueued.Store(false) log := cli.Log.With().Str("action", "sync storage").Logger() ctx = log.WithContext(ctx) // TODO only fetch changed entries From 43eae9f91d8739124c579c13355b416b83a8a6fd Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 22 Sep 2026 01:30:15 +0300 Subject: [PATCH 06/84] legacyprovision: remove last bits --- cmd/mautrix-signal/legacyprovision.go | 147 -------------------------- cmd/mautrix-signal/main.go | 6 -- 2 files changed, 153 deletions(-) delete mode 100644 cmd/mautrix-signal/legacyprovision.go diff --git a/cmd/mautrix-signal/legacyprovision.go b/cmd/mautrix-signal/legacyprovision.go deleted file mode 100644 index c9061ac..0000000 --- a/cmd/mautrix-signal/legacyprovision.go +++ /dev/null @@ -1,147 +0,0 @@ -// mautrix-signal - A Matrix-Signal puppeting bridge. -// Copyright (C) 2024 Tulir Asokan -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is istributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package main - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/rs/zerolog" - "maunium.net/go/mautrix" - "maunium.net/go/mautrix/bridgev2" - "maunium.net/go/mautrix/id" -) - -func legacyResolveIdentifierOrStartChat(w http.ResponseWriter, r *http.Request, create bool) { - login := m.Matrix.Provisioning.GetLoginForRequest(w, r) - if login == nil { - return - } - api := login.Client.(bridgev2.IdentifierResolvingNetworkAPI) - phonenum := r.PathValue("phonenum") - resp, err := api.ResolveIdentifier(r.Context(), phonenum, create) - if err != nil { - zerolog.Ctx(r.Context()).Err(err).Msg("Failed to resolve identifier") - JSONResponse(w, http.StatusInternalServerError, &Error{ - Error: fmt.Sprintf("Failed to resolve identifier: %v", err), - ErrCode: "M_UNKNOWN", - }) - return - } else if resp == nil { - JSONResponse(w, http.StatusNotFound, &Error{ - ErrCode: mautrix.MNotFound.ErrCode, - Error: "User not found on Signal", - }) - return - } - status := http.StatusOK - apiResp := &ResolveIdentifierResponse{ - ChatID: ResolveIdentifierResponseChatID{ - UUID: string(resp.UserID), - Number: phonenum, - }, - } - if resp.Ghost != nil { - if resp.UserInfo != nil { - resp.Ghost.UpdateInfo(r.Context(), resp.UserInfo) - } - apiResp.OtherUser = &ResolveIdentifierResponseOtherUser{ - MXID: resp.Ghost.Intent.GetMXID(), - DisplayName: resp.Ghost.Name, - AvatarURL: resp.Ghost.AvatarMXC.ParseOrIgnore(), - } - } - if resp.Chat != nil { - if resp.Chat.Portal == nil { - resp.Chat.Portal, err = m.Bridge.GetPortalByKey(r.Context(), resp.Chat.PortalKey) - if err != nil { - zerolog.Ctx(r.Context()).Err(err).Msg("Failed to get portal") - JSONResponse(w, http.StatusInternalServerError, &mautrix.RespError{ - Err: "Failed to get portal", - ErrCode: "M_UNKNOWN", - }) - return - } - } - if create && resp.Chat.Portal.MXID == "" { - apiResp.JustCreated = true - status = http.StatusCreated - err = resp.Chat.Portal.CreateMatrixRoom(r.Context(), login, resp.Chat.PortalInfo) - if err != nil { - zerolog.Ctx(r.Context()).Err(err).Msg("Failed to create portal room") - JSONResponse(w, http.StatusInternalServerError, &mautrix.RespError{ - Err: "Failed to create portal room", - ErrCode: "M_UNKNOWN", - }) - return - } - } - apiResp.RoomID = resp.Chat.Portal.MXID - } - JSONResponse(w, status, &Response{ - Success: true, - Status: "ok", - ResolveIdentifierResponse: apiResp, - }) -} - -func legacyProvResolveIdentifier(w http.ResponseWriter, r *http.Request) { - legacyResolveIdentifierOrStartChat(w, r, false) -} - -func legacyProvPM(w http.ResponseWriter, r *http.Request) { - legacyResolveIdentifierOrStartChat(w, r, true) -} - -func JSONResponse(w http.ResponseWriter, status int, response any) { - w.Header().Add("Content-Type", "application/json") - w.WriteHeader(status) - _ = json.NewEncoder(w).Encode(response) -} - -type Error struct { - Success bool `json:"success"` - Error string `json:"error"` - ErrCode string `json:"errcode"` -} - -type Response struct { - Success bool `json:"success"` - Status string `json:"status"` - - // For response in ResolveIdentifier - *ResolveIdentifierResponse -} - -type ResolveIdentifierResponse struct { - RoomID id.RoomID `json:"room_id"` - ChatID ResolveIdentifierResponseChatID `json:"chat_id"` - JustCreated bool `json:"just_created"` - OtherUser *ResolveIdentifierResponseOtherUser `json:"other_user,omitempty"` -} - -type ResolveIdentifierResponseChatID struct { - UUID string `json:"uuid"` - Number string `json:"number"` -} - -type ResolveIdentifierResponseOtherUser struct { - MXID id.UserID `json:"mxid"` - DisplayName string `json:"displayname"` - AvatarURL id.ContentURI `json:"avatar_url"` -} diff --git a/cmd/mautrix-signal/main.go b/cmd/mautrix-signal/main.go index 703d779..0baeb27 100644 --- a/cmd/mautrix-signal/main.go +++ b/cmd/mautrix-signal/main.go @@ -45,12 +45,6 @@ var m = mxmain.BridgeMain{ func main() { web.UserAgent = fmt.Sprintf("mautrix-signal/%s %s", m.Version, web.BaseUserAgent) - m.PostStart = func() { - if m.Matrix.Provisioning != nil { - m.Matrix.Provisioning.Router.HandleFunc("GET /v2/resolve_identifier/{phonenum}", legacyProvResolveIdentifier) - m.Matrix.Provisioning.Router.HandleFunc("POST /v2/pm/{phonenum}", legacyProvPM) - } - } m.InitVersion(Tag, Commit, BuildTime) m.Run() } From b82e0ca5605995f446aa66820dfc229ee46b57ad Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 1 Oct 2026 18:09:30 +0300 Subject: [PATCH 07/84] libsignal: update to v0.103.1 --- pkg/libsignalgo/libsignal | 2 +- pkg/libsignalgo/libsignal-ffi.h | 270 +++++++++++++++++++++-- pkg/libsignalgo/signalversion/version.go | 2 +- 3 files changed, 255 insertions(+), 19 deletions(-) diff --git a/pkg/libsignalgo/libsignal b/pkg/libsignalgo/libsignal index 8fc2113..e8cc2dd 160000 --- a/pkg/libsignalgo/libsignal +++ b/pkg/libsignalgo/libsignal @@ -1 +1 @@ -Subproject commit 8fc2113bda042fc972a166a24b974b0d34155c6c +Subproject commit e8cc2dddd578859b4a029c9c94670b24ce2b616a diff --git a/pkg/libsignalgo/libsignal-ffi.h b/pkg/libsignalgo/libsignal-ffi.h index dec28cd..6bf2a6e 100644 --- a/pkg/libsignalgo/libsignal-ffi.h +++ b/pkg/libsignalgo/libsignal-ffi.h @@ -175,6 +175,19 @@ static_assert_64bit(alignof(SignalConstPointerPublicKey) == 8); typedef const SignalConstPointerPublicKey* SignalType_ConstPointer_SignalConstPointerPublicKey; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConstPointerPublicKey) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalConstPointerPublicKey) == 8); +typedef struct SignalKyberPublicKey SignalKyberPublicKey; +typedef const SignalKyberPublicKey* SignalType_ConstPointer_SignalKyberPublicKey; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalKyberPublicKey) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalKyberPublicKey) == 8); +typedef struct { + const SignalKyberPublicKey* raw; +} SignalConstPointerKyberPublicKey; +static_assert_64bit(offsetof(SignalConstPointerKyberPublicKey, raw) == 0); +static_assert_64bit(sizeof(SignalConstPointerKyberPublicKey) == 8); +static_assert_64bit(alignof(SignalConstPointerKyberPublicKey) == 8); +typedef const SignalConstPointerKyberPublicKey* SignalType_ConstPointer_SignalConstPointerKyberPublicKey; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConstPointerKyberPublicKey) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalConstPointerKyberPublicKey) == 8); typedef struct SignalCiphertextMessage SignalCiphertextMessage; typedef const SignalCiphertextMessage* SignalType_ConstPointer_SignalCiphertextMessage; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCiphertextMessage) == 8); @@ -563,6 +576,7 @@ static_assert_64bit(sizeof(SignalBridgeConfirmedMfaKeyMetadataFfiResult) == 24); static_assert_64bit(alignof(SignalBridgeConfirmedMfaKeyMetadataFfiResult) == 8); typedef enum { SignalBridgeMfaKeyKindFfiResultTotp, + SignalBridgeMfaKeyKindFfiResultWebAuthn, SignalBridgeMfaKeyKindFfiResultUnknown, } SignalBridgeMfaKeyKindFfiResult; static_assert_64bit(sizeof(SignalBridgeMfaKeyKindFfiResult) == 4); @@ -728,6 +742,10 @@ static_assert_64bit(alignof(SignalFfiSyncInputStreamStruct) == 8); typedef const SignalFfiSyncInputStreamStruct* SignalType_ConstPointer_SignalFfiSyncInputStreamStruct; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiSyncInputStreamStruct) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiSyncInputStreamStruct) == 8); +typedef struct SignalBackupJsonExporter SignalBackupJsonExporter; +typedef const SignalBackupJsonExporter* SignalType_ConstPointer_SignalBackupJsonExporter; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBackupJsonExporter) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalBackupJsonExporter) == 8); typedef struct SignalMessageBackupKey SignalMessageBackupKey; typedef const SignalMessageBackupKey* SignalType_ConstPointer_SignalMessageBackupKey; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMessageBackupKey) == 8); @@ -838,6 +856,45 @@ static_assert_64bit(alignof(SignalBridgePreKeyCountsFfiResult) == 4); typedef const SignalBridgePreKeyCountsFfiResult* SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult) == 8); +typedef int32_t* SignalType_MutPointer_int32_t; +static_assert_64bit(sizeof(SignalType_MutPointer_int32_t) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_int32_t) == 8); +typedef struct { + int32_t* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedi32; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedi32, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedi32, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedi32, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedi32) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedi32) == 8); +typedef SignalOwnedBuffer* SignalType_MutPointer_SignalOwnedBuffer; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBuffer) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBuffer) == 8); +typedef struct { + SignalOwnedBuffer* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedOwnedBuffer; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 8); +typedef struct { + SignalOwnedBuffer user_handle; + SignalOwnedBufferOfMaxAlignedi32 allowed_algorithms; + SignalOwnedBufferOfMaxAlignedOwnedBuffer exclude_credential_ids; +} SignalBridgeWebAuthnCreateParametersFfiResult; +static_assert_64bit(offsetof(SignalBridgeWebAuthnCreateParametersFfiResult, user_handle) == 0); +static_assert_64bit(offsetof(SignalBridgeWebAuthnCreateParametersFfiResult, allowed_algorithms) == 16); +static_assert_64bit(offsetof(SignalBridgeWebAuthnCreateParametersFfiResult, exclude_credential_ids) == 40); +static_assert_64bit(sizeof(SignalBridgeWebAuthnCreateParametersFfiResult) == 64); +static_assert_64bit(alignof(SignalBridgeWebAuthnCreateParametersFfiResult) == 8); +typedef const SignalBridgeWebAuthnCreateParametersFfiResult* SignalType_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult) == 8); typedef enum { SignalBridgeCopyBackupMediaResultFfiResultSuccess, SignalBridgeCopyBackupMediaResultFfiResultSourceNotFound, @@ -1156,6 +1213,38 @@ static_assert_64bit(alignof(SignalListMediaResponseFfiResult) == 8); typedef const SignalListMediaResponseFfiResult* SignalType_ConstPointer_SignalListMediaResponseFfiResult; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalListMediaResponseFfiResult) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalListMediaResponseFfiResult) == 8); +typedef struct { + SignalOwnedBuffer challenge; + int32_t timeout_seconds; + SignalOwnedBufferOfMaxAlignedOwnedBuffer allowed_credential_ids; +} SignalBridgeWebAuthnAuthenticationParametersFfiResult; +static_assert_64bit(offsetof(SignalBridgeWebAuthnAuthenticationParametersFfiResult, challenge) == 0); +static_assert_64bit(offsetof(SignalBridgeWebAuthnAuthenticationParametersFfiResult, timeout_seconds) == 16); +static_assert_64bit(offsetof(SignalBridgeWebAuthnAuthenticationParametersFfiResult, allowed_credential_ids) == 24); +static_assert_64bit(sizeof(SignalBridgeWebAuthnAuthenticationParametersFfiResult) == 48); +static_assert_64bit(alignof(SignalBridgeWebAuthnAuthenticationParametersFfiResult) == 8); +typedef SignalBridgeWebAuthnAuthenticationParametersFfiResult MaybeUninitOfBridgeWebAuthnAuthenticationParametersFfiResult; +static_assert_64bit(sizeof(MaybeUninitOfBridgeWebAuthnAuthenticationParametersFfiResult) == 48); +static_assert_64bit(alignof(MaybeUninitOfBridgeWebAuthnAuthenticationParametersFfiResult) == 8); +typedef struct { + bool present; + MaybeUninitOfBridgeWebAuthnAuthenticationParametersFfiResult value; +} SignalOptionalOfBridgeWebAuthnAuthenticationParametersFfiResult; +static_assert_64bit(offsetof(SignalOptionalOfBridgeWebAuthnAuthenticationParametersFfiResult, present) == 0); +static_assert_64bit(offsetof(SignalOptionalOfBridgeWebAuthnAuthenticationParametersFfiResult, value) == 8); +static_assert_64bit(sizeof(SignalOptionalOfBridgeWebAuthnAuthenticationParametersFfiResult) == 56); +static_assert_64bit(alignof(SignalOptionalOfBridgeWebAuthnAuthenticationParametersFfiResult) == 8); +typedef struct { + bool has_totp; + SignalOptionalOfBridgeWebAuthnAuthenticationParametersFfiResult webauthn_params; +} SignalStartMfaVerificationResponseFfiResult; +static_assert_64bit(offsetof(SignalStartMfaVerificationResponseFfiResult, has_totp) == 0); +static_assert_64bit(offsetof(SignalStartMfaVerificationResponseFfiResult, webauthn_params) == 8); +static_assert_64bit(sizeof(SignalStartMfaVerificationResponseFfiResult) == 64); +static_assert_64bit(alignof(SignalStartMfaVerificationResponseFfiResult) == 8); +typedef const SignalStartMfaVerificationResponseFfiResult* SignalType_ConstPointer_SignalStartMfaVerificationResponseFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalStartMfaVerificationResponseFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalStartMfaVerificationResponseFfiResult) == 8); typedef struct SignalRegistrationAccountAttributes SignalRegistrationAccountAttributes; typedef const SignalRegistrationAccountAttributes* SignalType_ConstPointer_SignalRegistrationAccountAttributes; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalRegistrationAccountAttributes) == 8); @@ -1461,10 +1550,6 @@ typedef struct SignalFingerprint SignalFingerprint; typedef const SignalFingerprint* SignalType_ConstPointer_SignalFingerprint; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFingerprint) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalFingerprint) == 8); -typedef struct SignalKyberPublicKey SignalKyberPublicKey; -typedef const SignalKyberPublicKey* SignalType_ConstPointer_SignalKyberPublicKey; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalKyberPublicKey) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalKyberPublicKey) == 8); typedef struct SignalKyberSecretKey SignalKyberSecretKey; typedef const SignalKyberSecretKey* SignalType_ConstPointer_SignalKyberSecretKey; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalKyberSecretKey) == 8); @@ -1583,9 +1668,6 @@ static_assert_64bit(alignof(SignalType_MutPointer_FixedArray97_uint8_t) == 8); typedef SignalAes256GcmSiv* SignalType_MutPointer_SignalAes256GcmSiv; static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); -typedef int32_t* SignalType_MutPointer_int32_t; -static_assert_64bit(sizeof(SignalType_MutPointer_int32_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_int32_t) == 8); typedef SignalPinHash* SignalType_MutPointer_SignalPinHash; static_assert_64bit(sizeof(SignalType_MutPointer_SignalPinHash) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalPinHash) == 8); @@ -1712,6 +1794,18 @@ static_assert_64bit(alignof(SignalMutPointerValidatingMac) == 8); typedef SignalMutPointerValidatingMac* SignalType_MutPointer_SignalMutPointerValidatingMac; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerValidatingMac) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerValidatingMac) == 8); +typedef SignalBackupJsonExporter* SignalType_MutPointer_SignalBackupJsonExporter; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalBackupJsonExporter) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalBackupJsonExporter) == 8); +typedef struct { + SignalBackupJsonExporter* raw; +} SignalMutPointerBackupJsonExporter; +static_assert_64bit(offsetof(SignalMutPointerBackupJsonExporter, raw) == 0); +static_assert_64bit(sizeof(SignalMutPointerBackupJsonExporter) == 8); +static_assert_64bit(alignof(SignalMutPointerBackupJsonExporter) == 8); +typedef SignalMutPointerBackupJsonExporter* SignalType_MutPointer_SignalMutPointerBackupJsonExporter; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerBackupJsonExporter) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerBackupJsonExporter) == 8); typedef SignalMessageBackupKey* SignalType_MutPointer_SignalMessageBackupKey; static_assert_64bit(sizeof(SignalType_MutPointer_SignalMessageBackupKey) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalMessageBackupKey) == 8); @@ -2179,9 +2273,9 @@ static_assert_64bit(alignof(SignalOwnedBufferOfFfiRegisterResponseBadge) == 8); typedef SignalOwnedBufferOfFfiRegisterResponseBadge* SignalType_MutPointer_SignalOwnedBufferOfFfiRegisterResponseBadge; static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBufferOfFfiRegisterResponseBadge) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBufferOfFfiRegisterResponseBadge) == 8); -typedef SignalOwnedBuffer* SignalType_MutPointer_SignalOwnedBuffer; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBuffer) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBuffer) == 8); +typedef SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr* SignalType_MutPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr) == 8); typedef struct { const int8_t* first; bool second; @@ -2733,6 +2827,22 @@ static_assert_64bit(alignof(SignalCPromiseBridgePreKeyCountsFfiResult) == 8); typedef SignalCPromiseBridgePreKeyCountsFfiResult* SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeWebAuthnCreateParametersFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseBridgeWebAuthnCreateParametersFfiResult; +static_assert_64bit(offsetof(SignalCPromiseBridgeWebAuthnCreateParametersFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseBridgeWebAuthnCreateParametersFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseBridgeWebAuthnCreateParametersFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseBridgeWebAuthnCreateParametersFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseBridgeWebAuthnCreateParametersFfiResult) == 8); +typedef SignalCPromiseBridgeWebAuthnCreateParametersFfiResult* SignalType_MutPointer_SignalCPromiseBridgeWebAuthnCreateParametersFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgeWebAuthnCreateParametersFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgeWebAuthnCreateParametersFfiResult) == 8); typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult, SignalType_ConstPointer_void); static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); @@ -2813,6 +2923,22 @@ static_assert_64bit(alignof(SignalCPromiseListMediaResponseFfiResult) == 8); typedef SignalCPromiseListMediaResponseFfiResult* SignalType_MutPointer_SignalCPromiseListMediaResponseFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseListMediaResponseFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseListMediaResponseFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalStartMfaVerificationResponseFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalStartMfaVerificationResponseFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalStartMfaVerificationResponseFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalStartMfaVerificationResponseFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalStartMfaVerificationResponseFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseStartMfaVerificationResponseFfiResult; +static_assert_64bit(offsetof(SignalCPromiseStartMfaVerificationResponseFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseStartMfaVerificationResponseFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseStartMfaVerificationResponseFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseStartMfaVerificationResponseFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseStartMfaVerificationResponseFfiResult) == 8); +typedef SignalCPromiseStartMfaVerificationResponseFfiResult* SignalType_MutPointer_SignalCPromiseStartMfaVerificationResponseFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseStartMfaVerificationResponseFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseStartMfaVerificationResponseFfiResult) == 8); typedef uint16_t* SignalType_MutPointer_uint16_t; static_assert_64bit(sizeof(SignalType_MutPointer_uint16_t) == 8); static_assert_64bit(alignof(SignalType_MutPointer_uint16_t) == 8); @@ -2895,6 +3021,14 @@ static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerPublicKey, base) = static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerPublicKey, length) == 8); static_assert_64bit(sizeof(SignalBorrowedSliceOfConstPointerPublicKey) == 16); static_assert_64bit(alignof(SignalBorrowedSliceOfConstPointerPublicKey) == 8); +typedef struct { + const SignalConstPointerKyberPublicKey* base; + size_t length; +} SignalBorrowedSliceOfConstPointerKyberPublicKey; +static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerKyberPublicKey, base) == 0); +static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerKyberPublicKey, length) == 8); +static_assert_64bit(sizeof(SignalBorrowedSliceOfConstPointerKyberPublicKey) == 16); +static_assert_64bit(alignof(SignalBorrowedSliceOfConstPointerKyberPublicKey) == 8); typedef struct { const SignalConstPointerCiphertextMessage* base; size_t length; @@ -2973,6 +3107,12 @@ typedef struct { static_assert_64bit(offsetof(SignalConstPointerFfiSyncInputStreamStruct, raw) == 0); static_assert_64bit(sizeof(SignalConstPointerFfiSyncInputStreamStruct) == 8); static_assert_64bit(alignof(SignalConstPointerFfiSyncInputStreamStruct) == 8); +typedef struct { + const SignalBackupJsonExporter* raw; +} SignalConstPointerBackupJsonExporter; +static_assert_64bit(offsetof(SignalConstPointerBackupJsonExporter, raw) == 0); +static_assert_64bit(sizeof(SignalConstPointerBackupJsonExporter) == 8); +static_assert_64bit(alignof(SignalConstPointerBackupJsonExporter) == 8); typedef struct { const SignalMessageBackupKey* raw; } SignalConstPointerMessageBackupKey; @@ -3177,12 +3317,6 @@ typedef struct { static_assert_64bit(offsetof(SignalConstPointerFingerprint, raw) == 0); static_assert_64bit(sizeof(SignalConstPointerFingerprint) == 8); static_assert_64bit(alignof(SignalConstPointerFingerprint) == 8); -typedef struct { - const SignalKyberPublicKey* raw; -} SignalConstPointerKyberPublicKey; -static_assert_64bit(offsetof(SignalConstPointerKyberPublicKey, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerKyberPublicKey) == 8); -static_assert_64bit(alignof(SignalConstPointerKyberPublicKey) == 8); typedef struct { const SignalKyberSecretKey* raw; } SignalConstPointerKyberSecretKey; @@ -3456,8 +3590,9 @@ typedef enum { SignalErrorCodeReceiptCredentialErrorReceiptAlreadyIssued = 233, SignalErrorCodeTooManyTotpKeys = 234, SignalErrorCodeTooManyMfaKeys = 235, - SignalErrorCodeOneTimePasswordNotVerified = 236, + SignalErrorCodeMfaNotVerified = 236, SignalErrorCodeMfaKeyNotFound = 237, + SignalErrorCodeWebAuthnRegistrationUnsuccessful = 238, } SignalErrorCode; static_assert_64bit(sizeof(SignalErrorCode) == 4); static_assert_64bit(alignof(SignalErrorCode) == 4); @@ -3481,6 +3616,25 @@ enum SignalSvr2CredentialsResult { typedef uint8_t SignalSvr2CredentialsResult; static_assert_64bit(sizeof(SignalSvr2CredentialsResult) == 1); static_assert_64bit(alignof(SignalSvr2CredentialsResult) == 1); +typedef enum { + SignalBridgeMfaVerificationCredentialFfiArgTotp, + SignalBridgeMfaVerificationCredentialFfiArgWebAuthn, +} SignalBridgeMfaVerificationCredentialFfiArg_Tag; +typedef struct { + int32_t password; +} SignalBridgeMfaVerificationCredentialFfiArgSignalTotp_Body; +typedef struct { + const int8_t* json; +} SignalBridgeMfaVerificationCredentialFfiArgSignalWebAuthn_Body; +typedef struct { + SignalBridgeMfaVerificationCredentialFfiArg_Tag tag; + union { + SignalBridgeMfaVerificationCredentialFfiArgSignalTotp_Body totp; + SignalBridgeMfaVerificationCredentialFfiArgSignalWebAuthn_Body web_authn; + }; +} SignalBridgeMfaVerificationCredentialFfiArg; +static_assert_64bit(sizeof(SignalBridgeMfaVerificationCredentialFfiArg) == 16); +static_assert_64bit(alignof(SignalBridgeMfaVerificationCredentialFfiArg) == 8); typedef struct { bool user_satisfied; SignalBorrowedSliceOfCStringPtr call_quality_issues; @@ -3761,6 +3915,23 @@ SignalFfiError* signal_authenticated_chat_connection_disconnect( SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat ); +SignalFfiError* signal_authenticated_chat_connection_finish_mfa_verification( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + SignalBridgeMfaVerificationCredentialFfiArg credential +); +SignalFfiError* signal_authenticated_chat_connection_finish_web_authn_registration( + SignalCPromisei32* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + SignalBorrowedBuffer attestation_object, + const int8_t* collected_client_data_json, + const int8_t* name, + uint64_t created_at, + const SignalType_FixedArray32_uint8_t* svr_key, + int64_t rng +); SignalFfiError* signal_authenticated_chat_connection_generate_totp_key( SignalCPromiseBridgePendingTotpKeyFfiResult* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3884,6 +4055,15 @@ SignalFfiError* signal_authenticated_chat_connection_set_discoverable_by_phone_n SignalConstPointerAuthenticatedChatConnection chat, bool discoverable ); +SignalFfiError* signal_authenticated_chat_connection_set_last_resort_kem_pre_key( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + uint8_t identity_type, + uint32_t id, + SignalConstPointerKyberPublicKey key, + SignalBorrowedBuffer signature +); SignalFfiError* signal_authenticated_chat_connection_set_mfa_key_metadata( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3894,6 +4074,23 @@ SignalFfiError* signal_authenticated_chat_connection_set_mfa_key_metadata( const SignalType_FixedArray32_uint8_t* svr_key, int64_t rng ); +SignalFfiError* signal_authenticated_chat_connection_set_one_time_ec_pre_keys( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + uint8_t identity_type, + SignalBorrowedSliceOfu32 pre_key_ids, + SignalBorrowedSliceOfConstPointerPublicKey pre_key_data +); +SignalFfiError* signal_authenticated_chat_connection_set_one_time_kem_pre_keys( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + uint8_t identity_type, + SignalBorrowedSliceOfu32 pre_key_ids, + SignalBorrowedSliceOfConstPointerKyberPublicKey pre_key_data, + SignalBorrowedSliceOfBuffers pre_key_signatures +); SignalFfiError* signal_authenticated_chat_connection_set_push_token_apns( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3912,6 +4109,15 @@ SignalFfiError* signal_authenticated_chat_connection_set_registration_recovery_p SignalConstPointerAuthenticatedChatConnection chat, const SignalType_FixedArray32_uint8_t* svr_key ); +SignalFfiError* signal_authenticated_chat_connection_set_signed_ec_pre_key( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + uint8_t identity_type, + uint32_t id, + SignalConstPointerPublicKey key, + SignalBorrowedBuffer signature +); SignalFfiError* signal_authenticated_chat_connection_set_username_link( SignalCPromiseUuid* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3919,6 +4125,16 @@ SignalFfiError* signal_authenticated_chat_connection_set_username_link( SignalBorrowedBuffer username_ciphertext, bool keep_link_handle ); +SignalFfiError* signal_authenticated_chat_connection_start_mfa_verification( + SignalCPromiseStartMfaVerificationResponseFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); +SignalFfiError* signal_authenticated_chat_connection_start_web_authn_registration( + SignalCPromiseBridgeWebAuthnCreateParametersFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); SignalFfiError* signal_avatar_upload_credential_check_valid_contents( SignalBorrowedBuffer credential_bytes ); @@ -4052,6 +4268,26 @@ SignalFfiError* signal_backup_auth_credential_request_issue_deterministic( SignalFfiError* signal_backup_auth_credential_response_check_valid_contents( SignalBorrowedBuffer response_bytes ); +SignalFfiError* signal_backup_json_exporter_destroy( + SignalMutPointerBackupJsonExporter p +); +SignalFfiError* signal_backup_json_exporter_export_frames( + SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr* out, + SignalMutPointerBackupJsonExporter exporter, + SignalBorrowedBuffer frames +); +SignalFfiError* signal_backup_json_exporter_finish( + SignalMutPointerBackupJsonExporter exporter +); +SignalFfiError* signal_backup_json_exporter_get_initial_chunk( + SignalCStringPtr* out, + SignalConstPointerBackupJsonExporter exporter +); +SignalFfiError* signal_backup_json_exporter_new( + SignalMutPointerBackupJsonExporter* out, + SignalBorrowedBuffer backup_info, + bool should_validate +); SignalFfiError* signal_backup_key_derive_backup_id( SignalType_FixedArray16_uint8_t* out, const SignalType_FixedArray32_uint8_t* backup_key, diff --git a/pkg/libsignalgo/signalversion/version.go b/pkg/libsignalgo/signalversion/version.go index d66cd3e..0ae11dc 100644 --- a/pkg/libsignalgo/signalversion/version.go +++ b/pkg/libsignalgo/signalversion/version.go @@ -2,4 +2,4 @@ package signalversion -const Version = "v0.102.2" +const Version = "v0.103.1" From c2099f55d530902e05766c7d971224625ed22cab Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 1 Oct 2026 18:12:17 +0300 Subject: [PATCH 08/84] signalmeow: update protobufs --- pkg/signalmeow/protobuf/backuppb/Backup.pb.go | 1313 ++++++++------ pkg/signalmeow/protobuf/backuppb/Backup.proto | 47 +- .../protobuf/org/signal/chat/account.proto | 193 +- .../protobuf/org/signal/chat/backups.proto | 10 + .../protobuf/org/signal/chat/challenge.proto | 59 +- .../org/signal/chat/credentials.proto | 24 +- .../protobuf/org/signal/chat/messages.proto | 18 + .../org/signal/chat/one_time_donations.proto | 9 +- .../signal/chat/product_configuration.proto | 2 + .../protobuf/org/signal/chat/profile.proto | 25 + .../org/signal/chat/subscriptions.proto | 99 +- .../protobuf/rpc/account/account.pb.go | 1551 +++++++++++++---- .../protobuf/rpc/account/account_grpc.pb.go | 278 ++- .../protobuf/rpc/backups/backups.pb.go | 567 +++--- .../protobuf/rpc/backups/backups_grpc.pb.go | 41 + .../protobuf/rpc/challenge/challenge.pb.go | 223 ++- .../rpc/challenge/challenge_grpc.pb.go | 130 +- .../rpc/credentials/credentials.pb.go | 167 +- .../rpc/credentials/credentials_grpc.pb.go | 30 +- .../protobuf/rpc/messages/messages.pb.go | 220 ++- .../protobuf/rpc/messages/messages_grpc.pb.go | 40 + .../one_time_donations_grpc.pb.go | 18 +- .../product_configuration.pb.go | 14 +- .../protobuf/rpc/profile/profile.pb.go | 453 +++-- .../protobuf/rpc/profile/profile_grpc.pb.go | 56 + .../rpc/subscriptions/subscriptions.pb.go | 493 ++---- .../subscriptions/subscriptions_grpc.pb.go | 24 +- .../protobuf/signalpb/SignalService.pb.go | 523 +++--- .../protobuf/signalpb/SignalService.proto | 17 +- .../protobuf/signalpb/StorageService.pb.go | 92 +- .../protobuf/signalpb/StorageService.proto | 3 +- pkg/signalmeow/protobuf/update-protos.sh | 2 +- 32 files changed, 4446 insertions(+), 2295 deletions(-) diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.pb.go b/pkg/signalmeow/protobuf/backuppb/Backup.pb.go index bcff3bd..1e8292d 100644 --- a/pkg/signalmeow/protobuf/backuppb/Backup.pb.go +++ b/pkg/signalmeow/protobuf/backuppb/Backup.pb.go @@ -1229,7 +1229,7 @@ func (x ContactAttachment_Phone_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ContactAttachment_Phone_Type.Descriptor instead. func (ContactAttachment_Phone_Type) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 1, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 2, 0} } type ContactAttachment_Email_Type int32 @@ -1284,7 +1284,7 @@ func (x ContactAttachment_Email_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ContactAttachment_Email_Type.Descriptor instead. func (ContactAttachment_Email_Type) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 2, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 3, 0} } type ContactAttachment_PostalAddress_Type int32 @@ -1336,7 +1336,7 @@ func (x ContactAttachment_PostalAddress_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ContactAttachment_PostalAddress_Type.Descriptor instead. func (ContactAttachment_PostalAddress_Type) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 3, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 4, 0} } // Similar to SignalService.AttachmentPointer.Flags, @@ -2455,6 +2455,7 @@ type AccountData struct { AndroidSpecificSettings *AccountData_AndroidSpecificSettings `protobuf:"bytes,12,opt,name=androidSpecificSettings,proto3" json:"androidSpecificSettings,omitempty"` BioText string `protobuf:"bytes,13,opt,name=bioText,proto3" json:"bioText,omitempty"` BioEmoji string `protobuf:"bytes,14,opt,name=bioEmoji,proto3" json:"bioEmoji,omitempty"` + IosSpecificSettings *AccountData_IOSSpecificSettings `protobuf:"bytes,16,opt,name=iosSpecificSettings,proto3" json:"iosSpecificSettings,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2580,6 +2581,13 @@ func (x *AccountData) GetBioEmoji() string { return "" } +func (x *AccountData) GetIosSpecificSettings() *AccountData_IOSSpecificSettings { + if x != nil { + return x.IosSpecificSettings + } + return nil +} + type Recipient struct { state protoimpl.MessageState `protogen:"open.v1"` Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // generated id for reference only within this file @@ -2750,22 +2758,24 @@ type Contact struct { // // *Contact_Registered_ // *Contact_NotRegistered_ - Registration isContact_Registration `protobuf_oneof:"registration"` - ProfileKey []byte `protobuf:"bytes,9,opt,name=profileKey,proto3,oneof" json:"profileKey,omitempty"` - ProfileSharing bool `protobuf:"varint,10,opt,name=profileSharing,proto3" json:"profileSharing,omitempty"` - ProfileGivenName *string `protobuf:"bytes,11,opt,name=profileGivenName,proto3,oneof" json:"profileGivenName,omitempty"` - ProfileFamilyName *string `protobuf:"bytes,12,opt,name=profileFamilyName,proto3,oneof" json:"profileFamilyName,omitempty"` - HideStory bool `protobuf:"varint,13,opt,name=hideStory,proto3" json:"hideStory,omitempty"` - IdentityKey []byte `protobuf:"bytes,14,opt,name=identityKey,proto3,oneof" json:"identityKey,omitempty"` - IdentityState Contact_IdentityState `protobuf:"varint,15,opt,name=identityState,proto3,enum=signal.backup.Contact_IdentityState" json:"identityState,omitempty"` - Nickname *Contact_Name `protobuf:"bytes,16,opt,name=nickname,proto3" json:"nickname,omitempty"` // absent iff both `given` and `family` are empty - Note string `protobuf:"bytes,17,opt,name=note,proto3" json:"note,omitempty"` - SystemGivenName string `protobuf:"bytes,18,opt,name=systemGivenName,proto3" json:"systemGivenName,omitempty"` - SystemFamilyName string `protobuf:"bytes,19,opt,name=systemFamilyName,proto3" json:"systemFamilyName,omitempty"` - SystemNickname string `protobuf:"bytes,20,opt,name=systemNickname,proto3" json:"systemNickname,omitempty"` - AvatarColor *AvatarColor `protobuf:"varint,21,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` - KeyTransparencyData []byte `protobuf:"bytes,22,opt,name=keyTransparencyData,proto3,oneof" json:"keyTransparencyData,omitempty"` - BlockedAtTimestamp uint64 `protobuf:"varint,23,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // if `blocked` is true, 0 means unknown block time + Registration isContact_Registration `protobuf_oneof:"registration"` + ProfileKey []byte `protobuf:"bytes,9,opt,name=profileKey,proto3,oneof" json:"profileKey,omitempty"` + ProfileSharing bool `protobuf:"varint,10,opt,name=profileSharing,proto3" json:"profileSharing,omitempty"` + ProfileGivenName *string `protobuf:"bytes,11,opt,name=profileGivenName,proto3,oneof" json:"profileGivenName,omitempty"` + ProfileFamilyName *string `protobuf:"bytes,12,opt,name=profileFamilyName,proto3,oneof" json:"profileFamilyName,omitempty"` + HideStory bool `protobuf:"varint,13,opt,name=hideStory,proto3" json:"hideStory,omitempty"` + IdentityKey []byte `protobuf:"bytes,14,opt,name=identityKey,proto3,oneof" json:"identityKey,omitempty"` + IdentityState Contact_IdentityState `protobuf:"varint,15,opt,name=identityState,proto3,enum=signal.backup.Contact_IdentityState" json:"identityState,omitempty"` + Nickname *Contact_Name `protobuf:"bytes,16,opt,name=nickname,proto3" json:"nickname,omitempty"` // absent iff both `given` and `family` are empty + Note string `protobuf:"bytes,17,opt,name=note,proto3" json:"note,omitempty"` + SystemGivenName string `protobuf:"bytes,18,opt,name=systemGivenName,proto3" json:"systemGivenName,omitempty"` + SystemFamilyName string `protobuf:"bytes,19,opt,name=systemFamilyName,proto3" json:"systemFamilyName,omitempty"` + SystemNickname string `protobuf:"bytes,20,opt,name=systemNickname,proto3" json:"systemNickname,omitempty"` + AvatarColor *AvatarColor `protobuf:"varint,21,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` + // Opaque blob containing key transparency data for the contact + KeyTransparencyData []byte `protobuf:"bytes,22,opt,name=keyTransparencyData,proto3,oneof" json:"keyTransparencyData,omitempty"` + BlockedAtTimestamp uint64 `protobuf:"varint,23,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // if `blocked` is true, 0 means unknown block time + SharedName *Contact_Name `protobuf:"bytes,24,opt,name=sharedName,proto3" json:"sharedName,omitempty"` // absent iff both `given` and `family` are empty, name provided by third party unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2972,6 +2982,13 @@ func (x *Contact) GetBlockedAtTimestamp() uint64 { return 0 } +func (x *Contact) GetSharedName() *Contact_Name { + if x != nil { + return x.SharedName + } + return nil +} + type isContact_Registration interface { isContact_Registration() } @@ -4627,6 +4644,9 @@ type ContactAttachment struct { Address []*ContactAttachment_PostalAddress `protobuf:"bytes,5,rep,name=address,proto3" json:"address,omitempty"` Avatar *FilePointer `protobuf:"bytes,6,opt,name=avatar,proto3,oneof" json:"avatar,omitempty"` Organization string `protobuf:"bytes,7,opt,name=organization,proto3" json:"organization,omitempty"` + Aci []byte `protobuf:"bytes,8,opt,name=aci,proto3" json:"aci,omitempty"` // should be 16 bytes + Nickname *ContactAttachment_SignalNickname `protobuf:"bytes,9,opt,name=nickname,proto3,oneof" json:"nickname,omitempty"` // absent iff both `given` and `family` are empty + Note string `protobuf:"bytes,10,opt,name=note,proto3" json:"note,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -4703,6 +4723,27 @@ func (x *ContactAttachment) GetOrganization() string { return "" } +func (x *ContactAttachment) GetAci() []byte { + if x != nil { + return x.Aci + } + return nil +} + +func (x *ContactAttachment) GetNickname() *ContactAttachment_SignalNickname { + if x != nil { + return x.Nickname + } + return nil +} + +func (x *ContactAttachment) GetNote() string { + if x != nil { + return x.Note + } + return "" +} + type StickerMessage struct { state protoimpl.MessageState `protogen:"open.v1"` Sticker *Sticker `protobuf:"bytes,1,opt,name=sticker,proto3" json:"sticker,omitempty"` @@ -5031,8 +5072,13 @@ type FilePointer struct { Caption *string `protobuf:"bytes,10,opt,name=caption,proto3,oneof" json:"caption,omitempty"` BlurHash *string `protobuf:"bytes,11,opt,name=blurHash,proto3,oneof" json:"blurHash,omitempty"` LocatorInfo *FilePointer_LocatorInfo `protobuf:"bytes,13,opt,name=locatorInfo,proto3" json:"locatorInfo,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Waveform for audio attachments. Each byte represents a "bar" in the + // waveform, with 0 as silence 255 as loudest. At most 100 bytes/bars. + AudioWaveform []byte `protobuf:"bytes,14,opt,name=audioWaveform,proto3,oneof" json:"audioWaveform,omitempty"` + // Duration of an audio attachment, in seconds. + AudioDurationSeconds *float32 `protobuf:"fixed32,15,opt,name=audioDurationSeconds,proto3,oneof" json:"audioDurationSeconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FilePointer) Reset() { @@ -5128,6 +5174,20 @@ func (x *FilePointer) GetLocatorInfo() *FilePointer_LocatorInfo { return nil } +func (x *FilePointer) GetAudioWaveform() []byte { + if x != nil { + return x.AudioWaveform + } + return nil +} + +func (x *FilePointer) GetAudioDurationSeconds() float32 { + if x != nil && x.AudioDurationSeconds != nil { + return *x.AudioDurationSeconds + } + return 0 +} + type Quote struct { state protoimpl.MessageState `protogen:"open.v1"` TargetSentTimestamp *uint64 `protobuf:"varint,1,opt,name=targetSentTimestamp,proto3,oneof" json:"targetSentTimestamp,omitempty"` // null if the target message could not be found at time of quote insert @@ -6050,6 +6110,7 @@ type LearnedProfileChatUpdate struct { // // *LearnedProfileChatUpdate_E164 // *LearnedProfileChatUpdate_Username + // *LearnedProfileChatUpdate_SharedName PreviousName isLearnedProfileChatUpdate_PreviousName `protobuf_oneof:"previousName"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -6110,6 +6171,15 @@ func (x *LearnedProfileChatUpdate) GetUsername() string { return "" } +func (x *LearnedProfileChatUpdate) GetSharedName() string { + if x != nil { + if x, ok := x.PreviousName.(*LearnedProfileChatUpdate_SharedName); ok { + return x.SharedName + } + } + return "" +} + type isLearnedProfileChatUpdate_PreviousName interface { isLearnedProfileChatUpdate_PreviousName() } @@ -6122,10 +6192,16 @@ type LearnedProfileChatUpdate_Username struct { Username string `protobuf:"bytes,2,opt,name=username,proto3,oneof"` } +type LearnedProfileChatUpdate_SharedName struct { + SharedName string `protobuf:"bytes,3,opt,name=sharedName,proto3,oneof"` +} + func (*LearnedProfileChatUpdate_E164) isLearnedProfileChatUpdate_PreviousName() {} func (*LearnedProfileChatUpdate_Username) isLearnedProfileChatUpdate_PreviousName() {} +func (*LearnedProfileChatUpdate_SharedName) isLearnedProfileChatUpdate_PreviousName() {} + type ThreadMergeChatUpdate struct { state protoimpl.MessageState `protogen:"open.v1"` PreviousE164 uint64 `protobuf:"varint,1,opt,name=previousE164,proto3" json:"previousE164,omitempty"` @@ -6558,58 +6634,6 @@ func (x *GroupMembershipAccessLevelChangeUpdate) GetAccessLevel() GroupV2AccessL return GroupV2AccessLevel_UNKNOWN } -type GroupAttributesAccessLevelChangeUpdate struct { - state protoimpl.MessageState `protogen:"open.v1"` - UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` - AccessLevel GroupV2AccessLevel `protobuf:"varint,2,opt,name=accessLevel,proto3,enum=signal.backup.GroupV2AccessLevel" json:"accessLevel,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GroupAttributesAccessLevelChangeUpdate) Reset() { - *x = GroupAttributesAccessLevelChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GroupAttributesAccessLevelChangeUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupAttributesAccessLevelChangeUpdate) ProtoMessage() {} - -func (x *GroupAttributesAccessLevelChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[50] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GroupAttributesAccessLevelChangeUpdate.ProtoReflect.Descriptor instead. -func (*GroupAttributesAccessLevelChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{50} -} - -func (x *GroupAttributesAccessLevelChangeUpdate) GetUpdaterAci() []byte { - if x != nil { - return x.UpdaterAci - } - return nil -} - -func (x *GroupAttributesAccessLevelChangeUpdate) GetAccessLevel() GroupV2AccessLevel { - if x != nil { - return x.AccessLevel - } - return GroupV2AccessLevel_UNKNOWN -} - type GroupMemberLabelAccessLevelChangeUpdate struct { state protoimpl.MessageState `protogen:"open.v1"` UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` @@ -6620,7 +6644,7 @@ type GroupMemberLabelAccessLevelChangeUpdate struct { func (x *GroupMemberLabelAccessLevelChangeUpdate) Reset() { *x = GroupMemberLabelAccessLevelChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[51] + mi := &file_backuppb_Backup_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6632,7 +6656,7 @@ func (x *GroupMemberLabelAccessLevelChangeUpdate) String() string { func (*GroupMemberLabelAccessLevelChangeUpdate) ProtoMessage() {} func (x *GroupMemberLabelAccessLevelChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[51] + mi := &file_backuppb_Backup_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6645,7 +6669,7 @@ func (x *GroupMemberLabelAccessLevelChangeUpdate) ProtoReflect() protoreflect.Me // Deprecated: Use GroupMemberLabelAccessLevelChangeUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberLabelAccessLevelChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{51} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{50} } func (x *GroupMemberLabelAccessLevelChangeUpdate) GetUpdaterAci() []byte { @@ -6662,28 +6686,29 @@ func (x *GroupMemberLabelAccessLevelChangeUpdate) GetAccessLevel() GroupV2Access return GroupV2AccessLevel_UNKNOWN } -type GroupTerminateChangeUpdate struct { +type GroupAttributesAccessLevelChangeUpdate struct { state protoimpl.MessageState `protogen:"open.v1"` UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` + AccessLevel GroupV2AccessLevel `protobuf:"varint,2,opt,name=accessLevel,proto3,enum=signal.backup.GroupV2AccessLevel" json:"accessLevel,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GroupTerminateChangeUpdate) Reset() { - *x = GroupTerminateChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[52] +func (x *GroupAttributesAccessLevelChangeUpdate) Reset() { + *x = GroupAttributesAccessLevelChangeUpdate{} + mi := &file_backuppb_Backup_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GroupTerminateChangeUpdate) String() string { +func (x *GroupAttributesAccessLevelChangeUpdate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GroupTerminateChangeUpdate) ProtoMessage() {} +func (*GroupAttributesAccessLevelChangeUpdate) ProtoMessage() {} -func (x *GroupTerminateChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[52] +func (x *GroupAttributesAccessLevelChangeUpdate) ProtoReflect() protoreflect.Message { + mi := &file_backuppb_Backup_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6694,18 +6719,25 @@ func (x *GroupTerminateChangeUpdate) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GroupTerminateChangeUpdate.ProtoReflect.Descriptor instead. -func (*GroupTerminateChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{52} +// Deprecated: Use GroupAttributesAccessLevelChangeUpdate.ProtoReflect.Descriptor instead. +func (*GroupAttributesAccessLevelChangeUpdate) Descriptor() ([]byte, []int) { + return file_backuppb_Backup_proto_rawDescGZIP(), []int{51} } -func (x *GroupTerminateChangeUpdate) GetUpdaterAci() []byte { +func (x *GroupAttributesAccessLevelChangeUpdate) GetUpdaterAci() []byte { if x != nil { return x.UpdaterAci } return nil } +func (x *GroupAttributesAccessLevelChangeUpdate) GetAccessLevel() GroupV2AccessLevel { + if x != nil { + return x.AccessLevel + } + return GroupV2AccessLevel_UNKNOWN +} + type GroupAnnouncementOnlyChangeUpdate struct { state protoimpl.MessageState `protogen:"open.v1"` UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` @@ -6716,7 +6748,7 @@ type GroupAnnouncementOnlyChangeUpdate struct { func (x *GroupAnnouncementOnlyChangeUpdate) Reset() { *x = GroupAnnouncementOnlyChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[53] + mi := &file_backuppb_Backup_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6728,7 +6760,7 @@ func (x *GroupAnnouncementOnlyChangeUpdate) String() string { func (*GroupAnnouncementOnlyChangeUpdate) ProtoMessage() {} func (x *GroupAnnouncementOnlyChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[53] + mi := &file_backuppb_Backup_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6741,7 +6773,7 @@ func (x *GroupAnnouncementOnlyChangeUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use GroupAnnouncementOnlyChangeUpdate.ProtoReflect.Descriptor instead. func (*GroupAnnouncementOnlyChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{53} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{52} } func (x *GroupAnnouncementOnlyChangeUpdate) GetUpdaterAci() []byte { @@ -6770,7 +6802,7 @@ type GroupAdminStatusUpdate struct { func (x *GroupAdminStatusUpdate) Reset() { *x = GroupAdminStatusUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[54] + mi := &file_backuppb_Backup_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6782,7 +6814,7 @@ func (x *GroupAdminStatusUpdate) String() string { func (*GroupAdminStatusUpdate) ProtoMessage() {} func (x *GroupAdminStatusUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[54] + mi := &file_backuppb_Backup_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6795,7 +6827,7 @@ func (x *GroupAdminStatusUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupAdminStatusUpdate.ProtoReflect.Descriptor instead. func (*GroupAdminStatusUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{54} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{53} } func (x *GroupAdminStatusUpdate) GetUpdaterAci() []byte { @@ -6828,7 +6860,7 @@ type GroupMemberLeftUpdate struct { func (x *GroupMemberLeftUpdate) Reset() { *x = GroupMemberLeftUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[55] + mi := &file_backuppb_Backup_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6840,7 +6872,7 @@ func (x *GroupMemberLeftUpdate) String() string { func (*GroupMemberLeftUpdate) ProtoMessage() {} func (x *GroupMemberLeftUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[55] + mi := &file_backuppb_Backup_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6853,7 +6885,7 @@ func (x *GroupMemberLeftUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberLeftUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberLeftUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{55} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{54} } func (x *GroupMemberLeftUpdate) GetAci() []byte { @@ -6873,7 +6905,7 @@ type GroupMemberRemovedUpdate struct { func (x *GroupMemberRemovedUpdate) Reset() { *x = GroupMemberRemovedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[56] + mi := &file_backuppb_Backup_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6885,7 +6917,7 @@ func (x *GroupMemberRemovedUpdate) String() string { func (*GroupMemberRemovedUpdate) ProtoMessage() {} func (x *GroupMemberRemovedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[56] + mi := &file_backuppb_Backup_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6898,7 +6930,7 @@ func (x *GroupMemberRemovedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberRemovedUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberRemovedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{56} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{55} } func (x *GroupMemberRemovedUpdate) GetRemoverAci() []byte { @@ -6924,7 +6956,7 @@ type SelfInvitedToGroupUpdate struct { func (x *SelfInvitedToGroupUpdate) Reset() { *x = SelfInvitedToGroupUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[57] + mi := &file_backuppb_Backup_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6936,7 +6968,7 @@ func (x *SelfInvitedToGroupUpdate) String() string { func (*SelfInvitedToGroupUpdate) ProtoMessage() {} func (x *SelfInvitedToGroupUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[57] + mi := &file_backuppb_Backup_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6949,7 +6981,7 @@ func (x *SelfInvitedToGroupUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SelfInvitedToGroupUpdate.ProtoReflect.Descriptor instead. func (*SelfInvitedToGroupUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{57} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{56} } func (x *SelfInvitedToGroupUpdate) GetInviterAci() []byte { @@ -6969,7 +7001,7 @@ type SelfInvitedOtherUserToGroupUpdate struct { func (x *SelfInvitedOtherUserToGroupUpdate) Reset() { *x = SelfInvitedOtherUserToGroupUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[58] + mi := &file_backuppb_Backup_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6981,7 +7013,7 @@ func (x *SelfInvitedOtherUserToGroupUpdate) String() string { func (*SelfInvitedOtherUserToGroupUpdate) ProtoMessage() {} func (x *SelfInvitedOtherUserToGroupUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[58] + mi := &file_backuppb_Backup_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6994,7 +7026,7 @@ func (x *SelfInvitedOtherUserToGroupUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use SelfInvitedOtherUserToGroupUpdate.ProtoReflect.Descriptor instead. func (*SelfInvitedOtherUserToGroupUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{58} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{57} } func (x *SelfInvitedOtherUserToGroupUpdate) GetInviteeServiceId() []byte { @@ -7015,7 +7047,7 @@ type GroupUnknownInviteeUpdate struct { func (x *GroupUnknownInviteeUpdate) Reset() { *x = GroupUnknownInviteeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[59] + mi := &file_backuppb_Backup_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7027,7 +7059,7 @@ func (x *GroupUnknownInviteeUpdate) String() string { func (*GroupUnknownInviteeUpdate) ProtoMessage() {} func (x *GroupUnknownInviteeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[59] + mi := &file_backuppb_Backup_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7040,7 +7072,7 @@ func (x *GroupUnknownInviteeUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupUnknownInviteeUpdate.ProtoReflect.Descriptor instead. func (*GroupUnknownInviteeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{59} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{58} } func (x *GroupUnknownInviteeUpdate) GetInviterAci() []byte { @@ -7067,7 +7099,7 @@ type GroupInvitationAcceptedUpdate struct { func (x *GroupInvitationAcceptedUpdate) Reset() { *x = GroupInvitationAcceptedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[60] + mi := &file_backuppb_Backup_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7079,7 +7111,7 @@ func (x *GroupInvitationAcceptedUpdate) String() string { func (*GroupInvitationAcceptedUpdate) ProtoMessage() {} func (x *GroupInvitationAcceptedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[60] + mi := &file_backuppb_Backup_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7092,7 +7124,7 @@ func (x *GroupInvitationAcceptedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInvitationAcceptedUpdate.ProtoReflect.Descriptor instead. func (*GroupInvitationAcceptedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{60} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{59} } func (x *GroupInvitationAcceptedUpdate) GetInviterAci() []byte { @@ -7120,7 +7152,7 @@ type GroupInvitationDeclinedUpdate struct { func (x *GroupInvitationDeclinedUpdate) Reset() { *x = GroupInvitationDeclinedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[61] + mi := &file_backuppb_Backup_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7132,7 +7164,7 @@ func (x *GroupInvitationDeclinedUpdate) String() string { func (*GroupInvitationDeclinedUpdate) ProtoMessage() {} func (x *GroupInvitationDeclinedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[61] + mi := &file_backuppb_Backup_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7145,7 +7177,7 @@ func (x *GroupInvitationDeclinedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInvitationDeclinedUpdate.ProtoReflect.Descriptor instead. func (*GroupInvitationDeclinedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{61} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{60} } func (x *GroupInvitationDeclinedUpdate) GetInviterAci() []byte { @@ -7171,7 +7203,7 @@ type GroupMemberJoinedUpdate struct { func (x *GroupMemberJoinedUpdate) Reset() { *x = GroupMemberJoinedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[62] + mi := &file_backuppb_Backup_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7183,7 +7215,7 @@ func (x *GroupMemberJoinedUpdate) String() string { func (*GroupMemberJoinedUpdate) ProtoMessage() {} func (x *GroupMemberJoinedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[62] + mi := &file_backuppb_Backup_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7196,7 +7228,7 @@ func (x *GroupMemberJoinedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberJoinedUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberJoinedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{62} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{61} } func (x *GroupMemberJoinedUpdate) GetNewMemberAci() []byte { @@ -7219,7 +7251,7 @@ type GroupMemberAddedUpdate struct { func (x *GroupMemberAddedUpdate) Reset() { *x = GroupMemberAddedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[63] + mi := &file_backuppb_Backup_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7231,7 +7263,7 @@ func (x *GroupMemberAddedUpdate) String() string { func (*GroupMemberAddedUpdate) ProtoMessage() {} func (x *GroupMemberAddedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[63] + mi := &file_backuppb_Backup_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7244,7 +7276,7 @@ func (x *GroupMemberAddedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberAddedUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberAddedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{63} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{62} } func (x *GroupMemberAddedUpdate) GetUpdaterAci() []byte { @@ -7285,7 +7317,7 @@ type GroupSelfInvitationRevokedUpdate struct { func (x *GroupSelfInvitationRevokedUpdate) Reset() { *x = GroupSelfInvitationRevokedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[64] + mi := &file_backuppb_Backup_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7297,7 +7329,7 @@ func (x *GroupSelfInvitationRevokedUpdate) String() string { func (*GroupSelfInvitationRevokedUpdate) ProtoMessage() {} func (x *GroupSelfInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[64] + mi := &file_backuppb_Backup_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7310,7 +7342,7 @@ func (x *GroupSelfInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupSelfInvitationRevokedUpdate.ProtoReflect.Descriptor instead. func (*GroupSelfInvitationRevokedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{64} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{63} } func (x *GroupSelfInvitationRevokedUpdate) GetRevokerAci() []byte { @@ -7336,7 +7368,7 @@ type GroupInvitationRevokedUpdate struct { func (x *GroupInvitationRevokedUpdate) Reset() { *x = GroupInvitationRevokedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[65] + mi := &file_backuppb_Backup_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7348,7 +7380,7 @@ func (x *GroupInvitationRevokedUpdate) String() string { func (*GroupInvitationRevokedUpdate) ProtoMessage() {} func (x *GroupInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[65] + mi := &file_backuppb_Backup_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7361,7 +7393,7 @@ func (x *GroupInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInvitationRevokedUpdate.ProtoReflect.Descriptor instead. func (*GroupInvitationRevokedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{65} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{64} } func (x *GroupInvitationRevokedUpdate) GetUpdaterAci() []byte { @@ -7387,7 +7419,7 @@ type GroupJoinRequestUpdate struct { func (x *GroupJoinRequestUpdate) Reset() { *x = GroupJoinRequestUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[66] + mi := &file_backuppb_Backup_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7399,7 +7431,7 @@ func (x *GroupJoinRequestUpdate) String() string { func (*GroupJoinRequestUpdate) ProtoMessage() {} func (x *GroupJoinRequestUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[66] + mi := &file_backuppb_Backup_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7412,7 +7444,7 @@ func (x *GroupJoinRequestUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinRequestUpdate.ProtoReflect.Descriptor instead. func (*GroupJoinRequestUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{66} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{65} } func (x *GroupJoinRequestUpdate) GetRequestorAci() []byte { @@ -7434,7 +7466,7 @@ type GroupJoinRequestApprovalUpdate struct { func (x *GroupJoinRequestApprovalUpdate) Reset() { *x = GroupJoinRequestApprovalUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[67] + mi := &file_backuppb_Backup_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7446,7 +7478,7 @@ func (x *GroupJoinRequestApprovalUpdate) String() string { func (*GroupJoinRequestApprovalUpdate) ProtoMessage() {} func (x *GroupJoinRequestApprovalUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[67] + mi := &file_backuppb_Backup_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7459,7 +7491,7 @@ func (x *GroupJoinRequestApprovalUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinRequestApprovalUpdate.ProtoReflect.Descriptor instead. func (*GroupJoinRequestApprovalUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{67} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{66} } func (x *GroupJoinRequestApprovalUpdate) GetRequestorAci() []byte { @@ -7492,7 +7524,7 @@ type GroupJoinRequestCanceledUpdate struct { func (x *GroupJoinRequestCanceledUpdate) Reset() { *x = GroupJoinRequestCanceledUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[68] + mi := &file_backuppb_Backup_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7504,7 +7536,7 @@ func (x *GroupJoinRequestCanceledUpdate) String() string { func (*GroupJoinRequestCanceledUpdate) ProtoMessage() {} func (x *GroupJoinRequestCanceledUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[68] + mi := &file_backuppb_Backup_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7517,7 +7549,7 @@ func (x *GroupJoinRequestCanceledUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinRequestCanceledUpdate.ProtoReflect.Descriptor instead. func (*GroupJoinRequestCanceledUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{68} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{67} } func (x *GroupJoinRequestCanceledUpdate) GetRequestorAci() []byte { @@ -7543,7 +7575,7 @@ type GroupSequenceOfRequestsAndCancelsUpdate struct { func (x *GroupSequenceOfRequestsAndCancelsUpdate) Reset() { *x = GroupSequenceOfRequestsAndCancelsUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[69] + mi := &file_backuppb_Backup_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7555,7 +7587,7 @@ func (x *GroupSequenceOfRequestsAndCancelsUpdate) String() string { func (*GroupSequenceOfRequestsAndCancelsUpdate) ProtoMessage() {} func (x *GroupSequenceOfRequestsAndCancelsUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[69] + mi := &file_backuppb_Backup_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7568,7 +7600,7 @@ func (x *GroupSequenceOfRequestsAndCancelsUpdate) ProtoReflect() protoreflect.Me // Deprecated: Use GroupSequenceOfRequestsAndCancelsUpdate.ProtoReflect.Descriptor instead. func (*GroupSequenceOfRequestsAndCancelsUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{69} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{68} } func (x *GroupSequenceOfRequestsAndCancelsUpdate) GetRequestorAci() []byte { @@ -7594,7 +7626,7 @@ type GroupInviteLinkResetUpdate struct { func (x *GroupInviteLinkResetUpdate) Reset() { *x = GroupInviteLinkResetUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[70] + mi := &file_backuppb_Backup_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7606,7 +7638,7 @@ func (x *GroupInviteLinkResetUpdate) String() string { func (*GroupInviteLinkResetUpdate) ProtoMessage() {} func (x *GroupInviteLinkResetUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[70] + mi := &file_backuppb_Backup_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7619,7 +7651,7 @@ func (x *GroupInviteLinkResetUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLinkResetUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkResetUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{70} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{69} } func (x *GroupInviteLinkResetUpdate) GetUpdaterAci() []byte { @@ -7639,7 +7671,7 @@ type GroupInviteLinkEnabledUpdate struct { func (x *GroupInviteLinkEnabledUpdate) Reset() { *x = GroupInviteLinkEnabledUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[71] + mi := &file_backuppb_Backup_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7651,7 +7683,7 @@ func (x *GroupInviteLinkEnabledUpdate) String() string { func (*GroupInviteLinkEnabledUpdate) ProtoMessage() {} func (x *GroupInviteLinkEnabledUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[71] + mi := &file_backuppb_Backup_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7664,7 +7696,7 @@ func (x *GroupInviteLinkEnabledUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLinkEnabledUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkEnabledUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{71} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{70} } func (x *GroupInviteLinkEnabledUpdate) GetUpdaterAci() []byte { @@ -7691,7 +7723,7 @@ type GroupInviteLinkAdminApprovalUpdate struct { func (x *GroupInviteLinkAdminApprovalUpdate) Reset() { *x = GroupInviteLinkAdminApprovalUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[72] + mi := &file_backuppb_Backup_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7703,7 +7735,7 @@ func (x *GroupInviteLinkAdminApprovalUpdate) String() string { func (*GroupInviteLinkAdminApprovalUpdate) ProtoMessage() {} func (x *GroupInviteLinkAdminApprovalUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[72] + mi := &file_backuppb_Backup_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7716,7 +7748,7 @@ func (x *GroupInviteLinkAdminApprovalUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use GroupInviteLinkAdminApprovalUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkAdminApprovalUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{72} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{71} } func (x *GroupInviteLinkAdminApprovalUpdate) GetUpdaterAci() []byte { @@ -7742,7 +7774,7 @@ type GroupInviteLinkDisabledUpdate struct { func (x *GroupInviteLinkDisabledUpdate) Reset() { *x = GroupInviteLinkDisabledUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[73] + mi := &file_backuppb_Backup_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7754,7 +7786,7 @@ func (x *GroupInviteLinkDisabledUpdate) String() string { func (*GroupInviteLinkDisabledUpdate) ProtoMessage() {} func (x *GroupInviteLinkDisabledUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[73] + mi := &file_backuppb_Backup_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7767,7 +7799,7 @@ func (x *GroupInviteLinkDisabledUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLinkDisabledUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkDisabledUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{73} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{72} } func (x *GroupInviteLinkDisabledUpdate) GetUpdaterAci() []byte { @@ -7786,7 +7818,7 @@ type GroupMemberJoinedByLinkUpdate struct { func (x *GroupMemberJoinedByLinkUpdate) Reset() { *x = GroupMemberJoinedByLinkUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[74] + mi := &file_backuppb_Backup_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7798,7 +7830,7 @@ func (x *GroupMemberJoinedByLinkUpdate) String() string { func (*GroupMemberJoinedByLinkUpdate) ProtoMessage() {} func (x *GroupMemberJoinedByLinkUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[74] + mi := &file_backuppb_Backup_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7811,7 +7843,7 @@ func (x *GroupMemberJoinedByLinkUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberJoinedByLinkUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberJoinedByLinkUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{74} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{73} } func (x *GroupMemberJoinedByLinkUpdate) GetNewMemberAci() []byte { @@ -7830,7 +7862,7 @@ type GroupV2MigrationUpdate struct { func (x *GroupV2MigrationUpdate) Reset() { *x = GroupV2MigrationUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[75] + mi := &file_backuppb_Backup_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7842,7 +7874,7 @@ func (x *GroupV2MigrationUpdate) String() string { func (*GroupV2MigrationUpdate) ProtoMessage() {} func (x *GroupV2MigrationUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[75] + mi := &file_backuppb_Backup_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7855,7 +7887,7 @@ func (x *GroupV2MigrationUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupV2MigrationUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{75} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{74} } // Another user migrated gv1->gv2 but was unable to add @@ -7868,7 +7900,7 @@ type GroupV2MigrationSelfInvitedUpdate struct { func (x *GroupV2MigrationSelfInvitedUpdate) Reset() { *x = GroupV2MigrationSelfInvitedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[76] + mi := &file_backuppb_Backup_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7880,7 +7912,7 @@ func (x *GroupV2MigrationSelfInvitedUpdate) String() string { func (*GroupV2MigrationSelfInvitedUpdate) ProtoMessage() {} func (x *GroupV2MigrationSelfInvitedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[76] + mi := &file_backuppb_Backup_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7893,7 +7925,7 @@ func (x *GroupV2MigrationSelfInvitedUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use GroupV2MigrationSelfInvitedUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationSelfInvitedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{76} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{75} } // The local user migrated gv1->gv2 but was unable to @@ -7908,7 +7940,7 @@ type GroupV2MigrationInvitedMembersUpdate struct { func (x *GroupV2MigrationInvitedMembersUpdate) Reset() { *x = GroupV2MigrationInvitedMembersUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[77] + mi := &file_backuppb_Backup_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7920,7 +7952,7 @@ func (x *GroupV2MigrationInvitedMembersUpdate) String() string { func (*GroupV2MigrationInvitedMembersUpdate) ProtoMessage() {} func (x *GroupV2MigrationInvitedMembersUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[77] + mi := &file_backuppb_Backup_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7933,7 +7965,7 @@ func (x *GroupV2MigrationInvitedMembersUpdate) ProtoReflect() protoreflect.Messa // Deprecated: Use GroupV2MigrationInvitedMembersUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationInvitedMembersUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{77} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{76} } func (x *GroupV2MigrationInvitedMembersUpdate) GetInvitedMembersCount() uint32 { @@ -7955,7 +7987,7 @@ type GroupV2MigrationDroppedMembersUpdate struct { func (x *GroupV2MigrationDroppedMembersUpdate) Reset() { *x = GroupV2MigrationDroppedMembersUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[78] + mi := &file_backuppb_Backup_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7967,7 +7999,7 @@ func (x *GroupV2MigrationDroppedMembersUpdate) String() string { func (*GroupV2MigrationDroppedMembersUpdate) ProtoMessage() {} func (x *GroupV2MigrationDroppedMembersUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[78] + mi := &file_backuppb_Backup_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7980,7 +8012,7 @@ func (x *GroupV2MigrationDroppedMembersUpdate) ProtoReflect() protoreflect.Messa // Deprecated: Use GroupV2MigrationDroppedMembersUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationDroppedMembersUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{78} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{77} } func (x *GroupV2MigrationDroppedMembersUpdate) GetDroppedMembersCount() uint32 { @@ -8001,7 +8033,7 @@ type GroupExpirationTimerUpdate struct { func (x *GroupExpirationTimerUpdate) Reset() { *x = GroupExpirationTimerUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[79] + mi := &file_backuppb_Backup_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8013,7 +8045,7 @@ func (x *GroupExpirationTimerUpdate) String() string { func (*GroupExpirationTimerUpdate) ProtoMessage() {} func (x *GroupExpirationTimerUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[79] + mi := &file_backuppb_Backup_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8026,7 +8058,7 @@ func (x *GroupExpirationTimerUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupExpirationTimerUpdate.ProtoReflect.Descriptor instead. func (*GroupExpirationTimerUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{79} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{78} } func (x *GroupExpirationTimerUpdate) GetExpiresInMs() uint64 { @@ -8043,6 +8075,50 @@ func (x *GroupExpirationTimerUpdate) GetUpdaterAci() []byte { return nil } +type GroupTerminateChangeUpdate struct { + state protoimpl.MessageState `protogen:"open.v1"` + UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupTerminateChangeUpdate) Reset() { + *x = GroupTerminateChangeUpdate{} + mi := &file_backuppb_Backup_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupTerminateChangeUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupTerminateChangeUpdate) ProtoMessage() {} + +func (x *GroupTerminateChangeUpdate) ProtoReflect() protoreflect.Message { + mi := &file_backuppb_Backup_proto_msgTypes[79] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupTerminateChangeUpdate.ProtoReflect.Descriptor instead. +func (*GroupTerminateChangeUpdate) Descriptor() ([]byte, []int) { + return file_backuppb_Backup_proto_rawDescGZIP(), []int{79} +} + +func (x *GroupTerminateChangeUpdate) GetUpdaterAci() []byte { + if x != nil { + return x.UpdaterAci + } + return nil +} + type PollTerminateUpdate struct { state protoimpl.MessageState `protogen:"open.v1"` TargetSentTimestamp uint64 `protobuf:"varint,1,opt,name=targetSentTimestamp,proto3" json:"targetSentTimestamp,omitempty"` @@ -9287,6 +9363,50 @@ func (x *AccountData_AndroidSpecificSettings) GetNavigationBarSize() AccountData return AccountData_AndroidSpecificSettings_UNKNOWN_BAR_SIZE } +type AccountData_IOSSpecificSettings struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsSystemCallLogEnabled bool `protobuf:"varint,1,opt,name=isSystemCallLogEnabled,proto3" json:"isSystemCallLogEnabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountData_IOSSpecificSettings) Reset() { + *x = AccountData_IOSSpecificSettings{} + mi := &file_backuppb_Backup_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountData_IOSSpecificSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountData_IOSSpecificSettings) ProtoMessage() {} + +func (x *AccountData_IOSSpecificSettings) ProtoReflect() protoreflect.Message { + mi := &file_backuppb_Backup_proto_msgTypes[92] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountData_IOSSpecificSettings.ProtoReflect.Descriptor instead. +func (*AccountData_IOSSpecificSettings) Descriptor() ([]byte, []int) { + return file_backuppb_Backup_proto_rawDescGZIP(), []int{2, 6} +} + +func (x *AccountData_IOSSpecificSettings) GetIsSystemCallLogEnabled() bool { + if x != nil { + return x.IsSystemCallLogEnabled + } + return false +} + type Contact_Registered struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -9295,7 +9415,7 @@ type Contact_Registered struct { func (x *Contact_Registered) Reset() { *x = Contact_Registered{} - mi := &file_backuppb_Backup_proto_msgTypes[92] + mi := &file_backuppb_Backup_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9307,7 +9427,7 @@ func (x *Contact_Registered) String() string { func (*Contact_Registered) ProtoMessage() {} func (x *Contact_Registered) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[92] + mi := &file_backuppb_Backup_proto_msgTypes[93] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9332,7 +9452,7 @@ type Contact_NotRegistered struct { func (x *Contact_NotRegistered) Reset() { *x = Contact_NotRegistered{} - mi := &file_backuppb_Backup_proto_msgTypes[93] + mi := &file_backuppb_Backup_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9344,7 +9464,7 @@ func (x *Contact_NotRegistered) String() string { func (*Contact_NotRegistered) ProtoMessage() {} func (x *Contact_NotRegistered) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[93] + mi := &file_backuppb_Backup_proto_msgTypes[94] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9377,7 +9497,7 @@ type Contact_Name struct { func (x *Contact_Name) Reset() { *x = Contact_Name{} - mi := &file_backuppb_Backup_proto_msgTypes[94] + mi := &file_backuppb_Backup_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9389,7 +9509,7 @@ func (x *Contact_Name) String() string { func (*Contact_Name) ProtoMessage() {} func (x *Contact_Name) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[94] + mi := &file_backuppb_Backup_proto_msgTypes[95] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9436,8 +9556,8 @@ type Group_GroupSnapshot struct { MembersPendingProfileKey []*Group_MemberPendingProfileKey `protobuf:"bytes,8,rep,name=membersPendingProfileKey,proto3" json:"membersPendingProfileKey,omitempty"` MembersPendingAdminApproval []*Group_MemberPendingAdminApproval `protobuf:"bytes,9,rep,name=membersPendingAdminApproval,proto3" json:"membersPendingAdminApproval,omitempty"` InviteLinkPassword []byte `protobuf:"bytes,10,opt,name=inviteLinkPassword,proto3" json:"inviteLinkPassword,omitempty"` - AnnouncementsOnly bool `protobuf:"varint,12,opt,name=announcements_only,json=announcementsOnly,proto3" json:"announcements_only,omitempty"` - MembersBanned []*Group_MemberBanned `protobuf:"bytes,13,rep,name=members_banned,json=membersBanned,proto3" json:"members_banned,omitempty"` + AnnouncementsOnly bool `protobuf:"varint,12,opt,name=announcementsOnly,proto3" json:"announcementsOnly,omitempty"` + MembersBanned []*Group_MemberBanned `protobuf:"bytes,13,rep,name=membersBanned,proto3" json:"membersBanned,omitempty"` Terminated bool `protobuf:"varint,14,opt,name=terminated,proto3" json:"terminated,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -9445,7 +9565,7 @@ type Group_GroupSnapshot struct { func (x *Group_GroupSnapshot) Reset() { *x = Group_GroupSnapshot{} - mi := &file_backuppb_Backup_proto_msgTypes[95] + mi := &file_backuppb_Backup_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9457,7 +9577,7 @@ func (x *Group_GroupSnapshot) String() string { func (*Group_GroupSnapshot) ProtoMessage() {} func (x *Group_GroupSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[95] + mi := &file_backuppb_Backup_proto_msgTypes[96] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9581,7 +9701,7 @@ type Group_GroupAttributeBlob struct { func (x *Group_GroupAttributeBlob) Reset() { *x = Group_GroupAttributeBlob{} - mi := &file_backuppb_Backup_proto_msgTypes[96] + mi := &file_backuppb_Backup_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9593,7 +9713,7 @@ func (x *Group_GroupAttributeBlob) String() string { func (*Group_GroupAttributeBlob) ProtoMessage() {} func (x *Group_GroupAttributeBlob) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[96] + mi := &file_backuppb_Backup_proto_msgTypes[97] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9693,7 +9813,7 @@ type Group_Member struct { func (x *Group_Member) Reset() { *x = Group_Member{} - mi := &file_backuppb_Backup_proto_msgTypes[97] + mi := &file_backuppb_Backup_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9705,7 +9825,7 @@ func (x *Group_Member) String() string { func (*Group_Member) ProtoMessage() {} func (x *Group_Member) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[97] + mi := &file_backuppb_Backup_proto_msgTypes[98] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9767,7 +9887,7 @@ type Group_MemberPendingProfileKey struct { func (x *Group_MemberPendingProfileKey) Reset() { *x = Group_MemberPendingProfileKey{} - mi := &file_backuppb_Backup_proto_msgTypes[98] + mi := &file_backuppb_Backup_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9779,7 +9899,7 @@ func (x *Group_MemberPendingProfileKey) String() string { func (*Group_MemberPendingProfileKey) ProtoMessage() {} func (x *Group_MemberPendingProfileKey) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[98] + mi := &file_backuppb_Backup_proto_msgTypes[99] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9826,7 +9946,7 @@ type Group_MemberPendingAdminApproval struct { func (x *Group_MemberPendingAdminApproval) Reset() { *x = Group_MemberPendingAdminApproval{} - mi := &file_backuppb_Backup_proto_msgTypes[99] + mi := &file_backuppb_Backup_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9838,7 +9958,7 @@ func (x *Group_MemberPendingAdminApproval) String() string { func (*Group_MemberPendingAdminApproval) ProtoMessage() {} func (x *Group_MemberPendingAdminApproval) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[99] + mi := &file_backuppb_Backup_proto_msgTypes[100] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9878,7 +9998,7 @@ type Group_MemberBanned struct { func (x *Group_MemberBanned) Reset() { *x = Group_MemberBanned{} - mi := &file_backuppb_Backup_proto_msgTypes[100] + mi := &file_backuppb_Backup_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9890,7 +10010,7 @@ func (x *Group_MemberBanned) String() string { func (*Group_MemberBanned) ProtoMessage() {} func (x *Group_MemberBanned) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[100] + mi := &file_backuppb_Backup_proto_msgTypes[101] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9932,7 +10052,7 @@ type Group_AccessControl struct { func (x *Group_AccessControl) Reset() { *x = Group_AccessControl{} - mi := &file_backuppb_Backup_proto_msgTypes[101] + mi := &file_backuppb_Backup_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9944,7 +10064,7 @@ func (x *Group_AccessControl) String() string { func (*Group_AccessControl) ProtoMessage() {} func (x *Group_AccessControl) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[101] + mi := &file_backuppb_Backup_proto_msgTypes[102] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10000,7 +10120,7 @@ type ChatItem_IncomingMessageDetails struct { func (x *ChatItem_IncomingMessageDetails) Reset() { *x = ChatItem_IncomingMessageDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[102] + mi := &file_backuppb_Backup_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10012,7 +10132,7 @@ func (x *ChatItem_IncomingMessageDetails) String() string { func (*ChatItem_IncomingMessageDetails) ProtoMessage() {} func (x *ChatItem_IncomingMessageDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[102] + mi := &file_backuppb_Backup_proto_msgTypes[103] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10066,7 +10186,7 @@ type ChatItem_OutgoingMessageDetails struct { func (x *ChatItem_OutgoingMessageDetails) Reset() { *x = ChatItem_OutgoingMessageDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[103] + mi := &file_backuppb_Backup_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10078,7 +10198,7 @@ func (x *ChatItem_OutgoingMessageDetails) String() string { func (*ChatItem_OutgoingMessageDetails) ProtoMessage() {} func (x *ChatItem_OutgoingMessageDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[103] + mi := &file_backuppb_Backup_proto_msgTypes[104] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10116,7 +10236,7 @@ type ChatItem_DirectionlessMessageDetails struct { func (x *ChatItem_DirectionlessMessageDetails) Reset() { *x = ChatItem_DirectionlessMessageDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[104] + mi := &file_backuppb_Backup_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10128,7 +10248,7 @@ func (x *ChatItem_DirectionlessMessageDetails) String() string { func (*ChatItem_DirectionlessMessageDetails) ProtoMessage() {} func (x *ChatItem_DirectionlessMessageDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[104] + mi := &file_backuppb_Backup_proto_msgTypes[105] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10158,7 +10278,7 @@ type ChatItem_PinDetails struct { func (x *ChatItem_PinDetails) Reset() { *x = ChatItem_PinDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[105] + mi := &file_backuppb_Backup_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10170,7 +10290,7 @@ func (x *ChatItem_PinDetails) String() string { func (*ChatItem_PinDetails) ProtoMessage() {} func (x *ChatItem_PinDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[105] + mi := &file_backuppb_Backup_proto_msgTypes[106] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10242,7 +10362,7 @@ type SendStatus_Pending struct { func (x *SendStatus_Pending) Reset() { *x = SendStatus_Pending{} - mi := &file_backuppb_Backup_proto_msgTypes[106] + mi := &file_backuppb_Backup_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10254,7 +10374,7 @@ func (x *SendStatus_Pending) String() string { func (*SendStatus_Pending) ProtoMessage() {} func (x *SendStatus_Pending) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[106] + mi := &file_backuppb_Backup_proto_msgTypes[107] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10279,7 +10399,7 @@ type SendStatus_Sent struct { func (x *SendStatus_Sent) Reset() { *x = SendStatus_Sent{} - mi := &file_backuppb_Backup_proto_msgTypes[107] + mi := &file_backuppb_Backup_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10291,7 +10411,7 @@ func (x *SendStatus_Sent) String() string { func (*SendStatus_Sent) ProtoMessage() {} func (x *SendStatus_Sent) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[107] + mi := &file_backuppb_Backup_proto_msgTypes[108] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10323,7 +10443,7 @@ type SendStatus_Delivered struct { func (x *SendStatus_Delivered) Reset() { *x = SendStatus_Delivered{} - mi := &file_backuppb_Backup_proto_msgTypes[108] + mi := &file_backuppb_Backup_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10335,7 +10455,7 @@ func (x *SendStatus_Delivered) String() string { func (*SendStatus_Delivered) ProtoMessage() {} func (x *SendStatus_Delivered) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[108] + mi := &file_backuppb_Backup_proto_msgTypes[109] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10367,7 +10487,7 @@ type SendStatus_Read struct { func (x *SendStatus_Read) Reset() { *x = SendStatus_Read{} - mi := &file_backuppb_Backup_proto_msgTypes[109] + mi := &file_backuppb_Backup_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10379,7 +10499,7 @@ func (x *SendStatus_Read) String() string { func (*SendStatus_Read) ProtoMessage() {} func (x *SendStatus_Read) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[109] + mi := &file_backuppb_Backup_proto_msgTypes[110] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10411,7 +10531,7 @@ type SendStatus_Viewed struct { func (x *SendStatus_Viewed) Reset() { *x = SendStatus_Viewed{} - mi := &file_backuppb_Backup_proto_msgTypes[110] + mi := &file_backuppb_Backup_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10423,7 +10543,7 @@ func (x *SendStatus_Viewed) String() string { func (*SendStatus_Viewed) ProtoMessage() {} func (x *SendStatus_Viewed) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[110] + mi := &file_backuppb_Backup_proto_msgTypes[111] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10455,7 +10575,7 @@ type SendStatus_Skipped struct { func (x *SendStatus_Skipped) Reset() { *x = SendStatus_Skipped{} - mi := &file_backuppb_Backup_proto_msgTypes[111] + mi := &file_backuppb_Backup_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10467,7 +10587,7 @@ func (x *SendStatus_Skipped) String() string { func (*SendStatus_Skipped) ProtoMessage() {} func (x *SendStatus_Skipped) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[111] + mi := &file_backuppb_Backup_proto_msgTypes[112] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10492,7 +10612,7 @@ type SendStatus_Failed struct { func (x *SendStatus_Failed) Reset() { *x = SendStatus_Failed{} - mi := &file_backuppb_Backup_proto_msgTypes[112] + mi := &file_backuppb_Backup_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10504,7 +10624,7 @@ func (x *SendStatus_Failed) String() string { func (*SendStatus_Failed) ProtoMessage() {} func (x *SendStatus_Failed) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[112] + mi := &file_backuppb_Backup_proto_msgTypes[113] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10537,7 +10657,7 @@ type DirectStoryReplyMessage_TextReply struct { func (x *DirectStoryReplyMessage_TextReply) Reset() { *x = DirectStoryReplyMessage_TextReply{} - mi := &file_backuppb_Backup_proto_msgTypes[113] + mi := &file_backuppb_Backup_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10549,7 +10669,7 @@ func (x *DirectStoryReplyMessage_TextReply) String() string { func (*DirectStoryReplyMessage_TextReply) ProtoMessage() {} func (x *DirectStoryReplyMessage_TextReply) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[113] + mi := &file_backuppb_Backup_proto_msgTypes[114] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10594,7 +10714,7 @@ type PaymentNotification_TransactionDetails struct { func (x *PaymentNotification_TransactionDetails) Reset() { *x = PaymentNotification_TransactionDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[114] + mi := &file_backuppb_Backup_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10606,7 +10726,7 @@ func (x *PaymentNotification_TransactionDetails) String() string { func (*PaymentNotification_TransactionDetails) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[114] + mi := &file_backuppb_Backup_proto_msgTypes[115] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10675,7 +10795,7 @@ type PaymentNotification_TransactionDetails_MobileCoinTxoIdentification struct { func (x *PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) Reset() { *x = PaymentNotification_TransactionDetails_MobileCoinTxoIdentification{} - mi := &file_backuppb_Backup_proto_msgTypes[115] + mi := &file_backuppb_Backup_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10687,7 +10807,7 @@ func (x *PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) Str func (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[115] + mi := &file_backuppb_Backup_proto_msgTypes[116] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10726,7 +10846,7 @@ type PaymentNotification_TransactionDetails_FailedTransaction struct { func (x *PaymentNotification_TransactionDetails_FailedTransaction) Reset() { *x = PaymentNotification_TransactionDetails_FailedTransaction{} - mi := &file_backuppb_Backup_proto_msgTypes[116] + mi := &file_backuppb_Backup_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10738,7 +10858,7 @@ func (x *PaymentNotification_TransactionDetails_FailedTransaction) String() stri func (*PaymentNotification_TransactionDetails_FailedTransaction) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails_FailedTransaction) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[116] + mi := &file_backuppb_Backup_proto_msgTypes[117] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10779,7 +10899,7 @@ type PaymentNotification_TransactionDetails_Transaction struct { func (x *PaymentNotification_TransactionDetails_Transaction) Reset() { *x = PaymentNotification_TransactionDetails_Transaction{} - mi := &file_backuppb_Backup_proto_msgTypes[117] + mi := &file_backuppb_Backup_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10791,7 +10911,7 @@ func (x *PaymentNotification_TransactionDetails_Transaction) String() string { func (*PaymentNotification_TransactionDetails_Transaction) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails_Transaction) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[117] + mi := &file_backuppb_Backup_proto_msgTypes[118] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10870,7 +10990,7 @@ type ContactAttachment_Name struct { func (x *ContactAttachment_Name) Reset() { *x = ContactAttachment_Name{} - mi := &file_backuppb_Backup_proto_msgTypes[118] + mi := &file_backuppb_Backup_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10882,7 +11002,7 @@ func (x *ContactAttachment_Name) String() string { func (*ContactAttachment_Name) ProtoMessage() {} func (x *ContactAttachment_Name) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[118] + mi := &file_backuppb_Backup_proto_msgTypes[119] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10940,6 +11060,59 @@ func (x *ContactAttachment_Name) GetNickname() string { return "" } +// The sharer's Signal nickname for this contact +type ContactAttachment_SignalNickname struct { + state protoimpl.MessageState `protogen:"open.v1"` + Given string `protobuf:"bytes,1,opt,name=given,proto3" json:"given,omitempty"` + Family string `protobuf:"bytes,2,opt,name=family,proto3" json:"family,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContactAttachment_SignalNickname) Reset() { + *x = ContactAttachment_SignalNickname{} + mi := &file_backuppb_Backup_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContactAttachment_SignalNickname) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContactAttachment_SignalNickname) ProtoMessage() {} + +func (x *ContactAttachment_SignalNickname) ProtoReflect() protoreflect.Message { + mi := &file_backuppb_Backup_proto_msgTypes[120] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContactAttachment_SignalNickname.ProtoReflect.Descriptor instead. +func (*ContactAttachment_SignalNickname) Descriptor() ([]byte, []int) { + return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 1} +} + +func (x *ContactAttachment_SignalNickname) GetGiven() string { + if x != nil { + return x.Given + } + return "" +} + +func (x *ContactAttachment_SignalNickname) GetFamily() string { + if x != nil { + return x.Family + } + return "" +} + type ContactAttachment_Phone struct { state protoimpl.MessageState `protogen:"open.v1"` Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` @@ -10951,7 +11124,7 @@ type ContactAttachment_Phone struct { func (x *ContactAttachment_Phone) Reset() { *x = ContactAttachment_Phone{} - mi := &file_backuppb_Backup_proto_msgTypes[119] + mi := &file_backuppb_Backup_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10963,7 +11136,7 @@ func (x *ContactAttachment_Phone) String() string { func (*ContactAttachment_Phone) ProtoMessage() {} func (x *ContactAttachment_Phone) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[119] + mi := &file_backuppb_Backup_proto_msgTypes[121] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10976,7 +11149,7 @@ func (x *ContactAttachment_Phone) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactAttachment_Phone.ProtoReflect.Descriptor instead. func (*ContactAttachment_Phone) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 1} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 2} } func (x *ContactAttachment_Phone) GetValue() string { @@ -11011,7 +11184,7 @@ type ContactAttachment_Email struct { func (x *ContactAttachment_Email) Reset() { *x = ContactAttachment_Email{} - mi := &file_backuppb_Backup_proto_msgTypes[120] + mi := &file_backuppb_Backup_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11023,7 +11196,7 @@ func (x *ContactAttachment_Email) String() string { func (*ContactAttachment_Email) ProtoMessage() {} func (x *ContactAttachment_Email) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[120] + mi := &file_backuppb_Backup_proto_msgTypes[122] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11036,7 +11209,7 @@ func (x *ContactAttachment_Email) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactAttachment_Email.ProtoReflect.Descriptor instead. func (*ContactAttachment_Email) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 2} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 3} } func (x *ContactAttachment_Email) GetValue() string { @@ -11077,7 +11250,7 @@ type ContactAttachment_PostalAddress struct { func (x *ContactAttachment_PostalAddress) Reset() { *x = ContactAttachment_PostalAddress{} - mi := &file_backuppb_Backup_proto_msgTypes[121] + mi := &file_backuppb_Backup_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11089,7 +11262,7 @@ func (x *ContactAttachment_PostalAddress) String() string { func (*ContactAttachment_PostalAddress) ProtoMessage() {} func (x *ContactAttachment_PostalAddress) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[121] + mi := &file_backuppb_Backup_proto_msgTypes[123] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11102,7 +11275,7 @@ func (x *ContactAttachment_PostalAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactAttachment_PostalAddress.ProtoReflect.Descriptor instead. func (*ContactAttachment_PostalAddress) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 3} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{22, 4} } func (x *ContactAttachment_PostalAddress) GetType() ContactAttachment_PostalAddress_Type { @@ -11204,7 +11377,7 @@ type FilePointer_LocatorInfo struct { func (x *FilePointer_LocatorInfo) Reset() { *x = FilePointer_LocatorInfo{} - mi := &file_backuppb_Backup_proto_msgTypes[122] + mi := &file_backuppb_Backup_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11216,7 +11389,7 @@ func (x *FilePointer_LocatorInfo) String() string { func (*FilePointer_LocatorInfo) ProtoMessage() {} func (x *FilePointer_LocatorInfo) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[122] + mi := &file_backuppb_Backup_proto_msgTypes[124] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11336,7 +11509,7 @@ type Quote_QuotedAttachment struct { func (x *Quote_QuotedAttachment) Reset() { *x = Quote_QuotedAttachment{} - mi := &file_backuppb_Backup_proto_msgTypes[123] + mi := &file_backuppb_Backup_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11348,7 +11521,7 @@ func (x *Quote_QuotedAttachment) String() string { func (*Quote_QuotedAttachment) ProtoMessage() {} func (x *Quote_QuotedAttachment) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[123] + mi := &file_backuppb_Backup_proto_msgTypes[125] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11395,7 +11568,7 @@ type Poll_PollOption struct { func (x *Poll_PollOption) Reset() { *x = Poll_PollOption{} - mi := &file_backuppb_Backup_proto_msgTypes[124] + mi := &file_backuppb_Backup_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11407,7 +11580,7 @@ func (x *Poll_PollOption) String() string { func (*Poll_PollOption) ProtoMessage() {} func (x *Poll_PollOption) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[124] + mi := &file_backuppb_Backup_proto_msgTypes[126] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11447,7 +11620,7 @@ type Poll_PollOption_PollVote struct { func (x *Poll_PollOption_PollVote) Reset() { *x = Poll_PollOption_PollVote{} - mi := &file_backuppb_Backup_proto_msgTypes[125] + mi := &file_backuppb_Backup_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11459,7 +11632,7 @@ func (x *Poll_PollOption_PollVote) String() string { func (*Poll_PollOption_PollVote) ProtoMessage() {} func (x *Poll_PollOption_PollVote) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[125] + mi := &file_backuppb_Backup_proto_msgTypes[127] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11538,7 +11711,7 @@ type GroupChangeChatUpdate_Update struct { func (x *GroupChangeChatUpdate_Update) Reset() { *x = GroupChangeChatUpdate_Update{} - mi := &file_backuppb_Backup_proto_msgTypes[126] + mi := &file_backuppb_Backup_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11550,7 +11723,7 @@ func (x *GroupChangeChatUpdate_Update) String() string { func (*GroupChangeChatUpdate_Update) ProtoMessage() {} func (x *GroupChangeChatUpdate_Update) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[126] + mi := &file_backuppb_Backup_proto_msgTypes[128] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12156,7 +12329,7 @@ type GroupInvitationRevokedUpdate_Invitee struct { func (x *GroupInvitationRevokedUpdate_Invitee) Reset() { *x = GroupInvitationRevokedUpdate_Invitee{} - mi := &file_backuppb_Backup_proto_msgTypes[127] + mi := &file_backuppb_Backup_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12168,7 +12341,7 @@ func (x *GroupInvitationRevokedUpdate_Invitee) String() string { func (*GroupInvitationRevokedUpdate_Invitee) ProtoMessage() {} func (x *GroupInvitationRevokedUpdate_Invitee) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[127] + mi := &file_backuppb_Backup_proto_msgTypes[129] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12181,7 +12354,7 @@ func (x *GroupInvitationRevokedUpdate_Invitee) ProtoReflect() protoreflect.Messa // Deprecated: Use GroupInvitationRevokedUpdate_Invitee.ProtoReflect.Descriptor instead. func (*GroupInvitationRevokedUpdate_Invitee) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{65, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{64, 0} } func (x *GroupInvitationRevokedUpdate_Invitee) GetInviterAci() []byte { @@ -12216,7 +12389,7 @@ type ChatStyle_Gradient struct { func (x *ChatStyle_Gradient) Reset() { *x = ChatStyle_Gradient{} - mi := &file_backuppb_Backup_proto_msgTypes[128] + mi := &file_backuppb_Backup_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12228,7 +12401,7 @@ func (x *ChatStyle_Gradient) String() string { func (*ChatStyle_Gradient) ProtoMessage() {} func (x *ChatStyle_Gradient) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[128] + mi := &file_backuppb_Backup_proto_msgTypes[130] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12281,7 +12454,7 @@ type ChatStyle_CustomChatColor struct { func (x *ChatStyle_CustomChatColor) Reset() { *x = ChatStyle_CustomChatColor{} - mi := &file_backuppb_Backup_proto_msgTypes[129] + mi := &file_backuppb_Backup_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12293,7 +12466,7 @@ func (x *ChatStyle_CustomChatColor) String() string { func (*ChatStyle_CustomChatColor) ProtoMessage() {} func (x *ChatStyle_CustomChatColor) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[129] + mi := &file_backuppb_Backup_proto_msgTypes[131] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12365,7 +12538,7 @@ type ChatStyle_AutomaticBubbleColor struct { func (x *ChatStyle_AutomaticBubbleColor) Reset() { *x = ChatStyle_AutomaticBubbleColor{} - mi := &file_backuppb_Backup_proto_msgTypes[130] + mi := &file_backuppb_Backup_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12377,7 +12550,7 @@ func (x *ChatStyle_AutomaticBubbleColor) String() string { func (*ChatStyle_AutomaticBubbleColor) ProtoMessage() {} func (x *ChatStyle_AutomaticBubbleColor) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[130] + mi := &file_backuppb_Backup_proto_msgTypes[132] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12417,7 +12590,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "chatFolder\x18\b \x01(\v2\x19.signal.backup.ChatFolderH\x00R\n" + "chatFolderB\x06\n" + - "\x04item\"\x9e)\n" + + "\x04item\"\xcf*\n" + "\vAccountData\x12\x1e\n" + "\n" + "profileKey\x18\x01 \x01(\fR\n" + @@ -12436,7 +12609,8 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x06svrPin\x18\v \x01(\tR\x06svrPin\x12l\n" + "\x17androidSpecificSettings\x18\f \x01(\v22.signal.backup.AccountData.AndroidSpecificSettingsR\x17androidSpecificSettings\x12\x18\n" + "\abioText\x18\r \x01(\tR\abioText\x12\x1a\n" + - "\bbioEmoji\x18\x0e \x01(\tR\bbioEmoji\x1a\xf6\x01\n" + + "\bbioEmoji\x18\x0e \x01(\tR\bbioEmoji\x12`\n" + + "\x13iosSpecificSettings\x18\x10 \x01(\v2..signal.backup.AccountData.IOSSpecificSettingsR\x13iosSpecificSettings\x1a\xf6\x01\n" + "\fUsernameLink\x12\x18\n" + "\aentropy\x18\x01 \x01(\fR\aentropy\x12\x1a\n" + "\bserverId\x18\x02 \x01(\fR\bserverId\x12C\n" + @@ -12538,7 +12712,9 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x10UNKNOWN_BAR_SIZE\x10\x00\x12\n" + "\n" + "\x06NORMAL\x10\x01\x12\v\n" + - "\aCOMPACT\x10\x02\"@\n" + + "\aCOMPACT\x10\x02\x1aM\n" + + "\x13IOSSpecificSettings\x126\n" + + "\x16isSystemCallLogEnabled\x18\x01 \x01(\bR\x16isSystemCallLogEnabled\"@\n" + "\x16PhoneNumberSharingMode\x12\v\n" + "\aUNKNOWN\x10\x00\x12\r\n" + "\tEVERYBODY\x10\x01\x12\n" + @@ -12568,7 +12744,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x04self\x18\x05 \x01(\v2\x13.signal.backup.SelfH\x00R\x04self\x12A\n" + "\freleaseNotes\x18\x06 \x01(\v2\x1b.signal.backup.ReleaseNotesH\x00R\freleaseNotes\x125\n" + "\bcallLink\x18\a \x01(\v2\x17.signal.backup.CallLinkH\x00R\bcallLinkB\r\n" + - "\vdestination\"\xca\v\n" + + "\vdestination\"\x87\f\n" + "\aContact\x12\x15\n" + "\x03aci\x18\x01 \x01(\fH\x01R\x03aci\x88\x01\x01\x12\x15\n" + "\x03pni\x18\x02 \x01(\fH\x02R\x03pni\x88\x01\x01\x12\x1f\n" + @@ -12600,7 +12776,10 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\vavatarColor\x18\x15 \x01(\x0e2\x1a.signal.backup.AvatarColorH\tR\vavatarColor\x88\x01\x01\x125\n" + "\x13keyTransparencyData\x18\x16 \x01(\fH\n" + "R\x13keyTransparencyData\x88\x01\x01\x12.\n" + - "\x12blockedAtTimestamp\x18\x17 \x01(\x04R\x12blockedAtTimestamp\x1a\f\n" + + "\x12blockedAtTimestamp\x18\x17 \x01(\x04R\x12blockedAtTimestamp\x12;\n" + + "\n" + + "sharedName\x18\x18 \x01(\v2\x1b.signal.backup.Contact.NameR\n" + + "sharedName\x1a\f\n" + "\n" + "Registered\x1aE\n" + "\rNotRegistered\x124\n" + @@ -12629,7 +12808,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x12_profileFamilyNameB\x0e\n" + "\f_identityKeyB\x0e\n" + "\f_avatarColorB\x16\n" + - "\x14_keyTransparencyData\"\xf6\x13\n" + + "\x14_keyTransparencyData\"\xf4\x13\n" + "\x05Group\x12\x1c\n" + "\tmasterKey\x18\x01 \x01(\fR\tmasterKey\x12 \n" + "\vwhitelisted\x18\x02 \x01(\bR\vwhitelisted\x12\x1c\n" + @@ -12638,7 +12817,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\bsnapshot\x18\x05 \x01(\v2\".signal.backup.Group.GroupSnapshotR\bsnapshot\x12\x18\n" + "\ablocked\x18\x06 \x01(\bR\ablocked\x12A\n" + "\vavatarColor\x18\a \x01(\x0e2\x1a.signal.backup.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x12.\n" + - "\x12blockedAtTimestamp\x18\b \x01(\x04R\x12blockedAtTimestamp\x1a\xe5\x06\n" + + "\x12blockedAtTimestamp\x18\b \x01(\x04R\x12blockedAtTimestamp\x1a\xe3\x06\n" + "\rGroupSnapshot\x12=\n" + "\x05title\x18\x02 \x01(\v2'.signal.backup.Group.GroupAttributeBlobR\x05title\x12I\n" + "\vdescription\x18\v \x01(\v2'.signal.backup.Group.GroupAttributeBlobR\vdescription\x12\x1c\n" + @@ -12650,9 +12829,9 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x18membersPendingProfileKey\x18\b \x03(\v2,.signal.backup.Group.MemberPendingProfileKeyR\x18membersPendingProfileKey\x12q\n" + "\x1bmembersPendingAdminApproval\x18\t \x03(\v2/.signal.backup.Group.MemberPendingAdminApprovalR\x1bmembersPendingAdminApproval\x12.\n" + "\x12inviteLinkPassword\x18\n" + - " \x01(\fR\x12inviteLinkPassword\x12-\n" + - "\x12announcements_only\x18\f \x01(\bR\x11announcementsOnly\x12H\n" + - "\x0emembers_banned\x18\r \x03(\v2!.signal.backup.Group.MemberBannedR\rmembersBanned\x12\x1e\n" + + " \x01(\fR\x12inviteLinkPassword\x12,\n" + + "\x11announcementsOnly\x18\f \x01(\bR\x11announcementsOnly\x12G\n" + + "\rmembersBanned\x18\r \x03(\v2!.signal.backup.Group.MemberBannedR\rmembersBanned\x12\x1e\n" + "\n" + "terminated\x18\x0e \x01(\bR\n" + "terminatedJ\x04\b\x01\x10\x02\x1a\xc3\x01\n" + @@ -12926,15 +13105,18 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "attachment\x18\x01 \x01(\v2 .signal.backup.MessageAttachmentR\n" + "attachment\x125\n" + - "\treactions\x18\x02 \x03(\v2\x17.signal.backup.ReactionR\treactions\"\x89\n" + - "\n" + + "\treactions\x18\x02 \x03(\v2\x17.signal.backup.ReactionR\treactions\"\xd4\v\n" + "\x11ContactAttachment\x12>\n" + "\x04name\x18\x01 \x01(\v2%.signal.backup.ContactAttachment.NameH\x00R\x04name\x88\x01\x01\x12>\n" + "\x06number\x18\x03 \x03(\v2&.signal.backup.ContactAttachment.PhoneR\x06number\x12<\n" + "\x05email\x18\x04 \x03(\v2&.signal.backup.ContactAttachment.EmailR\x05email\x12H\n" + "\aaddress\x18\x05 \x03(\v2..signal.backup.ContactAttachment.PostalAddressR\aaddress\x127\n" + "\x06avatar\x18\x06 \x01(\v2\x1a.signal.backup.FilePointerH\x01R\x06avatar\x88\x01\x01\x12\"\n" + - "\forganization\x18\a \x01(\tR\forganization\x1a\xb0\x01\n" + + "\forganization\x18\a \x01(\tR\forganization\x12\x10\n" + + "\x03aci\x18\b \x01(\fR\x03aci\x12P\n" + + "\bnickname\x18\t \x01(\v2/.signal.backup.ContactAttachment.SignalNicknameH\x02R\bnickname\x88\x01\x01\x12\x12\n" + + "\x04note\x18\n" + + " \x01(\tR\x04note\x1a\xb0\x01\n" + "\x04Name\x12\x1c\n" + "\tgivenName\x18\x01 \x01(\tR\tgivenName\x12\x1e\n" + "\n" + @@ -12945,7 +13127,10 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "middleName\x18\x05 \x01(\tR\n" + "middleName\x12\x1a\n" + - "\bnickname\x18\x06 \x01(\tR\bnickname\x1a\xb5\x01\n" + + "\bnickname\x18\x06 \x01(\tR\bnickname\x1a>\n" + + "\x0eSignalNickname\x12\x14\n" + + "\x05given\x18\x01 \x01(\tR\x05given\x12\x16\n" + + "\x06family\x18\x02 \x01(\tR\x06family\x1a\xb5\x01\n" + "\x05Phone\x12\x14\n" + "\x05value\x18\x01 \x01(\tR\x05value\x12?\n" + "\x04type\x18\x02 \x01(\x0e2+.signal.backup.ContactAttachment.Phone.TypeR\x04type\x12\x14\n" + @@ -12987,7 +13172,8 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "\x06CUSTOM\x10\x03B\a\n" + "\x05_nameB\t\n" + - "\a_avatar\"y\n" + + "\a_avatarB\v\n" + + "\t_nicknameJ\x04\b\x02\x10\x03\"y\n" + "\x0eStickerMessage\x120\n" + "\asticker\x18\x01 \x01(\v2\x16.signal.backup.StickerR\asticker\x125\n" + "\treactions\x18\x02 \x03(\v2\x17.signal.backup.ReactionR\treactions\"\x16\n" + @@ -13022,7 +13208,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "BORDERLESS\x10\x02\x12\a\n" + "\x03GIF\x10\x03B\r\n" + - "\v_clientUuid\"\x9e\b\n" + + "\v_clientUuid\"\xad\t\n" + "\vFilePointer\x12%\n" + "\vcontentType\x18\x04 \x01(\tH\x00R\vcontentType\x88\x01\x01\x12+\n" + "\x0eincrementalMac\x18\x05 \x01(\fH\x01R\x0eincrementalMac\x88\x01\x01\x12=\n" + @@ -13033,7 +13219,9 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\acaption\x18\n" + " \x01(\tH\x06R\acaption\x88\x01\x01\x12\x1f\n" + "\bblurHash\x18\v \x01(\tH\aR\bblurHash\x88\x01\x01\x12H\n" + - "\vlocatorInfo\x18\r \x01(\v2&.signal.backup.FilePointer.LocatorInfoR\vlocatorInfo\x1a\x86\x04\n" + + "\vlocatorInfo\x18\r \x01(\v2&.signal.backup.FilePointer.LocatorInfoR\vlocatorInfo\x12)\n" + + "\raudioWaveform\x18\x0e \x01(\fH\bR\raudioWaveform\x88\x01\x01\x127\n" + + "\x14audioDurationSeconds\x18\x0f \x01(\x02H\tR\x14audioDurationSeconds\x88\x01\x01\x1a\x86\x04\n" + "\vLocatorInfo\x12\x10\n" + "\x03key\x18\x01 \x01(\fR\x03key\x12&\n" + "\rplaintextHash\x18\n" + @@ -13059,7 +13247,9 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\a_heightB\n" + "\n" + "\b_captionB\v\n" + - "\t_blurHashJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03J\x04\b\x03\x10\x04J\x04\b\f\x10\r\"\xb8\x04\n" + + "\t_blurHashB\x10\n" + + "\x0e_audioWaveformB\x17\n" + + "\x15_audioDurationSecondsJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03J\x04\b\x03\x10\x04J\x04\b\f\x10\r\"\xb8\x04\n" + "\x05Quote\x125\n" + "\x13targetSentTimestamp\x18\x01 \x01(\x04H\x00R\x13targetSentTimestamp\x88\x01\x01\x12\x1a\n" + "\bauthorId\x18\x02 \x01(\x04R\bauthorId\x12,\n" + @@ -13210,10 +13400,13 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\vexpiresInMs\x18\x01 \x01(\x04R\vexpiresInMs\"W\n" + "\x17ProfileChangeChatUpdate\x12\"\n" + "\fpreviousName\x18\x01 \x01(\tR\fpreviousName\x12\x18\n" + - "\anewName\x18\x02 \x01(\tR\anewName\"^\n" + + "\anewName\x18\x02 \x01(\tR\anewName\"\x80\x01\n" + "\x18LearnedProfileChatUpdate\x12\x14\n" + "\x04e164\x18\x01 \x01(\x04H\x00R\x04e164\x12\x1c\n" + - "\busername\x18\x02 \x01(\tH\x00R\busernameB\x0e\n" + + "\busername\x18\x02 \x01(\tH\x00R\busername\x12 \n" + + "\n" + + "sharedName\x18\x03 \x01(\tH\x00R\n" + + "sharedNameB\x0e\n" + "\fpreviousName\";\n" + "\x15ThreadMergeChatUpdate\x12\"\n" + "\fpreviousE164\x18\x01 \x01(\x04R\fpreviousE164\"1\n" + @@ -13297,23 +13490,18 @@ const file_backuppb_Backup_proto_rawDesc = "" + "updaterAci\x18\x01 \x01(\fH\x00R\n" + "updaterAci\x88\x01\x01\x12C\n" + "\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" + - "\v_updaterAci\"\xa1\x01\n" + - "&GroupAttributesAccessLevelChangeUpdate\x12#\n" + - "\n" + - "updaterAci\x18\x01 \x01(\fH\x00R\n" + - "updaterAci\x88\x01\x01\x12C\n" + - "\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" + "\v_updaterAci\"\xa2\x01\n" + "'GroupMemberLabelAccessLevelChangeUpdate\x12#\n" + "\n" + "updaterAci\x18\x01 \x01(\fH\x00R\n" + "updaterAci\x88\x01\x01\x12C\n" + "\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" + - "\v_updaterAci\"P\n" + - "\x1aGroupTerminateChangeUpdate\x12#\n" + + "\v_updaterAci\"\xa1\x01\n" + + "&GroupAttributesAccessLevelChangeUpdate\x12#\n" + "\n" + "updaterAci\x18\x01 \x01(\fH\x00R\n" + - "updaterAci\x88\x01\x01B\r\n" + + "updaterAci\x88\x01\x01\x12C\n" + + "\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" + "\v_updaterAci\"\x87\x01\n" + "!GroupAnnouncementOnlyChangeUpdate\x12#\n" + "\n" + @@ -13452,6 +13640,11 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "updaterAci\x18\x02 \x01(\fH\x00R\n" + "updaterAci\x88\x01\x01B\r\n" + + "\v_updaterAci\"P\n" + + "\x1aGroupTerminateChangeUpdate\x12#\n" + + "\n" + + "updaterAci\x18\x01 \x01(\fH\x00R\n" + + "updaterAci\x88\x01\x01B\r\n" + "\v_updaterAci\"c\n" + "\x13PollTerminateUpdate\x120\n" + "\x13targetSentTimestamp\x18\x01 \x01(\x04R\x13targetSentTimestamp\x12\x1a\n" + @@ -13618,7 +13811,7 @@ func file_backuppb_Backup_proto_rawDescGZIP() []byte { } var file_backuppb_Backup_proto_enumTypes = make([]protoimpl.EnumInfo, 37) -var file_backuppb_Backup_proto_msgTypes = make([]protoimpl.MessageInfo, 131) +var file_backuppb_Backup_proto_msgTypes = make([]protoimpl.MessageInfo, 133) var file_backuppb_Backup_proto_goTypes = []any{ (AvatarColor)(0), // 0: signal.backup.AvatarColor (GroupV2AccessLevel)(0), // 1: signal.backup.GroupV2AccessLevel @@ -13707,36 +13900,36 @@ var file_backuppb_Backup_proto_goTypes = []any{ (*GroupAvatarUpdate)(nil), // 84: signal.backup.GroupAvatarUpdate (*GroupDescriptionUpdate)(nil), // 85: signal.backup.GroupDescriptionUpdate (*GroupMembershipAccessLevelChangeUpdate)(nil), // 86: signal.backup.GroupMembershipAccessLevelChangeUpdate - (*GroupAttributesAccessLevelChangeUpdate)(nil), // 87: signal.backup.GroupAttributesAccessLevelChangeUpdate - (*GroupMemberLabelAccessLevelChangeUpdate)(nil), // 88: signal.backup.GroupMemberLabelAccessLevelChangeUpdate - (*GroupTerminateChangeUpdate)(nil), // 89: signal.backup.GroupTerminateChangeUpdate - (*GroupAnnouncementOnlyChangeUpdate)(nil), // 90: signal.backup.GroupAnnouncementOnlyChangeUpdate - (*GroupAdminStatusUpdate)(nil), // 91: signal.backup.GroupAdminStatusUpdate - (*GroupMemberLeftUpdate)(nil), // 92: signal.backup.GroupMemberLeftUpdate - (*GroupMemberRemovedUpdate)(nil), // 93: signal.backup.GroupMemberRemovedUpdate - (*SelfInvitedToGroupUpdate)(nil), // 94: signal.backup.SelfInvitedToGroupUpdate - (*SelfInvitedOtherUserToGroupUpdate)(nil), // 95: signal.backup.SelfInvitedOtherUserToGroupUpdate - (*GroupUnknownInviteeUpdate)(nil), // 96: signal.backup.GroupUnknownInviteeUpdate - (*GroupInvitationAcceptedUpdate)(nil), // 97: signal.backup.GroupInvitationAcceptedUpdate - (*GroupInvitationDeclinedUpdate)(nil), // 98: signal.backup.GroupInvitationDeclinedUpdate - (*GroupMemberJoinedUpdate)(nil), // 99: signal.backup.GroupMemberJoinedUpdate - (*GroupMemberAddedUpdate)(nil), // 100: signal.backup.GroupMemberAddedUpdate - (*GroupSelfInvitationRevokedUpdate)(nil), // 101: signal.backup.GroupSelfInvitationRevokedUpdate - (*GroupInvitationRevokedUpdate)(nil), // 102: signal.backup.GroupInvitationRevokedUpdate - (*GroupJoinRequestUpdate)(nil), // 103: signal.backup.GroupJoinRequestUpdate - (*GroupJoinRequestApprovalUpdate)(nil), // 104: signal.backup.GroupJoinRequestApprovalUpdate - (*GroupJoinRequestCanceledUpdate)(nil), // 105: signal.backup.GroupJoinRequestCanceledUpdate - (*GroupSequenceOfRequestsAndCancelsUpdate)(nil), // 106: signal.backup.GroupSequenceOfRequestsAndCancelsUpdate - (*GroupInviteLinkResetUpdate)(nil), // 107: signal.backup.GroupInviteLinkResetUpdate - (*GroupInviteLinkEnabledUpdate)(nil), // 108: signal.backup.GroupInviteLinkEnabledUpdate - (*GroupInviteLinkAdminApprovalUpdate)(nil), // 109: signal.backup.GroupInviteLinkAdminApprovalUpdate - (*GroupInviteLinkDisabledUpdate)(nil), // 110: signal.backup.GroupInviteLinkDisabledUpdate - (*GroupMemberJoinedByLinkUpdate)(nil), // 111: signal.backup.GroupMemberJoinedByLinkUpdate - (*GroupV2MigrationUpdate)(nil), // 112: signal.backup.GroupV2MigrationUpdate - (*GroupV2MigrationSelfInvitedUpdate)(nil), // 113: signal.backup.GroupV2MigrationSelfInvitedUpdate - (*GroupV2MigrationInvitedMembersUpdate)(nil), // 114: signal.backup.GroupV2MigrationInvitedMembersUpdate - (*GroupV2MigrationDroppedMembersUpdate)(nil), // 115: signal.backup.GroupV2MigrationDroppedMembersUpdate - (*GroupExpirationTimerUpdate)(nil), // 116: signal.backup.GroupExpirationTimerUpdate + (*GroupMemberLabelAccessLevelChangeUpdate)(nil), // 87: signal.backup.GroupMemberLabelAccessLevelChangeUpdate + (*GroupAttributesAccessLevelChangeUpdate)(nil), // 88: signal.backup.GroupAttributesAccessLevelChangeUpdate + (*GroupAnnouncementOnlyChangeUpdate)(nil), // 89: signal.backup.GroupAnnouncementOnlyChangeUpdate + (*GroupAdminStatusUpdate)(nil), // 90: signal.backup.GroupAdminStatusUpdate + (*GroupMemberLeftUpdate)(nil), // 91: signal.backup.GroupMemberLeftUpdate + (*GroupMemberRemovedUpdate)(nil), // 92: signal.backup.GroupMemberRemovedUpdate + (*SelfInvitedToGroupUpdate)(nil), // 93: signal.backup.SelfInvitedToGroupUpdate + (*SelfInvitedOtherUserToGroupUpdate)(nil), // 94: signal.backup.SelfInvitedOtherUserToGroupUpdate + (*GroupUnknownInviteeUpdate)(nil), // 95: signal.backup.GroupUnknownInviteeUpdate + (*GroupInvitationAcceptedUpdate)(nil), // 96: signal.backup.GroupInvitationAcceptedUpdate + (*GroupInvitationDeclinedUpdate)(nil), // 97: signal.backup.GroupInvitationDeclinedUpdate + (*GroupMemberJoinedUpdate)(nil), // 98: signal.backup.GroupMemberJoinedUpdate + (*GroupMemberAddedUpdate)(nil), // 99: signal.backup.GroupMemberAddedUpdate + (*GroupSelfInvitationRevokedUpdate)(nil), // 100: signal.backup.GroupSelfInvitationRevokedUpdate + (*GroupInvitationRevokedUpdate)(nil), // 101: signal.backup.GroupInvitationRevokedUpdate + (*GroupJoinRequestUpdate)(nil), // 102: signal.backup.GroupJoinRequestUpdate + (*GroupJoinRequestApprovalUpdate)(nil), // 103: signal.backup.GroupJoinRequestApprovalUpdate + (*GroupJoinRequestCanceledUpdate)(nil), // 104: signal.backup.GroupJoinRequestCanceledUpdate + (*GroupSequenceOfRequestsAndCancelsUpdate)(nil), // 105: signal.backup.GroupSequenceOfRequestsAndCancelsUpdate + (*GroupInviteLinkResetUpdate)(nil), // 106: signal.backup.GroupInviteLinkResetUpdate + (*GroupInviteLinkEnabledUpdate)(nil), // 107: signal.backup.GroupInviteLinkEnabledUpdate + (*GroupInviteLinkAdminApprovalUpdate)(nil), // 108: signal.backup.GroupInviteLinkAdminApprovalUpdate + (*GroupInviteLinkDisabledUpdate)(nil), // 109: signal.backup.GroupInviteLinkDisabledUpdate + (*GroupMemberJoinedByLinkUpdate)(nil), // 110: signal.backup.GroupMemberJoinedByLinkUpdate + (*GroupV2MigrationUpdate)(nil), // 111: signal.backup.GroupV2MigrationUpdate + (*GroupV2MigrationSelfInvitedUpdate)(nil), // 112: signal.backup.GroupV2MigrationSelfInvitedUpdate + (*GroupV2MigrationInvitedMembersUpdate)(nil), // 113: signal.backup.GroupV2MigrationInvitedMembersUpdate + (*GroupV2MigrationDroppedMembersUpdate)(nil), // 114: signal.backup.GroupV2MigrationDroppedMembersUpdate + (*GroupExpirationTimerUpdate)(nil), // 115: signal.backup.GroupExpirationTimerUpdate + (*GroupTerminateChangeUpdate)(nil), // 116: signal.backup.GroupTerminateChangeUpdate (*PollTerminateUpdate)(nil), // 117: signal.backup.PollTerminateUpdate (*PinMessageUpdate)(nil), // 118: signal.backup.PinMessageUpdate (*StickerPack)(nil), // 119: signal.backup.StickerPack @@ -13749,45 +13942,47 @@ var file_backuppb_Backup_proto_goTypes = []any{ (*AccountData_SubscriberData)(nil), // 126: signal.backup.AccountData.SubscriberData (*AccountData_IAPSubscriberData)(nil), // 127: signal.backup.AccountData.IAPSubscriberData (*AccountData_AndroidSpecificSettings)(nil), // 128: signal.backup.AccountData.AndroidSpecificSettings - (*Contact_Registered)(nil), // 129: signal.backup.Contact.Registered - (*Contact_NotRegistered)(nil), // 130: signal.backup.Contact.NotRegistered - (*Contact_Name)(nil), // 131: signal.backup.Contact.Name - (*Group_GroupSnapshot)(nil), // 132: signal.backup.Group.GroupSnapshot - (*Group_GroupAttributeBlob)(nil), // 133: signal.backup.Group.GroupAttributeBlob - (*Group_Member)(nil), // 134: signal.backup.Group.Member - (*Group_MemberPendingProfileKey)(nil), // 135: signal.backup.Group.MemberPendingProfileKey - (*Group_MemberPendingAdminApproval)(nil), // 136: signal.backup.Group.MemberPendingAdminApproval - (*Group_MemberBanned)(nil), // 137: signal.backup.Group.MemberBanned - (*Group_AccessControl)(nil), // 138: signal.backup.Group.AccessControl - (*ChatItem_IncomingMessageDetails)(nil), // 139: signal.backup.ChatItem.IncomingMessageDetails - (*ChatItem_OutgoingMessageDetails)(nil), // 140: signal.backup.ChatItem.OutgoingMessageDetails - (*ChatItem_DirectionlessMessageDetails)(nil), // 141: signal.backup.ChatItem.DirectionlessMessageDetails - (*ChatItem_PinDetails)(nil), // 142: signal.backup.ChatItem.PinDetails - (*SendStatus_Pending)(nil), // 143: signal.backup.SendStatus.Pending - (*SendStatus_Sent)(nil), // 144: signal.backup.SendStatus.Sent - (*SendStatus_Delivered)(nil), // 145: signal.backup.SendStatus.Delivered - (*SendStatus_Read)(nil), // 146: signal.backup.SendStatus.Read - (*SendStatus_Viewed)(nil), // 147: signal.backup.SendStatus.Viewed - (*SendStatus_Skipped)(nil), // 148: signal.backup.SendStatus.Skipped - (*SendStatus_Failed)(nil), // 149: signal.backup.SendStatus.Failed - (*DirectStoryReplyMessage_TextReply)(nil), // 150: signal.backup.DirectStoryReplyMessage.TextReply - (*PaymentNotification_TransactionDetails)(nil), // 151: signal.backup.PaymentNotification.TransactionDetails - (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification)(nil), // 152: signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification - (*PaymentNotification_TransactionDetails_FailedTransaction)(nil), // 153: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction - (*PaymentNotification_TransactionDetails_Transaction)(nil), // 154: signal.backup.PaymentNotification.TransactionDetails.Transaction - (*ContactAttachment_Name)(nil), // 155: signal.backup.ContactAttachment.Name - (*ContactAttachment_Phone)(nil), // 156: signal.backup.ContactAttachment.Phone - (*ContactAttachment_Email)(nil), // 157: signal.backup.ContactAttachment.Email - (*ContactAttachment_PostalAddress)(nil), // 158: signal.backup.ContactAttachment.PostalAddress - (*FilePointer_LocatorInfo)(nil), // 159: signal.backup.FilePointer.LocatorInfo - (*Quote_QuotedAttachment)(nil), // 160: signal.backup.Quote.QuotedAttachment - (*Poll_PollOption)(nil), // 161: signal.backup.Poll.PollOption - (*Poll_PollOption_PollVote)(nil), // 162: signal.backup.Poll.PollOption.PollVote - (*GroupChangeChatUpdate_Update)(nil), // 163: signal.backup.GroupChangeChatUpdate.Update - (*GroupInvitationRevokedUpdate_Invitee)(nil), // 164: signal.backup.GroupInvitationRevokedUpdate.Invitee - (*ChatStyle_Gradient)(nil), // 165: signal.backup.ChatStyle.Gradient - (*ChatStyle_CustomChatColor)(nil), // 166: signal.backup.ChatStyle.CustomChatColor - (*ChatStyle_AutomaticBubbleColor)(nil), // 167: signal.backup.ChatStyle.AutomaticBubbleColor + (*AccountData_IOSSpecificSettings)(nil), // 129: signal.backup.AccountData.IOSSpecificSettings + (*Contact_Registered)(nil), // 130: signal.backup.Contact.Registered + (*Contact_NotRegistered)(nil), // 131: signal.backup.Contact.NotRegistered + (*Contact_Name)(nil), // 132: signal.backup.Contact.Name + (*Group_GroupSnapshot)(nil), // 133: signal.backup.Group.GroupSnapshot + (*Group_GroupAttributeBlob)(nil), // 134: signal.backup.Group.GroupAttributeBlob + (*Group_Member)(nil), // 135: signal.backup.Group.Member + (*Group_MemberPendingProfileKey)(nil), // 136: signal.backup.Group.MemberPendingProfileKey + (*Group_MemberPendingAdminApproval)(nil), // 137: signal.backup.Group.MemberPendingAdminApproval + (*Group_MemberBanned)(nil), // 138: signal.backup.Group.MemberBanned + (*Group_AccessControl)(nil), // 139: signal.backup.Group.AccessControl + (*ChatItem_IncomingMessageDetails)(nil), // 140: signal.backup.ChatItem.IncomingMessageDetails + (*ChatItem_OutgoingMessageDetails)(nil), // 141: signal.backup.ChatItem.OutgoingMessageDetails + (*ChatItem_DirectionlessMessageDetails)(nil), // 142: signal.backup.ChatItem.DirectionlessMessageDetails + (*ChatItem_PinDetails)(nil), // 143: signal.backup.ChatItem.PinDetails + (*SendStatus_Pending)(nil), // 144: signal.backup.SendStatus.Pending + (*SendStatus_Sent)(nil), // 145: signal.backup.SendStatus.Sent + (*SendStatus_Delivered)(nil), // 146: signal.backup.SendStatus.Delivered + (*SendStatus_Read)(nil), // 147: signal.backup.SendStatus.Read + (*SendStatus_Viewed)(nil), // 148: signal.backup.SendStatus.Viewed + (*SendStatus_Skipped)(nil), // 149: signal.backup.SendStatus.Skipped + (*SendStatus_Failed)(nil), // 150: signal.backup.SendStatus.Failed + (*DirectStoryReplyMessage_TextReply)(nil), // 151: signal.backup.DirectStoryReplyMessage.TextReply + (*PaymentNotification_TransactionDetails)(nil), // 152: signal.backup.PaymentNotification.TransactionDetails + (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification)(nil), // 153: signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification + (*PaymentNotification_TransactionDetails_FailedTransaction)(nil), // 154: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction + (*PaymentNotification_TransactionDetails_Transaction)(nil), // 155: signal.backup.PaymentNotification.TransactionDetails.Transaction + (*ContactAttachment_Name)(nil), // 156: signal.backup.ContactAttachment.Name + (*ContactAttachment_SignalNickname)(nil), // 157: signal.backup.ContactAttachment.SignalNickname + (*ContactAttachment_Phone)(nil), // 158: signal.backup.ContactAttachment.Phone + (*ContactAttachment_Email)(nil), // 159: signal.backup.ContactAttachment.Email + (*ContactAttachment_PostalAddress)(nil), // 160: signal.backup.ContactAttachment.PostalAddress + (*FilePointer_LocatorInfo)(nil), // 161: signal.backup.FilePointer.LocatorInfo + (*Quote_QuotedAttachment)(nil), // 162: signal.backup.Quote.QuotedAttachment + (*Poll_PollOption)(nil), // 163: signal.backup.Poll.PollOption + (*Poll_PollOption_PollVote)(nil), // 164: signal.backup.Poll.PollOption.PollVote + (*GroupChangeChatUpdate_Update)(nil), // 165: signal.backup.GroupChangeChatUpdate.Update + (*GroupInvitationRevokedUpdate_Invitee)(nil), // 166: signal.backup.GroupInvitationRevokedUpdate.Invitee + (*ChatStyle_Gradient)(nil), // 167: signal.backup.ChatStyle.Gradient + (*ChatStyle_CustomChatColor)(nil), // 168: signal.backup.ChatStyle.CustomChatColor + (*ChatStyle_AutomaticBubbleColor)(nil), // 169: signal.backup.ChatStyle.AutomaticBubbleColor } var file_backuppb_Backup_proto_depIdxs = []int32{ 39, // 0: signal.backup.Frame.account:type_name -> signal.backup.AccountData @@ -13803,194 +13998,197 @@ var file_backuppb_Backup_proto_depIdxs = []int32{ 125, // 10: signal.backup.AccountData.accountSettings:type_name -> signal.backup.AccountData.AccountSettings 127, // 11: signal.backup.AccountData.backupsSubscriberData:type_name -> signal.backup.AccountData.IAPSubscriberData 128, // 12: signal.backup.AccountData.androidSpecificSettings:type_name -> signal.backup.AccountData.AndroidSpecificSettings - 41, // 13: signal.backup.Recipient.contact:type_name -> signal.backup.Contact - 42, // 14: signal.backup.Recipient.group:type_name -> signal.backup.Group - 48, // 15: signal.backup.Recipient.distributionList:type_name -> signal.backup.DistributionListItem - 43, // 16: signal.backup.Recipient.self:type_name -> signal.backup.Self - 44, // 17: signal.backup.Recipient.releaseNotes:type_name -> signal.backup.ReleaseNotes - 46, // 18: signal.backup.Recipient.callLink:type_name -> signal.backup.CallLink - 11, // 19: signal.backup.Contact.visibility:type_name -> signal.backup.Contact.Visibility - 129, // 20: signal.backup.Contact.registered:type_name -> signal.backup.Contact.Registered - 130, // 21: signal.backup.Contact.notRegistered:type_name -> signal.backup.Contact.NotRegistered - 10, // 22: signal.backup.Contact.identityState:type_name -> signal.backup.Contact.IdentityState - 131, // 23: signal.backup.Contact.nickname:type_name -> signal.backup.Contact.Name - 0, // 24: signal.backup.Contact.avatarColor:type_name -> signal.backup.AvatarColor - 12, // 25: signal.backup.Group.storySendMode:type_name -> signal.backup.Group.StorySendMode - 132, // 26: signal.backup.Group.snapshot:type_name -> signal.backup.Group.GroupSnapshot - 0, // 27: signal.backup.Group.avatarColor:type_name -> signal.backup.AvatarColor - 0, // 28: signal.backup.Self.avatarColor:type_name -> signal.backup.AvatarColor - 120, // 29: signal.backup.Chat.style:type_name -> signal.backup.ChatStyle - 15, // 30: signal.backup.CallLink.restrictions:type_name -> signal.backup.CallLink.Restrictions - 16, // 31: signal.backup.AdHocCall.state:type_name -> signal.backup.AdHocCall.State - 49, // 32: signal.backup.DistributionListItem.distributionList:type_name -> signal.backup.DistributionList - 17, // 33: signal.backup.DistributionList.privacyMode:type_name -> signal.backup.DistributionList.PrivacyMode - 50, // 34: signal.backup.ChatItem.revisions:type_name -> signal.backup.ChatItem - 139, // 35: signal.backup.ChatItem.incoming:type_name -> signal.backup.ChatItem.IncomingMessageDetails - 140, // 36: signal.backup.ChatItem.outgoing:type_name -> signal.backup.ChatItem.OutgoingMessageDetails - 141, // 37: signal.backup.ChatItem.directionless:type_name -> signal.backup.ChatItem.DirectionlessMessageDetails - 53, // 38: signal.backup.ChatItem.standardMessage:type_name -> signal.backup.StandardMessage - 54, // 39: signal.backup.ChatItem.contactMessage:type_name -> signal.backup.ContactMessage - 60, // 40: signal.backup.ChatItem.stickerMessage:type_name -> signal.backup.StickerMessage - 61, // 41: signal.backup.ChatItem.remoteDeletedMessage:type_name -> signal.backup.RemoteDeletedMessage - 71, // 42: signal.backup.ChatItem.updateMessage:type_name -> signal.backup.ChatUpdateMessage - 56, // 43: signal.backup.ChatItem.paymentNotification:type_name -> signal.backup.PaymentNotification - 57, // 44: signal.backup.ChatItem.giftBadge:type_name -> signal.backup.GiftBadge - 58, // 45: signal.backup.ChatItem.viewOnceMessage:type_name -> signal.backup.ViewOnceMessage - 55, // 46: signal.backup.ChatItem.directStoryReplyMessage:type_name -> signal.backup.DirectStoryReplyMessage - 69, // 47: signal.backup.ChatItem.poll:type_name -> signal.backup.Poll - 70, // 48: signal.backup.ChatItem.adminDeletedMessage:type_name -> signal.backup.AdminDeletedMessage - 142, // 49: signal.backup.ChatItem.pinDetails:type_name -> signal.backup.ChatItem.PinDetails - 143, // 50: signal.backup.SendStatus.pending:type_name -> signal.backup.SendStatus.Pending - 144, // 51: signal.backup.SendStatus.sent:type_name -> signal.backup.SendStatus.Sent - 145, // 52: signal.backup.SendStatus.delivered:type_name -> signal.backup.SendStatus.Delivered - 146, // 53: signal.backup.SendStatus.read:type_name -> signal.backup.SendStatus.Read - 147, // 54: signal.backup.SendStatus.viewed:type_name -> signal.backup.SendStatus.Viewed - 148, // 55: signal.backup.SendStatus.skipped:type_name -> signal.backup.SendStatus.Skipped - 149, // 56: signal.backup.SendStatus.failed:type_name -> signal.backup.SendStatus.Failed - 67, // 57: signal.backup.Text.bodyRanges:type_name -> signal.backup.BodyRange - 66, // 58: signal.backup.StandardMessage.quote:type_name -> signal.backup.Quote - 52, // 59: signal.backup.StandardMessage.text:type_name -> signal.backup.Text - 64, // 60: signal.backup.StandardMessage.attachments:type_name -> signal.backup.MessageAttachment - 63, // 61: signal.backup.StandardMessage.linkPreview:type_name -> signal.backup.LinkPreview - 65, // 62: signal.backup.StandardMessage.longText:type_name -> signal.backup.FilePointer - 68, // 63: signal.backup.StandardMessage.reactions:type_name -> signal.backup.Reaction - 59, // 64: signal.backup.ContactMessage.contact:type_name -> signal.backup.ContactAttachment - 68, // 65: signal.backup.ContactMessage.reactions:type_name -> signal.backup.Reaction - 150, // 66: signal.backup.DirectStoryReplyMessage.textReply:type_name -> signal.backup.DirectStoryReplyMessage.TextReply - 68, // 67: signal.backup.DirectStoryReplyMessage.reactions:type_name -> signal.backup.Reaction - 151, // 68: signal.backup.PaymentNotification.transactionDetails:type_name -> signal.backup.PaymentNotification.TransactionDetails - 21, // 69: signal.backup.GiftBadge.state:type_name -> signal.backup.GiftBadge.State - 64, // 70: signal.backup.ViewOnceMessage.attachment:type_name -> signal.backup.MessageAttachment - 68, // 71: signal.backup.ViewOnceMessage.reactions:type_name -> signal.backup.Reaction - 155, // 72: signal.backup.ContactAttachment.name:type_name -> signal.backup.ContactAttachment.Name - 156, // 73: signal.backup.ContactAttachment.number:type_name -> signal.backup.ContactAttachment.Phone - 157, // 74: signal.backup.ContactAttachment.email:type_name -> signal.backup.ContactAttachment.Email - 158, // 75: signal.backup.ContactAttachment.address:type_name -> signal.backup.ContactAttachment.PostalAddress - 65, // 76: signal.backup.ContactAttachment.avatar:type_name -> signal.backup.FilePointer - 62, // 77: signal.backup.StickerMessage.sticker:type_name -> signal.backup.Sticker - 68, // 78: signal.backup.StickerMessage.reactions:type_name -> signal.backup.Reaction - 65, // 79: signal.backup.Sticker.data:type_name -> signal.backup.FilePointer - 65, // 80: signal.backup.LinkPreview.image:type_name -> signal.backup.FilePointer - 65, // 81: signal.backup.MessageAttachment.pointer:type_name -> signal.backup.FilePointer - 25, // 82: signal.backup.MessageAttachment.flag:type_name -> signal.backup.MessageAttachment.Flag - 159, // 83: signal.backup.FilePointer.locatorInfo:type_name -> signal.backup.FilePointer.LocatorInfo - 52, // 84: signal.backup.Quote.text:type_name -> signal.backup.Text - 160, // 85: signal.backup.Quote.attachments:type_name -> signal.backup.Quote.QuotedAttachment - 26, // 86: signal.backup.Quote.type:type_name -> signal.backup.Quote.Type - 27, // 87: signal.backup.BodyRange.style:type_name -> signal.backup.BodyRange.Style - 161, // 88: signal.backup.Poll.options:type_name -> signal.backup.Poll.PollOption - 68, // 89: signal.backup.Poll.reactions:type_name -> signal.backup.Reaction - 74, // 90: signal.backup.ChatUpdateMessage.simpleUpdate:type_name -> signal.backup.SimpleChatUpdate - 80, // 91: signal.backup.ChatUpdateMessage.groupChange:type_name -> signal.backup.GroupChangeChatUpdate - 75, // 92: signal.backup.ChatUpdateMessage.expirationTimerChange:type_name -> signal.backup.ExpirationTimerChatUpdate - 76, // 93: signal.backup.ChatUpdateMessage.profileChange:type_name -> signal.backup.ProfileChangeChatUpdate - 78, // 94: signal.backup.ChatUpdateMessage.threadMerge:type_name -> signal.backup.ThreadMergeChatUpdate - 79, // 95: signal.backup.ChatUpdateMessage.sessionSwitchover:type_name -> signal.backup.SessionSwitchoverChatUpdate - 72, // 96: signal.backup.ChatUpdateMessage.individualCall:type_name -> signal.backup.IndividualCall - 73, // 97: signal.backup.ChatUpdateMessage.groupCall:type_name -> signal.backup.GroupCall - 77, // 98: signal.backup.ChatUpdateMessage.learnedProfileChange:type_name -> signal.backup.LearnedProfileChatUpdate - 117, // 99: signal.backup.ChatUpdateMessage.pollTerminate:type_name -> signal.backup.PollTerminateUpdate - 118, // 100: signal.backup.ChatUpdateMessage.pinMessage:type_name -> signal.backup.PinMessageUpdate - 28, // 101: signal.backup.IndividualCall.type:type_name -> signal.backup.IndividualCall.Type - 29, // 102: signal.backup.IndividualCall.direction:type_name -> signal.backup.IndividualCall.Direction - 30, // 103: signal.backup.IndividualCall.state:type_name -> signal.backup.IndividualCall.State - 31, // 104: signal.backup.GroupCall.state:type_name -> signal.backup.GroupCall.State - 32, // 105: signal.backup.SimpleChatUpdate.type:type_name -> signal.backup.SimpleChatUpdate.Type - 163, // 106: signal.backup.GroupChangeChatUpdate.updates:type_name -> signal.backup.GroupChangeChatUpdate.Update - 1, // 107: signal.backup.GroupMembershipAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel - 1, // 108: signal.backup.GroupAttributesAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel - 1, // 109: signal.backup.GroupMemberLabelAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel - 164, // 110: signal.backup.GroupInvitationRevokedUpdate.invitees:type_name -> signal.backup.GroupInvitationRevokedUpdate.Invitee - 33, // 111: signal.backup.ChatStyle.wallpaperPreset:type_name -> signal.backup.ChatStyle.WallpaperPreset - 65, // 112: signal.backup.ChatStyle.wallpaperPhoto:type_name -> signal.backup.FilePointer - 167, // 113: signal.backup.ChatStyle.autoBubbleColor:type_name -> signal.backup.ChatStyle.AutomaticBubbleColor - 34, // 114: signal.backup.ChatStyle.bubbleColorPreset:type_name -> signal.backup.ChatStyle.BubbleColorPreset - 35, // 115: signal.backup.NotificationProfile.scheduleDaysEnabled:type_name -> signal.backup.NotificationProfile.DayOfWeek - 36, // 116: signal.backup.ChatFolder.folderType:type_name -> signal.backup.ChatFolder.FolderType - 6, // 117: signal.backup.AccountData.UsernameLink.color:type_name -> signal.backup.AccountData.UsernameLink.Color - 7, // 118: signal.backup.AccountData.AutoDownloadSettings.images:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 7, // 119: signal.backup.AccountData.AutoDownloadSettings.audio:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 7, // 120: signal.backup.AccountData.AutoDownloadSettings.video:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 7, // 121: signal.backup.AccountData.AutoDownloadSettings.documents:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 2, // 122: signal.backup.AccountData.AccountSettings.phoneNumberSharingMode:type_name -> signal.backup.AccountData.PhoneNumberSharingMode - 120, // 123: signal.backup.AccountData.AccountSettings.defaultChatStyle:type_name -> signal.backup.ChatStyle - 166, // 124: signal.backup.AccountData.AccountSettings.customChatColors:type_name -> signal.backup.ChatStyle.CustomChatColor - 3, // 125: signal.backup.AccountData.AccountSettings.defaultSentMediaQuality:type_name -> signal.backup.AccountData.SentMediaQuality - 124, // 126: signal.backup.AccountData.AccountSettings.autoDownloadSettings:type_name -> signal.backup.AccountData.AutoDownloadSettings - 4, // 127: signal.backup.AccountData.AccountSettings.appTheme:type_name -> signal.backup.AccountData.AppTheme - 5, // 128: signal.backup.AccountData.AccountSettings.callsUseLessDataSetting:type_name -> signal.backup.AccountData.CallsUseLessDataSetting - 8, // 129: signal.backup.AccountData.AccountSettings.unreadBadgeType:type_name -> signal.backup.AccountData.AccountSettings.UnreadBadgeType - 9, // 130: signal.backup.AccountData.AndroidSpecificSettings.navigationBarSize:type_name -> signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize - 133, // 131: signal.backup.Group.GroupSnapshot.title:type_name -> signal.backup.Group.GroupAttributeBlob - 133, // 132: signal.backup.Group.GroupSnapshot.description:type_name -> signal.backup.Group.GroupAttributeBlob - 133, // 133: signal.backup.Group.GroupSnapshot.disappearingMessagesTimer:type_name -> signal.backup.Group.GroupAttributeBlob - 138, // 134: signal.backup.Group.GroupSnapshot.accessControl:type_name -> signal.backup.Group.AccessControl - 134, // 135: signal.backup.Group.GroupSnapshot.members:type_name -> signal.backup.Group.Member - 135, // 136: signal.backup.Group.GroupSnapshot.membersPendingProfileKey:type_name -> signal.backup.Group.MemberPendingProfileKey - 136, // 137: signal.backup.Group.GroupSnapshot.membersPendingAdminApproval:type_name -> signal.backup.Group.MemberPendingAdminApproval - 137, // 138: signal.backup.Group.GroupSnapshot.members_banned:type_name -> signal.backup.Group.MemberBanned - 13, // 139: signal.backup.Group.Member.role:type_name -> signal.backup.Group.Member.Role - 134, // 140: signal.backup.Group.MemberPendingProfileKey.member:type_name -> signal.backup.Group.Member - 14, // 141: signal.backup.Group.AccessControl.attributes:type_name -> signal.backup.Group.AccessControl.AccessRequired - 14, // 142: signal.backup.Group.AccessControl.members:type_name -> signal.backup.Group.AccessControl.AccessRequired - 14, // 143: signal.backup.Group.AccessControl.addFromInviteLink:type_name -> signal.backup.Group.AccessControl.AccessRequired - 14, // 144: signal.backup.Group.AccessControl.memberLabel:type_name -> signal.backup.Group.AccessControl.AccessRequired - 51, // 145: signal.backup.ChatItem.OutgoingMessageDetails.sendStatus:type_name -> signal.backup.SendStatus - 18, // 146: signal.backup.SendStatus.Failed.reason:type_name -> signal.backup.SendStatus.Failed.FailureReason - 52, // 147: signal.backup.DirectStoryReplyMessage.TextReply.text:type_name -> signal.backup.Text - 65, // 148: signal.backup.DirectStoryReplyMessage.TextReply.longText:type_name -> signal.backup.FilePointer - 154, // 149: signal.backup.PaymentNotification.TransactionDetails.transaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction - 153, // 150: signal.backup.PaymentNotification.TransactionDetails.failedTransaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction - 19, // 151: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.reason:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason - 20, // 152: signal.backup.PaymentNotification.TransactionDetails.Transaction.status:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction.Status - 152, // 153: signal.backup.PaymentNotification.TransactionDetails.Transaction.mobileCoinIdentification:type_name -> signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification - 22, // 154: signal.backup.ContactAttachment.Phone.type:type_name -> signal.backup.ContactAttachment.Phone.Type - 23, // 155: signal.backup.ContactAttachment.Email.type:type_name -> signal.backup.ContactAttachment.Email.Type - 24, // 156: signal.backup.ContactAttachment.PostalAddress.type:type_name -> signal.backup.ContactAttachment.PostalAddress.Type - 64, // 157: signal.backup.Quote.QuotedAttachment.thumbnail:type_name -> signal.backup.MessageAttachment - 162, // 158: signal.backup.Poll.PollOption.votes:type_name -> signal.backup.Poll.PollOption.PollVote - 81, // 159: signal.backup.GroupChangeChatUpdate.Update.genericGroupUpdate:type_name -> signal.backup.GenericGroupUpdate - 82, // 160: signal.backup.GroupChangeChatUpdate.Update.groupCreationUpdate:type_name -> signal.backup.GroupCreationUpdate - 83, // 161: signal.backup.GroupChangeChatUpdate.Update.groupNameUpdate:type_name -> signal.backup.GroupNameUpdate - 84, // 162: signal.backup.GroupChangeChatUpdate.Update.groupAvatarUpdate:type_name -> signal.backup.GroupAvatarUpdate - 85, // 163: signal.backup.GroupChangeChatUpdate.Update.groupDescriptionUpdate:type_name -> signal.backup.GroupDescriptionUpdate - 86, // 164: signal.backup.GroupChangeChatUpdate.Update.groupMembershipAccessLevelChangeUpdate:type_name -> signal.backup.GroupMembershipAccessLevelChangeUpdate - 87, // 165: signal.backup.GroupChangeChatUpdate.Update.groupAttributesAccessLevelChangeUpdate:type_name -> signal.backup.GroupAttributesAccessLevelChangeUpdate - 90, // 166: signal.backup.GroupChangeChatUpdate.Update.groupAnnouncementOnlyChangeUpdate:type_name -> signal.backup.GroupAnnouncementOnlyChangeUpdate - 91, // 167: signal.backup.GroupChangeChatUpdate.Update.groupAdminStatusUpdate:type_name -> signal.backup.GroupAdminStatusUpdate - 92, // 168: signal.backup.GroupChangeChatUpdate.Update.groupMemberLeftUpdate:type_name -> signal.backup.GroupMemberLeftUpdate - 93, // 169: signal.backup.GroupChangeChatUpdate.Update.groupMemberRemovedUpdate:type_name -> signal.backup.GroupMemberRemovedUpdate - 94, // 170: signal.backup.GroupChangeChatUpdate.Update.selfInvitedToGroupUpdate:type_name -> signal.backup.SelfInvitedToGroupUpdate - 95, // 171: signal.backup.GroupChangeChatUpdate.Update.selfInvitedOtherUserToGroupUpdate:type_name -> signal.backup.SelfInvitedOtherUserToGroupUpdate - 96, // 172: signal.backup.GroupChangeChatUpdate.Update.groupUnknownInviteeUpdate:type_name -> signal.backup.GroupUnknownInviteeUpdate - 97, // 173: signal.backup.GroupChangeChatUpdate.Update.groupInvitationAcceptedUpdate:type_name -> signal.backup.GroupInvitationAcceptedUpdate - 98, // 174: signal.backup.GroupChangeChatUpdate.Update.groupInvitationDeclinedUpdate:type_name -> signal.backup.GroupInvitationDeclinedUpdate - 99, // 175: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedUpdate:type_name -> signal.backup.GroupMemberJoinedUpdate - 100, // 176: signal.backup.GroupChangeChatUpdate.Update.groupMemberAddedUpdate:type_name -> signal.backup.GroupMemberAddedUpdate - 101, // 177: signal.backup.GroupChangeChatUpdate.Update.groupSelfInvitationRevokedUpdate:type_name -> signal.backup.GroupSelfInvitationRevokedUpdate - 102, // 178: signal.backup.GroupChangeChatUpdate.Update.groupInvitationRevokedUpdate:type_name -> signal.backup.GroupInvitationRevokedUpdate - 103, // 179: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestUpdate:type_name -> signal.backup.GroupJoinRequestUpdate - 104, // 180: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestApprovalUpdate:type_name -> signal.backup.GroupJoinRequestApprovalUpdate - 105, // 181: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestCanceledUpdate:type_name -> signal.backup.GroupJoinRequestCanceledUpdate - 107, // 182: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkResetUpdate:type_name -> signal.backup.GroupInviteLinkResetUpdate - 108, // 183: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkEnabledUpdate:type_name -> signal.backup.GroupInviteLinkEnabledUpdate - 109, // 184: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkAdminApprovalUpdate:type_name -> signal.backup.GroupInviteLinkAdminApprovalUpdate - 110, // 185: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkDisabledUpdate:type_name -> signal.backup.GroupInviteLinkDisabledUpdate - 111, // 186: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedByLinkUpdate:type_name -> signal.backup.GroupMemberJoinedByLinkUpdate - 112, // 187: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationUpdate:type_name -> signal.backup.GroupV2MigrationUpdate - 113, // 188: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationSelfInvitedUpdate:type_name -> signal.backup.GroupV2MigrationSelfInvitedUpdate - 114, // 189: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationInvitedMembersUpdate:type_name -> signal.backup.GroupV2MigrationInvitedMembersUpdate - 115, // 190: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationDroppedMembersUpdate:type_name -> signal.backup.GroupV2MigrationDroppedMembersUpdate - 106, // 191: signal.backup.GroupChangeChatUpdate.Update.groupSequenceOfRequestsAndCancelsUpdate:type_name -> signal.backup.GroupSequenceOfRequestsAndCancelsUpdate - 116, // 192: signal.backup.GroupChangeChatUpdate.Update.groupExpirationTimerUpdate:type_name -> signal.backup.GroupExpirationTimerUpdate - 88, // 193: signal.backup.GroupChangeChatUpdate.Update.groupMemberLabelAccessLevelChangeUpdate:type_name -> signal.backup.GroupMemberLabelAccessLevelChangeUpdate - 89, // 194: signal.backup.GroupChangeChatUpdate.Update.groupTerminateChangeUpdate:type_name -> signal.backup.GroupTerminateChangeUpdate - 165, // 195: signal.backup.ChatStyle.CustomChatColor.gradient:type_name -> signal.backup.ChatStyle.Gradient - 196, // [196:196] is the sub-list for method output_type - 196, // [196:196] is the sub-list for method input_type - 196, // [196:196] is the sub-list for extension type_name - 196, // [196:196] is the sub-list for extension extendee - 0, // [0:196] is the sub-list for field type_name + 129, // 13: signal.backup.AccountData.iosSpecificSettings:type_name -> signal.backup.AccountData.IOSSpecificSettings + 41, // 14: signal.backup.Recipient.contact:type_name -> signal.backup.Contact + 42, // 15: signal.backup.Recipient.group:type_name -> signal.backup.Group + 48, // 16: signal.backup.Recipient.distributionList:type_name -> signal.backup.DistributionListItem + 43, // 17: signal.backup.Recipient.self:type_name -> signal.backup.Self + 44, // 18: signal.backup.Recipient.releaseNotes:type_name -> signal.backup.ReleaseNotes + 46, // 19: signal.backup.Recipient.callLink:type_name -> signal.backup.CallLink + 11, // 20: signal.backup.Contact.visibility:type_name -> signal.backup.Contact.Visibility + 130, // 21: signal.backup.Contact.registered:type_name -> signal.backup.Contact.Registered + 131, // 22: signal.backup.Contact.notRegistered:type_name -> signal.backup.Contact.NotRegistered + 10, // 23: signal.backup.Contact.identityState:type_name -> signal.backup.Contact.IdentityState + 132, // 24: signal.backup.Contact.nickname:type_name -> signal.backup.Contact.Name + 0, // 25: signal.backup.Contact.avatarColor:type_name -> signal.backup.AvatarColor + 132, // 26: signal.backup.Contact.sharedName:type_name -> signal.backup.Contact.Name + 12, // 27: signal.backup.Group.storySendMode:type_name -> signal.backup.Group.StorySendMode + 133, // 28: signal.backup.Group.snapshot:type_name -> signal.backup.Group.GroupSnapshot + 0, // 29: signal.backup.Group.avatarColor:type_name -> signal.backup.AvatarColor + 0, // 30: signal.backup.Self.avatarColor:type_name -> signal.backup.AvatarColor + 120, // 31: signal.backup.Chat.style:type_name -> signal.backup.ChatStyle + 15, // 32: signal.backup.CallLink.restrictions:type_name -> signal.backup.CallLink.Restrictions + 16, // 33: signal.backup.AdHocCall.state:type_name -> signal.backup.AdHocCall.State + 49, // 34: signal.backup.DistributionListItem.distributionList:type_name -> signal.backup.DistributionList + 17, // 35: signal.backup.DistributionList.privacyMode:type_name -> signal.backup.DistributionList.PrivacyMode + 50, // 36: signal.backup.ChatItem.revisions:type_name -> signal.backup.ChatItem + 140, // 37: signal.backup.ChatItem.incoming:type_name -> signal.backup.ChatItem.IncomingMessageDetails + 141, // 38: signal.backup.ChatItem.outgoing:type_name -> signal.backup.ChatItem.OutgoingMessageDetails + 142, // 39: signal.backup.ChatItem.directionless:type_name -> signal.backup.ChatItem.DirectionlessMessageDetails + 53, // 40: signal.backup.ChatItem.standardMessage:type_name -> signal.backup.StandardMessage + 54, // 41: signal.backup.ChatItem.contactMessage:type_name -> signal.backup.ContactMessage + 60, // 42: signal.backup.ChatItem.stickerMessage:type_name -> signal.backup.StickerMessage + 61, // 43: signal.backup.ChatItem.remoteDeletedMessage:type_name -> signal.backup.RemoteDeletedMessage + 71, // 44: signal.backup.ChatItem.updateMessage:type_name -> signal.backup.ChatUpdateMessage + 56, // 45: signal.backup.ChatItem.paymentNotification:type_name -> signal.backup.PaymentNotification + 57, // 46: signal.backup.ChatItem.giftBadge:type_name -> signal.backup.GiftBadge + 58, // 47: signal.backup.ChatItem.viewOnceMessage:type_name -> signal.backup.ViewOnceMessage + 55, // 48: signal.backup.ChatItem.directStoryReplyMessage:type_name -> signal.backup.DirectStoryReplyMessage + 69, // 49: signal.backup.ChatItem.poll:type_name -> signal.backup.Poll + 70, // 50: signal.backup.ChatItem.adminDeletedMessage:type_name -> signal.backup.AdminDeletedMessage + 143, // 51: signal.backup.ChatItem.pinDetails:type_name -> signal.backup.ChatItem.PinDetails + 144, // 52: signal.backup.SendStatus.pending:type_name -> signal.backup.SendStatus.Pending + 145, // 53: signal.backup.SendStatus.sent:type_name -> signal.backup.SendStatus.Sent + 146, // 54: signal.backup.SendStatus.delivered:type_name -> signal.backup.SendStatus.Delivered + 147, // 55: signal.backup.SendStatus.read:type_name -> signal.backup.SendStatus.Read + 148, // 56: signal.backup.SendStatus.viewed:type_name -> signal.backup.SendStatus.Viewed + 149, // 57: signal.backup.SendStatus.skipped:type_name -> signal.backup.SendStatus.Skipped + 150, // 58: signal.backup.SendStatus.failed:type_name -> signal.backup.SendStatus.Failed + 67, // 59: signal.backup.Text.bodyRanges:type_name -> signal.backup.BodyRange + 66, // 60: signal.backup.StandardMessage.quote:type_name -> signal.backup.Quote + 52, // 61: signal.backup.StandardMessage.text:type_name -> signal.backup.Text + 64, // 62: signal.backup.StandardMessage.attachments:type_name -> signal.backup.MessageAttachment + 63, // 63: signal.backup.StandardMessage.linkPreview:type_name -> signal.backup.LinkPreview + 65, // 64: signal.backup.StandardMessage.longText:type_name -> signal.backup.FilePointer + 68, // 65: signal.backup.StandardMessage.reactions:type_name -> signal.backup.Reaction + 59, // 66: signal.backup.ContactMessage.contact:type_name -> signal.backup.ContactAttachment + 68, // 67: signal.backup.ContactMessage.reactions:type_name -> signal.backup.Reaction + 151, // 68: signal.backup.DirectStoryReplyMessage.textReply:type_name -> signal.backup.DirectStoryReplyMessage.TextReply + 68, // 69: signal.backup.DirectStoryReplyMessage.reactions:type_name -> signal.backup.Reaction + 152, // 70: signal.backup.PaymentNotification.transactionDetails:type_name -> signal.backup.PaymentNotification.TransactionDetails + 21, // 71: signal.backup.GiftBadge.state:type_name -> signal.backup.GiftBadge.State + 64, // 72: signal.backup.ViewOnceMessage.attachment:type_name -> signal.backup.MessageAttachment + 68, // 73: signal.backup.ViewOnceMessage.reactions:type_name -> signal.backup.Reaction + 156, // 74: signal.backup.ContactAttachment.name:type_name -> signal.backup.ContactAttachment.Name + 158, // 75: signal.backup.ContactAttachment.number:type_name -> signal.backup.ContactAttachment.Phone + 159, // 76: signal.backup.ContactAttachment.email:type_name -> signal.backup.ContactAttachment.Email + 160, // 77: signal.backup.ContactAttachment.address:type_name -> signal.backup.ContactAttachment.PostalAddress + 65, // 78: signal.backup.ContactAttachment.avatar:type_name -> signal.backup.FilePointer + 157, // 79: signal.backup.ContactAttachment.nickname:type_name -> signal.backup.ContactAttachment.SignalNickname + 62, // 80: signal.backup.StickerMessage.sticker:type_name -> signal.backup.Sticker + 68, // 81: signal.backup.StickerMessage.reactions:type_name -> signal.backup.Reaction + 65, // 82: signal.backup.Sticker.data:type_name -> signal.backup.FilePointer + 65, // 83: signal.backup.LinkPreview.image:type_name -> signal.backup.FilePointer + 65, // 84: signal.backup.MessageAttachment.pointer:type_name -> signal.backup.FilePointer + 25, // 85: signal.backup.MessageAttachment.flag:type_name -> signal.backup.MessageAttachment.Flag + 161, // 86: signal.backup.FilePointer.locatorInfo:type_name -> signal.backup.FilePointer.LocatorInfo + 52, // 87: signal.backup.Quote.text:type_name -> signal.backup.Text + 162, // 88: signal.backup.Quote.attachments:type_name -> signal.backup.Quote.QuotedAttachment + 26, // 89: signal.backup.Quote.type:type_name -> signal.backup.Quote.Type + 27, // 90: signal.backup.BodyRange.style:type_name -> signal.backup.BodyRange.Style + 163, // 91: signal.backup.Poll.options:type_name -> signal.backup.Poll.PollOption + 68, // 92: signal.backup.Poll.reactions:type_name -> signal.backup.Reaction + 74, // 93: signal.backup.ChatUpdateMessage.simpleUpdate:type_name -> signal.backup.SimpleChatUpdate + 80, // 94: signal.backup.ChatUpdateMessage.groupChange:type_name -> signal.backup.GroupChangeChatUpdate + 75, // 95: signal.backup.ChatUpdateMessage.expirationTimerChange:type_name -> signal.backup.ExpirationTimerChatUpdate + 76, // 96: signal.backup.ChatUpdateMessage.profileChange:type_name -> signal.backup.ProfileChangeChatUpdate + 78, // 97: signal.backup.ChatUpdateMessage.threadMerge:type_name -> signal.backup.ThreadMergeChatUpdate + 79, // 98: signal.backup.ChatUpdateMessage.sessionSwitchover:type_name -> signal.backup.SessionSwitchoverChatUpdate + 72, // 99: signal.backup.ChatUpdateMessage.individualCall:type_name -> signal.backup.IndividualCall + 73, // 100: signal.backup.ChatUpdateMessage.groupCall:type_name -> signal.backup.GroupCall + 77, // 101: signal.backup.ChatUpdateMessage.learnedProfileChange:type_name -> signal.backup.LearnedProfileChatUpdate + 117, // 102: signal.backup.ChatUpdateMessage.pollTerminate:type_name -> signal.backup.PollTerminateUpdate + 118, // 103: signal.backup.ChatUpdateMessage.pinMessage:type_name -> signal.backup.PinMessageUpdate + 28, // 104: signal.backup.IndividualCall.type:type_name -> signal.backup.IndividualCall.Type + 29, // 105: signal.backup.IndividualCall.direction:type_name -> signal.backup.IndividualCall.Direction + 30, // 106: signal.backup.IndividualCall.state:type_name -> signal.backup.IndividualCall.State + 31, // 107: signal.backup.GroupCall.state:type_name -> signal.backup.GroupCall.State + 32, // 108: signal.backup.SimpleChatUpdate.type:type_name -> signal.backup.SimpleChatUpdate.Type + 165, // 109: signal.backup.GroupChangeChatUpdate.updates:type_name -> signal.backup.GroupChangeChatUpdate.Update + 1, // 110: signal.backup.GroupMembershipAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel + 1, // 111: signal.backup.GroupMemberLabelAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel + 1, // 112: signal.backup.GroupAttributesAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel + 166, // 113: signal.backup.GroupInvitationRevokedUpdate.invitees:type_name -> signal.backup.GroupInvitationRevokedUpdate.Invitee + 33, // 114: signal.backup.ChatStyle.wallpaperPreset:type_name -> signal.backup.ChatStyle.WallpaperPreset + 65, // 115: signal.backup.ChatStyle.wallpaperPhoto:type_name -> signal.backup.FilePointer + 169, // 116: signal.backup.ChatStyle.autoBubbleColor:type_name -> signal.backup.ChatStyle.AutomaticBubbleColor + 34, // 117: signal.backup.ChatStyle.bubbleColorPreset:type_name -> signal.backup.ChatStyle.BubbleColorPreset + 35, // 118: signal.backup.NotificationProfile.scheduleDaysEnabled:type_name -> signal.backup.NotificationProfile.DayOfWeek + 36, // 119: signal.backup.ChatFolder.folderType:type_name -> signal.backup.ChatFolder.FolderType + 6, // 120: signal.backup.AccountData.UsernameLink.color:type_name -> signal.backup.AccountData.UsernameLink.Color + 7, // 121: signal.backup.AccountData.AutoDownloadSettings.images:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 7, // 122: signal.backup.AccountData.AutoDownloadSettings.audio:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 7, // 123: signal.backup.AccountData.AutoDownloadSettings.video:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 7, // 124: signal.backup.AccountData.AutoDownloadSettings.documents:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 2, // 125: signal.backup.AccountData.AccountSettings.phoneNumberSharingMode:type_name -> signal.backup.AccountData.PhoneNumberSharingMode + 120, // 126: signal.backup.AccountData.AccountSettings.defaultChatStyle:type_name -> signal.backup.ChatStyle + 168, // 127: signal.backup.AccountData.AccountSettings.customChatColors:type_name -> signal.backup.ChatStyle.CustomChatColor + 3, // 128: signal.backup.AccountData.AccountSettings.defaultSentMediaQuality:type_name -> signal.backup.AccountData.SentMediaQuality + 124, // 129: signal.backup.AccountData.AccountSettings.autoDownloadSettings:type_name -> signal.backup.AccountData.AutoDownloadSettings + 4, // 130: signal.backup.AccountData.AccountSettings.appTheme:type_name -> signal.backup.AccountData.AppTheme + 5, // 131: signal.backup.AccountData.AccountSettings.callsUseLessDataSetting:type_name -> signal.backup.AccountData.CallsUseLessDataSetting + 8, // 132: signal.backup.AccountData.AccountSettings.unreadBadgeType:type_name -> signal.backup.AccountData.AccountSettings.UnreadBadgeType + 9, // 133: signal.backup.AccountData.AndroidSpecificSettings.navigationBarSize:type_name -> signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize + 134, // 134: signal.backup.Group.GroupSnapshot.title:type_name -> signal.backup.Group.GroupAttributeBlob + 134, // 135: signal.backup.Group.GroupSnapshot.description:type_name -> signal.backup.Group.GroupAttributeBlob + 134, // 136: signal.backup.Group.GroupSnapshot.disappearingMessagesTimer:type_name -> signal.backup.Group.GroupAttributeBlob + 139, // 137: signal.backup.Group.GroupSnapshot.accessControl:type_name -> signal.backup.Group.AccessControl + 135, // 138: signal.backup.Group.GroupSnapshot.members:type_name -> signal.backup.Group.Member + 136, // 139: signal.backup.Group.GroupSnapshot.membersPendingProfileKey:type_name -> signal.backup.Group.MemberPendingProfileKey + 137, // 140: signal.backup.Group.GroupSnapshot.membersPendingAdminApproval:type_name -> signal.backup.Group.MemberPendingAdminApproval + 138, // 141: signal.backup.Group.GroupSnapshot.membersBanned:type_name -> signal.backup.Group.MemberBanned + 13, // 142: signal.backup.Group.Member.role:type_name -> signal.backup.Group.Member.Role + 135, // 143: signal.backup.Group.MemberPendingProfileKey.member:type_name -> signal.backup.Group.Member + 14, // 144: signal.backup.Group.AccessControl.attributes:type_name -> signal.backup.Group.AccessControl.AccessRequired + 14, // 145: signal.backup.Group.AccessControl.members:type_name -> signal.backup.Group.AccessControl.AccessRequired + 14, // 146: signal.backup.Group.AccessControl.addFromInviteLink:type_name -> signal.backup.Group.AccessControl.AccessRequired + 14, // 147: signal.backup.Group.AccessControl.memberLabel:type_name -> signal.backup.Group.AccessControl.AccessRequired + 51, // 148: signal.backup.ChatItem.OutgoingMessageDetails.sendStatus:type_name -> signal.backup.SendStatus + 18, // 149: signal.backup.SendStatus.Failed.reason:type_name -> signal.backup.SendStatus.Failed.FailureReason + 52, // 150: signal.backup.DirectStoryReplyMessage.TextReply.text:type_name -> signal.backup.Text + 65, // 151: signal.backup.DirectStoryReplyMessage.TextReply.longText:type_name -> signal.backup.FilePointer + 155, // 152: signal.backup.PaymentNotification.TransactionDetails.transaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction + 154, // 153: signal.backup.PaymentNotification.TransactionDetails.failedTransaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction + 19, // 154: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.reason:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason + 20, // 155: signal.backup.PaymentNotification.TransactionDetails.Transaction.status:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction.Status + 153, // 156: signal.backup.PaymentNotification.TransactionDetails.Transaction.mobileCoinIdentification:type_name -> signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification + 22, // 157: signal.backup.ContactAttachment.Phone.type:type_name -> signal.backup.ContactAttachment.Phone.Type + 23, // 158: signal.backup.ContactAttachment.Email.type:type_name -> signal.backup.ContactAttachment.Email.Type + 24, // 159: signal.backup.ContactAttachment.PostalAddress.type:type_name -> signal.backup.ContactAttachment.PostalAddress.Type + 64, // 160: signal.backup.Quote.QuotedAttachment.thumbnail:type_name -> signal.backup.MessageAttachment + 164, // 161: signal.backup.Poll.PollOption.votes:type_name -> signal.backup.Poll.PollOption.PollVote + 81, // 162: signal.backup.GroupChangeChatUpdate.Update.genericGroupUpdate:type_name -> signal.backup.GenericGroupUpdate + 82, // 163: signal.backup.GroupChangeChatUpdate.Update.groupCreationUpdate:type_name -> signal.backup.GroupCreationUpdate + 83, // 164: signal.backup.GroupChangeChatUpdate.Update.groupNameUpdate:type_name -> signal.backup.GroupNameUpdate + 84, // 165: signal.backup.GroupChangeChatUpdate.Update.groupAvatarUpdate:type_name -> signal.backup.GroupAvatarUpdate + 85, // 166: signal.backup.GroupChangeChatUpdate.Update.groupDescriptionUpdate:type_name -> signal.backup.GroupDescriptionUpdate + 86, // 167: signal.backup.GroupChangeChatUpdate.Update.groupMembershipAccessLevelChangeUpdate:type_name -> signal.backup.GroupMembershipAccessLevelChangeUpdate + 88, // 168: signal.backup.GroupChangeChatUpdate.Update.groupAttributesAccessLevelChangeUpdate:type_name -> signal.backup.GroupAttributesAccessLevelChangeUpdate + 89, // 169: signal.backup.GroupChangeChatUpdate.Update.groupAnnouncementOnlyChangeUpdate:type_name -> signal.backup.GroupAnnouncementOnlyChangeUpdate + 90, // 170: signal.backup.GroupChangeChatUpdate.Update.groupAdminStatusUpdate:type_name -> signal.backup.GroupAdminStatusUpdate + 91, // 171: signal.backup.GroupChangeChatUpdate.Update.groupMemberLeftUpdate:type_name -> signal.backup.GroupMemberLeftUpdate + 92, // 172: signal.backup.GroupChangeChatUpdate.Update.groupMemberRemovedUpdate:type_name -> signal.backup.GroupMemberRemovedUpdate + 93, // 173: signal.backup.GroupChangeChatUpdate.Update.selfInvitedToGroupUpdate:type_name -> signal.backup.SelfInvitedToGroupUpdate + 94, // 174: signal.backup.GroupChangeChatUpdate.Update.selfInvitedOtherUserToGroupUpdate:type_name -> signal.backup.SelfInvitedOtherUserToGroupUpdate + 95, // 175: signal.backup.GroupChangeChatUpdate.Update.groupUnknownInviteeUpdate:type_name -> signal.backup.GroupUnknownInviteeUpdate + 96, // 176: signal.backup.GroupChangeChatUpdate.Update.groupInvitationAcceptedUpdate:type_name -> signal.backup.GroupInvitationAcceptedUpdate + 97, // 177: signal.backup.GroupChangeChatUpdate.Update.groupInvitationDeclinedUpdate:type_name -> signal.backup.GroupInvitationDeclinedUpdate + 98, // 178: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedUpdate:type_name -> signal.backup.GroupMemberJoinedUpdate + 99, // 179: signal.backup.GroupChangeChatUpdate.Update.groupMemberAddedUpdate:type_name -> signal.backup.GroupMemberAddedUpdate + 100, // 180: signal.backup.GroupChangeChatUpdate.Update.groupSelfInvitationRevokedUpdate:type_name -> signal.backup.GroupSelfInvitationRevokedUpdate + 101, // 181: signal.backup.GroupChangeChatUpdate.Update.groupInvitationRevokedUpdate:type_name -> signal.backup.GroupInvitationRevokedUpdate + 102, // 182: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestUpdate:type_name -> signal.backup.GroupJoinRequestUpdate + 103, // 183: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestApprovalUpdate:type_name -> signal.backup.GroupJoinRequestApprovalUpdate + 104, // 184: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestCanceledUpdate:type_name -> signal.backup.GroupJoinRequestCanceledUpdate + 106, // 185: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkResetUpdate:type_name -> signal.backup.GroupInviteLinkResetUpdate + 107, // 186: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkEnabledUpdate:type_name -> signal.backup.GroupInviteLinkEnabledUpdate + 108, // 187: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkAdminApprovalUpdate:type_name -> signal.backup.GroupInviteLinkAdminApprovalUpdate + 109, // 188: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkDisabledUpdate:type_name -> signal.backup.GroupInviteLinkDisabledUpdate + 110, // 189: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedByLinkUpdate:type_name -> signal.backup.GroupMemberJoinedByLinkUpdate + 111, // 190: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationUpdate:type_name -> signal.backup.GroupV2MigrationUpdate + 112, // 191: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationSelfInvitedUpdate:type_name -> signal.backup.GroupV2MigrationSelfInvitedUpdate + 113, // 192: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationInvitedMembersUpdate:type_name -> signal.backup.GroupV2MigrationInvitedMembersUpdate + 114, // 193: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationDroppedMembersUpdate:type_name -> signal.backup.GroupV2MigrationDroppedMembersUpdate + 105, // 194: signal.backup.GroupChangeChatUpdate.Update.groupSequenceOfRequestsAndCancelsUpdate:type_name -> signal.backup.GroupSequenceOfRequestsAndCancelsUpdate + 115, // 195: signal.backup.GroupChangeChatUpdate.Update.groupExpirationTimerUpdate:type_name -> signal.backup.GroupExpirationTimerUpdate + 87, // 196: signal.backup.GroupChangeChatUpdate.Update.groupMemberLabelAccessLevelChangeUpdate:type_name -> signal.backup.GroupMemberLabelAccessLevelChangeUpdate + 116, // 197: signal.backup.GroupChangeChatUpdate.Update.groupTerminateChangeUpdate:type_name -> signal.backup.GroupTerminateChangeUpdate + 167, // 198: signal.backup.ChatStyle.CustomChatColor.gradient:type_name -> signal.backup.ChatStyle.Gradient + 199, // [199:199] is the sub-list for method output_type + 199, // [199:199] is the sub-list for method input_type + 199, // [199:199] is the sub-list for extension type_name + 199, // [199:199] is the sub-list for extension extendee + 0, // [0:199] is the sub-list for field type_name } func init() { file_backuppb_Backup_proto_init() } @@ -14088,6 +14286,7 @@ func file_backuppb_Backup_proto_init() { file_backuppb_Backup_proto_msgTypes[40].OneofWrappers = []any{ (*LearnedProfileChatUpdate_E164)(nil), (*LearnedProfileChatUpdate_Username)(nil), + (*LearnedProfileChatUpdate_SharedName)(nil), } file_backuppb_Backup_proto_msgTypes[44].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[45].OneofWrappers = []any{} @@ -14099,20 +14298,20 @@ func file_backuppb_Backup_proto_init() { file_backuppb_Backup_proto_msgTypes[51].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[52].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[53].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[54].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[55].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[56].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[57].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[58].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[59].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[60].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[61].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[62].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[63].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[64].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[65].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[67].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[66].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[69].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[70].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[71].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[72].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[73].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[78].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[79].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[83].OneofWrappers = []any{ (*ChatStyle_WallpaperPreset_)(nil), @@ -14127,28 +14326,28 @@ func file_backuppb_Backup_proto_init() { (*AccountData_IAPSubscriberData_PurchaseToken)(nil), (*AccountData_IAPSubscriberData_OriginalTransactionId)(nil), } - file_backuppb_Backup_proto_msgTypes[96].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[97].OneofWrappers = []any{ (*Group_GroupAttributeBlob_Title)(nil), (*Group_GroupAttributeBlob_Avatar)(nil), (*Group_GroupAttributeBlob_DisappearingMessagesDuration)(nil), (*Group_GroupAttributeBlob_DescriptionText)(nil), } - file_backuppb_Backup_proto_msgTypes[102].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[105].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[103].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[106].OneofWrappers = []any{ (*ChatItem_PinDetails_PinExpiresAtTimestamp)(nil), (*ChatItem_PinDetails_PinNeverExpires)(nil), } - file_backuppb_Backup_proto_msgTypes[114].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[115].OneofWrappers = []any{ (*PaymentNotification_TransactionDetails_Transaction_)(nil), (*PaymentNotification_TransactionDetails_FailedTransaction_)(nil), } - file_backuppb_Backup_proto_msgTypes[117].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[122].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[118].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[124].OneofWrappers = []any{ (*FilePointer_LocatorInfo_PlaintextHash)(nil), (*FilePointer_LocatorInfo_EncryptedDigest)(nil), } - file_backuppb_Backup_proto_msgTypes[123].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[126].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[125].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[128].OneofWrappers = []any{ (*GroupChangeChatUpdate_Update_GenericGroupUpdate)(nil), (*GroupChangeChatUpdate_Update_GroupCreationUpdate)(nil), (*GroupChangeChatUpdate_Update_GroupNameUpdate)(nil), @@ -14186,8 +14385,8 @@ func file_backuppb_Backup_proto_init() { (*GroupChangeChatUpdate_Update_GroupMemberLabelAccessLevelChangeUpdate)(nil), (*GroupChangeChatUpdate_Update_GroupTerminateChangeUpdate)(nil), } - file_backuppb_Backup_proto_msgTypes[127].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[129].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[129].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[131].OneofWrappers = []any{ (*ChatStyle_CustomChatColor_Solid)(nil), (*ChatStyle_CustomChatColor_Gradient)(nil), } @@ -14197,7 +14396,7 @@ func file_backuppb_Backup_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_backuppb_Backup_proto_rawDesc), len(file_backuppb_Backup_proto_rawDesc)), NumEnums: 37, - NumMessages: 131, + NumMessages: 133, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.proto b/pkg/signalmeow/protobuf/backuppb/Backup.proto index 32b3ac3..721e641 100644 --- a/pkg/signalmeow/protobuf/backuppb/Backup.proto +++ b/pkg/signalmeow/protobuf/backuppb/Backup.proto @@ -182,6 +182,10 @@ message AccountData { NavigationBarSize navigationBarSize = 3; // If unset, treat the same as "Unknown" case } + message IOSSpecificSettings { + bool isSystemCallLogEnabled = 1; + } + bytes profileKey = 1; optional string username = 2; UsernameLink usernameLink = 3; @@ -196,7 +200,8 @@ message AccountData { AndroidSpecificSettings androidSpecificSettings = 12; string bioText = 13; string bioEmoji = 14; - reserved /*keyTransparencyData*/ 15; // No longer want to persist self-KT data + reserved /*keyTransparencyData*/ 15; + IOSSpecificSettings iosSpecificSettings = 16; } message Recipient { @@ -285,8 +290,10 @@ message Contact { string systemFamilyName = 19; string systemNickname = 20; optional AvatarColor avatarColor = 21; + // Opaque blob containing key transparency data for the contact optional bytes keyTransparencyData = 22; uint64 blockedAtTimestamp = 23; // if `blocked` is true, 0 means unknown block time + Name sharedName = 24; // absent iff both `given` and `family` are empty, name provided by third party } message Group { @@ -322,8 +329,8 @@ message Group { repeated MemberPendingProfileKey membersPendingProfileKey = 8; repeated MemberPendingAdminApproval membersPendingAdminApproval = 9; bytes inviteLinkPassword = 10; - bool announcements_only = 12; - repeated MemberBanned members_banned = 13; + bool announcementsOnly = 12; + repeated MemberBanned membersBanned = 13; bool terminated = 14; } @@ -687,6 +694,12 @@ message ContactAttachment { string nickname = 6; } + // The sharer's Signal nickname for this contact + message SignalNickname { + string given = 1; + string family = 2; + } + message Phone { enum Type { UNKNOWN = 0; // Interpret as "Home" @@ -735,11 +748,15 @@ message ContactAttachment { } optional Name name = 1; + reserved 2; repeated Phone number = 3; repeated Email email = 4; repeated PostalAddress address = 5; optional FilePointer avatar = 6; string organization = 7; + bytes aci = 8; // should be 16 bytes + optional SignalNickname nickname = 9; // absent iff both `given` and `family` are empty + string note = 10; } message StickerMessage { @@ -849,6 +866,11 @@ message FilePointer { optional string caption = 10; optional string blurHash = 11; LocatorInfo locatorInfo = 13; + // Waveform for audio attachments. Each byte represents a "bar" in the + // waveform, with 0 as silence 255 as loudest. At most 100 bytes/bars. + optional bytes audioWaveform = 14; + // Duration of an audio attachment, in seconds. + optional float audioDurationSeconds = 15; } message Quote { @@ -1049,6 +1071,7 @@ message LearnedProfileChatUpdate { oneof previousName { uint64 e164 = 1; string username = 2; + string sharedName = 3; } } @@ -1146,18 +1169,14 @@ message GroupMembershipAccessLevelChangeUpdate { GroupV2AccessLevel accessLevel = 2; } -message GroupAttributesAccessLevelChangeUpdate { - optional bytes updaterAci = 1; - GroupV2AccessLevel accessLevel = 2; -} - message GroupMemberLabelAccessLevelChangeUpdate { optional bytes updaterAci = 1; GroupV2AccessLevel accessLevel = 2; } -message GroupTerminateChangeUpdate { +message GroupAttributesAccessLevelChangeUpdate { optional bytes updaterAci = 1; + GroupV2AccessLevel accessLevel = 2; } message GroupAnnouncementOnlyChangeUpdate { @@ -1318,6 +1337,10 @@ message GroupExpirationTimerUpdate { optional bytes updaterAci = 2; } +message GroupTerminateChangeUpdate { + optional bytes updaterAci = 1; +} + message PollTerminateUpdate { uint64 targetSentTimestamp = 1; string question = 2; // Between 1-100 characters @@ -1335,6 +1358,12 @@ message StickerPack { message ChatStyle { message Gradient { + // Color ordering: + // 0 degrees: bottom-to-top + // 90 degrees: left-to-right + // 180 degrees: top-to-bottom + // 270 degrees: right-to-left + uint32 angle = 1; // degrees repeated fixed32 colors = 2; // 0xAARRGGBB repeated float positions = 3; // percent from 0 to 1 diff --git a/pkg/signalmeow/protobuf/org/signal/chat/account.proto b/pkg/signalmeow/protobuf/org/signal/chat/account.proto index c12755b..b5ccede 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/account.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/account.proto @@ -80,22 +80,42 @@ service Accounts { // Generates and stores a pending TOTP key for the authenticated account. // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. + // + // TOTP keys may only be generated for accounts without phone numbers. rpc GenerateTotpKey(GenerateTotpKeyRequest) returns (GenerateTotpKeyResponse) {} // Confirms that the caller has stored and can derive one-time passwords from // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the // key for the caller's account + // + // TOTP keys may only be generated for accounts without phone numbers. rpc ConfirmTotpKey(ConfirmTotpKeyRequest) returns (ConfirmTotpKeyResponse) {} - // Returns a list of confirmed TOTP keys for the authenticated account - rpc ListTotpKeys(ListTotpKeysRequest) returns (ListTotpKeysResponse) {} + // Returns parameters for initiating a WebAuthn registration ceremony + // + // WebAuthn credentials may only be registered for accounts without phone numbers + rpc StartWebAuthnRegistration(StartWebAuthnRegistrationRequest) returns (StartWebAuthnRegistrationResponse) {} + + // Concludes a WebAuthn registration ceremony to add a passkey to the authenticated account + // + // WebAuthn credentials may only be registered for accounts without phone numbers + rpc FinishWebAuthnRegistration(FinishWebAuthnRegistrationRequest) returns (FinishWebAuthnRegistrationResponse) {} + + // Returns a list of confirmed MFA keys for the authenticated account + rpc ListMfaKeys(ListMfaKeysRequest) returns (ListMfaKeysResponse) {} // Updates encrypted, user-supplied metadata (e.g. a human-readable name and - // creation timestamp) for an existing, confirmed TOTP key - rpc SetTotpKeyMetadata(SetTotpKeyMetadataRequest) returns (SetTotpKeyMetadataResponse) {} + // creation timestamp) for an existing, confirmed MFA key + rpc SetMfaKeyMetadata(SetMfaKeyMetadataRequest) returns (SetMfaKeyMetadataResponse) {} - // Removes a TOTP from the authenticated account - rpc RemoveTotpKey(RemoveTotpKeyRequest) returns (RemoveTotpKeyResponse) {} + // Removes an MFA key from the authenticated account + rpc RemoveMfaKey(RemoveMfaKeyRequest) returns (RemoveMfaKeyResponse) {} + + // Requests the parameters needed to verify with an MFA factor associated with this account. + rpc StartMfaVerification(StartMfaVerificationRequest) returns (StartMfaVerificationResponse) {} + + // Attemps to verify an MFA factor associated with this account. + rpc FinishMfaVerification(FinishMfaVerificationRequest) returns (FinishMfaVerificationResponse) {} } // Provides methods for looking up Signal accounts. Callers must not provide @@ -533,6 +553,10 @@ message GenerateTotpKeyResponse { // The authenticated account already has too many TOTP keys, and the caller // must remove one before adding more errors.FailedPrecondition too_many_totp_keys = 2 [(tag.reason) = "too_many_totp_keys"]; + + // The authenticated account already has too many MFA keys of all types, and + // the caller must remove one before adding more + errors.FailedPrecondition too_many_mfa_keys = 3 [(tag.reason) = "too_many_mfa_keys"]; } } @@ -549,7 +573,7 @@ message ConfirmTotpKeyRequest { message ConfirmTotpKeyResponse { message KeyConfirmed { // The account-specific identifier for the newly-confirmed TOTP key - uint32 key_id = 1; + uint32 key_id = 1 [(require.range) = {min: 0, max: 127}]; } oneof response { @@ -560,49 +584,160 @@ message ConfirmTotpKeyResponse { // The provided one-time password was not valid for any reason (including // incorrect passwords, misaligned clocks, or missing account records) errors.FailedPrecondition one_time_password_not_verified = 2 [(tag.reason) = "one_time_password_not_verified"]; + + // The authenticated account already has too many MFA keys of all types, and + // the caller must remove one before adding more + errors.FailedPrecondition too_many_mfa_keys = 3 [(tag.reason) = "too_many_mfa_keys"]; } } -message ListTotpKeysRequest {} - -message ListTotpKeysResponse { - message TotpKeyMetadata { - // The user-provided ciphertext for metadata associated with this TOTP key - bytes metadata_ciphertext = 1; - - // The TOTP parameters associated with this key - TotpParameters totp_parameters = 2; - } - - map keys = 1; +message StartWebAuthnRegistrationRequest { } -message SetTotpKeyMetadataRequest { - // The account-specific identifier of the TOTP key to modify - uint32 key_id = 1; +message StartWebAuthnRegistrationResponse { + message WebAuthnCreateParameters { + // The "user handle" (user.id) that should be handed to the authenticator + bytes user_handle = 1; + + // The COSE IDs (https://www.iana.org/assignments/cose#algorithms) of + // acceptable algorithms for the created key + repeated int64 allowed_algorithms = 2; + + // A list of the credential IDs already registered for this account; these + // can be passed to candidate authenticators to tell them not to create a + // new key if they already have a private key matching one of these + repeated bytes exclude_credential_ids = 3; + } + + oneof response { + // The parameters to use for a WebAuthn registration ceremony + WebAuthnCreateParameters params = 1; + + // The authenticated account already has too many MFA keys, and the + // caller must remove one before adding one + errors.FailedPrecondition too_many_mfa_keys = 2 [(tag.reason) = "too_many_mfa_keys"]; + } +} + +message FinishWebAuthnRegistrationRequest { + // The attestation object from a completed registration ceremony, serialized + // as specified in https://www.w3.org/TR/webauthn/#attestation-object + bytes attestation_object = 1; + + // The "collected client data" map used in the registration ceremony, as the + // exact JSON map that was hashed for the authenticator + string collected_client_data_json = 2; + + // The ciphertext of user-provided metadata (presumably including a + // human-readable name and creation timestamp) to be attached to the + // newly-confirmed key + bytes metadata_ciphertext = 3 [(require.exactlySize) = 160]; +} + +message FinishWebAuthnRegistrationResponse { + message KeyConfirmed { + // An account-specific identifier for the new WebAuthn key + uint32 key_id = 1 [(require.range) = {min: 0, max: 127}]; + } + + oneof response { + // The provided public key has been registered for the account + KeyConfirmed key_confirmed = 1; + + // The registration response was not verified successfully for any reason + errors.FailedPrecondition key_not_confirmed = 2 [(tag.reason) = "registration_ceremony_unsuccessful"]; + + // The authenticated account already has too many MFA keys, and the + // caller must remove one before adding one (this can be true even if it + // was not when starting the request, since there is nothing to prevent + // multiple registrations from occurring in parallel) + errors.FailedPrecondition too_many_mfa_keys = 3 [(tag.reason) = "too_many_mfa_keys"]; + } +} + +message ListMfaKeysRequest {} + +message ListMfaKeysResponse { + message MfaKeyMetadata { + enum MfaKeyType { + MFA_KEY_TYPE_UNSPECIFIED = 0; + MFA_KEY_TYPE_TOTP = 1; + MFA_KEY_TYPE_WEBAUTHN = 2; + } + + // The user-provided ciphertext for metadata associated with this MFA key + bytes metadata_ciphertext = 1 [(require.exactlySize) = 160]; + + // The type of MFA factor this key is for + MfaKeyType type = 2; + } + + map keys = 1; +} + +message SetMfaKeyMetadataRequest { + // The account-specific identifier of the MFA key to modify + uint32 key_id = 1 [(require.range) = {min: 0, max: 127}]; // The ciphertext of the new user-provided metadata to be attached to the // identified key bytes metadata_ciphertext = 2 [(require.exactlySize) = 160]; } -message SetTotpKeyMetadataResponse { +message SetMfaKeyMetadataResponse { message MetadataUpdated { } oneof response { - // New metadata was stored for the identified TOTP key - MetadataUpdated metadata_updated = 1; + // New metadata was stored for the identified key + MetadataUpdated success = 1; // No TOTP was found with the given ID errors.NotFound key_not_found = 2 [(tag.reason) = "key_not_found"]; } } -message RemoveTotpKeyRequest { - // The account-specific identifier of the TOTP key to remove - uint32 key_id = 1; +message RemoveMfaKeyRequest { + // The account-specific identifier of the MFA key to remove + uint32 key_id = 1 [(require.range) = {min: 0, max: 127}]; } -message RemoveTotpKeyResponse { +message RemoveMfaKeyResponse { +} + +message StartMfaVerificationRequest { +} + +message StartMfaVerificationResponse { + /// If true, a TOTP password will be accepted for verification + bool has_totp = 1; + + message WebAuthnAuthenticationParameters { + /// A random challenge that must be included in the authenticator response, to prevent replay attacks + bytes challenge = 1; + + /// The estimated amount of time, in seconds, after which an otherwise-valid response will be rejected + uint32 timeout_seconds = 2; + + /// A list of credential IDs associated with this account + repeated bytes allowed_credential_ids = 3; + } + + /// If present, information required to complete a WebAuthn authentication + optional WebAuthnAuthenticationParameters webauthn_authentication_parameters = 2; +} + +message FinishMfaVerificationRequest { + oneof credential { + /// A 6-digit TOTP password to validate + uint32 totp_password = 1; + + /// A WebAuthn-compatible JSON-serialized authentication response + string webauthn_authentication_response_json = 2; + } +} + +message FinishMfaVerificationResponse { + /// If true, the selected authentication factor was verified correctly. + bool success = 1; } diff --git a/pkg/signalmeow/protobuf/org/signal/chat/backups.proto b/pkg/signalmeow/protobuf/org/signal/chat/backups.proto index 92b7506..fec7709 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/backups.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/backups.proto @@ -59,6 +59,9 @@ service Backups { // Clients must validate the receipt level on the credential matches a known // receipt level before using it. rpc GetBackupAuthCredentials(GetBackupAuthCredentialsRequest) returns (GetBackupAuthCredentialsResponse) {} + + // Retrieve backup ID rotation limits + rpc GetBackupIdLimits(google.protobuf.Empty) returns (GetBackupIdLimitsResponse) {} } message SetBackupIdRequest { @@ -125,6 +128,13 @@ message GetBackupAuthCredentialsResponse { Credentials credentials = 1; } +message GetBackupIdLimitsResponse { + // If true, a call to SetBackupId may succeed without waiting + bool hasPermitsRemaining = 1; + // How long to wait before a permit becomes available, in seconds + uint64 retryAfterSeconds = 2; +} + // Service for backup operations with anonymous credentials // // This service never requires account authentication. It instead requires a diff --git a/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto b/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto index a3eef30..3476143 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto @@ -9,17 +9,46 @@ option java_multiple_files = true; package org.signal.chat.challenge; +import "google/protobuf/empty.proto"; +import "org/signal/chat/errors.proto"; import "org/signal/chat/require.proto"; +import "org/signal/chat/tag.proto"; service Challenge { option (require.auth) = AUTH_ONLY_AUTHENTICATED; - // Submit proof of a challenge completion - // Some server endpoints (the "send message" endpoint, for example) may return - // a response indicating the client must complete a challenge before continuing. - // Clients may use this endpoint to provide proof of a completed challenge. - // If successful, the client may then continue their original operation. - rpc HandleChallengeResponse(AnswerChallengeRequest) returns (AnswerChallengeResponse) {} + // Submit proof of a challenge completion. + // + // Some server endpoints (the "send message" endpoint, for example) may return + // a response indicating the client must complete a challenge before continuing. + // Clients may use this endpoint to provide proof of a completed challenge. + // If successful, the client may then continue their original operation. + rpc AnswerChallenge(AnswerChallengeRequest) returns (AnswerChallengeResponse) {} + + // Requests that a challenge value be sent to the authenticated account's + // primary device via push notification. Once received, callers may present + // the challenge value via the HandleChallengeResponse RPC. + // + // APNs challenge payloads will be formatted as follows: + // + // ``` + // { + // "aps": { + // "sound": "default", + // "alert": { + // "loc-key": "APN_Message" + // } + // }, + // "rateLimitChallenge": "{CHALLENGE_TOKEN}" + // } + // ``` + // + // FCM challenge payloads will be formatted as follows: + // + // ``` + // {"rateLimitChallenge": "{CHALLENGE_TOKEN}"} + // ``` + rpc RequestPushChallenge(RequestPushChallengeRequest) returns (RequestPushChallengeResponse) {} } message AnswerChallengeRequest { @@ -43,10 +72,26 @@ message AnswerChallengeRequest { AnswerPushChallengeRequest push = 2; AnswerCaptchaChallengeRequest captcha = 3; } - } message AnswerChallengeResponse { // Whether the challenge proof was accepted bool success = 1; } + +message RequestPushChallengeRequest { +} + +message RequestPushChallengeResponse { + message SentPushChallenge { + } + + oneof response { + // The server attempted to send a challenge value to the authenticated + // account's primary device via a push notification. + google.protobuf.Empty sent_push_challenge = 1; + + // The authenticated account's primary device does not have a push token. + errors.FailedPrecondition no_push_token = 2 [(tag.reason) = "no_push_token"]; + } +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto b/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto index fa9dce7..b7d58af 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto @@ -7,6 +7,7 @@ syntax = "proto3"; option java_multiple_files = true; +import "org/signal/chat/common.proto"; import "org/signal/chat/require.proto"; package org.signal.chat.credentials; @@ -33,8 +34,8 @@ service Credentials { returns (GetGroupCredentialsResponse) {} // Generates zero-knowledge credentials for creating call links. - rpc GetCreateCallLinkCredentials(GetCreateCallLinkCredentialsRequest) - returns (GetCreateCallLinkCredentialsResponse) {} + rpc GetCreateCallLinkCredential(GetCreateCallLinkCredentialRequest) + returns (GetCreateCallLinkCredentialResponse) {} } // Provides methods for working with previously-generated credentials without @@ -130,37 +131,26 @@ message GetGroupCredentialsRequest { } message GetGroupCredentialsResponse { - // A zero-knowledge credential that may be redeemed at or up to one day after - // the given redemption time - message CredentialAndRedemptionTime { - bytes credential = 1; - uint64 redemption_time_seconds = 2; - } - // A collection of credentials allowing the holder to anonymously // authenticate themselves for group-related actions - repeated CredentialAndRedemptionTime group_credentials = 1; + repeated common.ZkCredential group_credentials = 1; // A collection of credentials allowing the holder to read, update, and delete // group call links - repeated CredentialAndRedemptionTime call_link_auth_credentials = 2; + repeated common.ZkCredential call_link_auth_credentials = 2; // The phone number identifier for which the included credentials were // generated. Empty if the account does not have a phone number. bytes pni = 3; } -message GetCreateCallLinkCredentialsRequest { +message GetCreateCallLinkCredentialRequest { // A zero-knowledge credential request bytes credential_request = 1; } -message GetCreateCallLinkCredentialsResponse { +message GetCreateCallLinkCredentialResponse { // A zero-knowledge credential that may be redeemed at or up to one day after // the given redemption time bytes credential = 1; - - // The earliest time, in seconds since the epoch, at which the associated - // credential may be redeemed - uint64 redemption_time_seconds = 2; } diff --git a/pkg/signalmeow/protobuf/org/signal/chat/messages.proto b/pkg/signalmeow/protobuf/org/signal/chat/messages.proto index b6bb6a7..0b7f4b3 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/messages.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/messages.proto @@ -49,6 +49,9 @@ service Messages { // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be // present in the error details. rpc GetMessages(stream GetMessagesRequest) returns (stream GetMessagesResponse) {} + + // Reports a message as spam. + rpc ReportMessage(ReportMessageRequest) returns (ReportMessageResponse) {} } message GetMessagesRequest { @@ -435,3 +438,18 @@ message ChallengeRequired { // resolved by waiting. optional uint64 retry_after_seconds = 3; } + +message ReportMessageRequest { + // The service identifier of the party that sent the offending message + common.ServiceIdentifier source_service_identifier = 1; + + // The GUID of the offending message + bytes message_guid = 2 [(require.exactlySize) = 16]; + + // The spam-reporting token attached to the offending message + bytes report_spam_token = 3; +} + + +message ReportMessageResponse { +} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto b/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto index 11e53ab..de5abcd 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto @@ -25,7 +25,14 @@ service OneTimeDonations { rpc CreateBoost(CreateBoostRequest) returns (CreateBoostResponse) {} // Create a PayPal one-time payment. - // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token + // + // Once the payment is complete, call ConfirmPayPalBoost with the payment ID + // and token. + // + // The PayPal approval page presented to the user may be localized. Callers + // should set their language preferences via an "Accept-Language" header on + // the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 rpc CreatePayPalBoost(CreatePayPalBoostRequest) returns (CreatePayPalBoostResponse) {} // Confirm a PayPal one-time payment diff --git a/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto b/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto index c9e894e..d3fc60f 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto @@ -90,6 +90,8 @@ message LoginConfiguration { uint64 level = 1; // The play billing productID associated with a Signal Login purchase string play_product_id = 2; + // The play billing optionID to use to purchase a Signal Login + string play_option_id = 4; // The App Store productID associated with a Signal Login purchase string app_store_product_id = 3; } diff --git a/pkg/signalmeow/protobuf/org/signal/chat/profile.proto b/pkg/signalmeow/protobuf/org/signal/chat/profile.proto index 78d4370..849204c 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/profile.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/profile.proto @@ -31,6 +31,17 @@ service Profile { // // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC rpc GetAvatarCredentials(GetAvatarCredentialsRequest) returns (GetAvatarCredentialsResponse) {} + + // Returns credentials used by clients to upload a v1 avatar, deleting any current avatar. + // + // This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads: + // 1. SetV1Avatar + // 2. Upload to CDN + // 3. SetProfile with v1 `AVATAR_CHANGE_UNCHANGED` and the v1 avatar in the v2 profile body + // + // Clients that do this will be required to upload current avatars using `ProfilesAnonymous.GetAvatarUploadFormRequest` + // once v1 Profile APIs are no longer supported. + rpc SetV1Avatar(SetV1AvatarRequest) returns (SetV1AvatarResponse) {} } // Provides methods for working with profiles and profile-related data using "unidentified access" @@ -90,6 +101,19 @@ message SetProfileV1Request { bytes phone_number_sharing = 6 [(require.exactlySize) = 29]; } +message SetV1AvatarRequest { + // The profile version. Required. + string version = 1 [(require.exactlySize) = 64]; + + // The profile key commitment. Required if this is a new profile version. + bytes commitment = 2 [(require.exactlySize) = 0, (require.exactlySize) = 97]; +} + +message SetV1AvatarResponse { + // the policy and credential used by clients to upload an avatar to the CDN + common.S3UploadForm form = 1; +} + message SetProfileRequest { // The profile version. Required. @@ -374,6 +398,7 @@ message GetAvatarUploadFormRequest { message GetAvatarUploadFormResponse { oneof response { + // the policy and credential used by clients to upload an avatar to the CDN common.S3UploadForm avatar_upload_form = 1; errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; diff --git a/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto b/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto index a820bac..4f23c00 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto @@ -21,7 +21,7 @@ import "org/signal/chat/tag.proto"; service Subscriptions { option (require.auth) = AUTH_ONLY_ANONYMOUS; // Creates a subscriber record if it does not exist, otherwise refreshes its last access time. - + // // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended // period of time will result in the subscription being canceled. @@ -37,6 +37,10 @@ service Subscriptions { rpc CreatePaymentMethod(CreatePaymentMethodRequest) returns (CreatePaymentMethodResponse) {} // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. + // + // The presented billing agreement may be localized. Callers should set their + // language preferences via an "Accept-Language" header on the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 rpc CreatePayPalPaymentMethod(CreatePayPalPaymentMethodRequest) returns (CreatePayPalPaymentMethodResponse) {} // Sets the default payment method for a subscriber. @@ -102,11 +106,16 @@ service Subscriptions { // associated with the old purchaseToken will be cancelled. rpc SetIapSubscription(SetIapSubscriptionRequest) returns (SetIapSubscriptionResponse) {} - // Returns a localized bank mandate for the specified bank transfer type + // Returns a localized bank mandate for the specified bank transfer type. + // + // Callers should set their language preferences via an "Accept-Language" + // header on the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 rpc GetBankMandate(GetBankMandateRequest) returns (GetBankMandateResponse) {} } message UpdateSubscriberRequest { + // New subscriber-ids must be a randomly-generated 32 byte byte-string. bytes subscriber_id = 1 [(require.exactlySize) = 32]; // A libsignal DonationPermit from rpc Donations.CreateDonationPermit. // Not required if the subscriber already exists. @@ -116,10 +125,8 @@ message UpdateSubscriberRequest { message UpdateSubscriberResponse { oneof response { google.protobuf.Empty success = 1; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 2 [(tag.reason) = "subscriber_id_mismatch"]; // The donation permit was expired or already spent - errors.FailedZkAuthentication permit_rejected = 3 [(tag.reason) = "permit_rejected"]; + errors.FailedZkAuthentication permit_rejected = 2 [(tag.reason) = "permit_rejected"]; } } @@ -130,6 +137,7 @@ message DeleteSubscriberRequest { message DeleteSubscriberResponse { oneof response { google.protobuf.Empty success = 1; + // The subscriber did not exist errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; // The associated subscription is not a type that can be cancelled by the server. Cancel client-side, and then retry. errors.FailedPrecondition cannot_cancel_subscription = 3 [(tag.reason) = "cannot_cancel_subscription"]; @@ -189,13 +197,13 @@ message CreatePaymentMethodResponse { oneof response { CreatePaymentMethodResult result = 1; + // The subscriber did not exist errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; + // New payment processor does not match existing processor associated with + // the subscription + errors.FailedPrecondition subscription_processor_conflict = 3 [(tag.reason) = "subscription_processor_conflict"]; // The donation permit was expired or already spent - errors.FailedZkAuthentication permit_rejected = 5 [(tag.reason) = "permit_rejected"]; + errors.FailedZkAuthentication permit_rejected = 4 [(tag.reason) = "permit_rejected"]; } } @@ -217,11 +225,11 @@ message CreatePayPalPaymentMethodResponse { oneof response { CreatePayPalPaymentMethodResult result = 1; + // The subscriber did not exist errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; + // New payment processor does not match existing processor associated with + // the subscription + errors.FailedPrecondition subscription_processor_conflict = 3 [(tag.reason) = "subscription_processor_conflict"]; } } @@ -247,12 +255,11 @@ message SetDefaultPaymentMethodRequest { message SetDefaultPaymentMethodResponse { oneof response { google.protobuf.Empty success = 1; + // The subscriber did not exist, or the referenced setup intent was not found errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - errors.FailedPrecondition payment_method_not_set_up = 4 [(tag.reason) = "payment_method_not_set_up"]; - // Payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 5 [(tag.reason) = "subscription_processor_conflict"]; + // No payment method has been created for the subscriber, or the provided + // payment method has not finished being set up with the processor + errors.FailedPrecondition payment_method_not_set_up = 3 [(tag.reason) = "payment_method_not_set_up"]; } } @@ -307,26 +314,27 @@ message SetSubscriptionLevelResponse { oneof response { SetSubscriptionLevelResult success = 1; + // The subscriber did not exist errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; - errors.FailedPrecondition payment_method_not_set_up = 5 [(tag.reason) = "payment_method_not_set_up"]; + // New payment processor does not match existing processor associated with + // the subscription + errors.FailedPrecondition subscription_processor_conflict = 3 [(tag.reason) = "subscription_processor_conflict"]; + // No payment method has been created for the subscriber + errors.FailedPrecondition payment_method_not_set_up = 4 [(tag.reason) = "payment_method_not_set_up"]; // The payment processor does not support this operation - errors.FailedPrecondition unsupported_operation = 6 [(tag.reason) = "unsupported_operation"]; + errors.FailedPrecondition unsupported_operation = 5 [(tag.reason) = "unsupported_operation"]; // The requested level was invalid - errors.FailedPrecondition unsupported_level = 7 [(tag.reason) = "unsupported_level"]; + errors.FailedPrecondition unsupported_level = 6 [(tag.reason) = "unsupported_level"]; // The requested currency was invalid - errors.FailedPrecondition unsupported_currency = 8 [(tag.reason) = "unsupported_currency"]; + errors.FailedPrecondition unsupported_currency = 7 [(tag.reason) = "unsupported_currency"]; // The card could not be charged - errors.FailedPrecondition payment_requires_action = 9 [(tag.reason) = "payment_requires_action"]; + errors.FailedPrecondition payment_requires_action = 8 [(tag.reason) = "payment_requires_action"]; // Cannot transition from existing level to the requested level - errors.FailedPrecondition invalid_level_transition = 10 [(tag.reason) = "invalid_level_transition"]; + errors.FailedPrecondition invalid_level_transition = 9 [(tag.reason) = "invalid_level_transition"]; // The idempotency key was invalid or re-used with a modified request - errors.FailedPrecondition invalid_idempotency_key = 11 [(tag.reason) = "invalid_idempotency_key"]; + errors.FailedPrecondition invalid_idempotency_key = 10 [(tag.reason) = "invalid_idempotency_key"]; // The payment failed; see charge failure details - ChargeFailure charge_failure = 12 [(tag.reason) = "charge_failure"]; + ChargeFailure charge_failure = 11 [(tag.reason) = "charge_failure"]; } } @@ -352,13 +360,17 @@ message SetIapSubscriptionResponse { oneof response { SetIapSubscriptionResult success = 1; + // The subscriber did not exist or the provided purchase identifier does not exist errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; - errors.FailedPrecondition payment_required = 5 [(tag.reason) = "payment_required"]; - errors.FailedPrecondition invalid_transaction = 6 [(tag.reason) = "invalid_transaction"]; + // New payment processor does not match existing processor associated with + // the subscription + errors.FailedPrecondition subscription_processor_conflict = 3 [(tag.reason) = "subscription_processor_conflict"]; + // The subscription is not in a purchase state that grants the user an + // entitlement + errors.FailedPrecondition payment_required = 4 [(tag.reason) = "payment_required"]; + // The provided purchase identifier is malformed or the identified + // transaction is not supported for use at this endpoint + errors.FailedPrecondition invalid_transaction = 5 [(tag.reason) = "invalid_transaction"]; } } @@ -374,15 +386,14 @@ message GetReceiptCredentialsResponse { oneof response { GetReceiptCredentialsResult success = 1; + // The subscriber did not exist or it did not have an associated subscription errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state - errors.FailedPrecondition no_paid_invoice = 4 [(tag.reason) = "no_paid_invoice"]; + errors.FailedPrecondition no_paid_invoice = 3 [(tag.reason) = "no_paid_invoice"]; // Invoice is in any state other than 'draft', 'open', or 'paid'; Charge failure details may be present - PaymentRequired payment_required = 5 [(tag.reason) = "payment_required"]; + PaymentRequired payment_required = 4 [(tag.reason) = "payment_required"]; // Latest paid receipt on subscription was already redeemed for a receipt credential but with a different GetReceiptCredentialRequest - errors.FailedPrecondition already_redeemed = 6 [(tag.reason) = "already_redeemed"]; + errors.FailedPrecondition already_redeemed = 5 [(tag.reason) = "already_redeemed"]; } } @@ -420,10 +431,10 @@ message GetSubscriptionInformationResponse { oneof response { Subscription success = 1; + // The subscriber exists but has no subscription with a payment processor google.protobuf.Empty no_subscription = 2; + // The subscriber did not exist errors.NotFound subscriber_not_found = 3 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 4 [(tag.reason) = "subscriber_id_mismatch"]; } } diff --git a/pkg/signalmeow/protobuf/rpc/account/account.pb.go b/pkg/signalmeow/protobuf/rpc/account/account.pb.go index 9b9e4ae..45702d1 100644 --- a/pkg/signalmeow/protobuf/rpc/account/account.pb.go +++ b/pkg/signalmeow/protobuf/rpc/account/account.pb.go @@ -27,6 +27,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType int32 + +const ( + ListMfaKeysResponse_MfaKeyMetadata_MFA_KEY_TYPE_UNSPECIFIED ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType = 0 + ListMfaKeysResponse_MfaKeyMetadata_MFA_KEY_TYPE_TOTP ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType = 1 + ListMfaKeysResponse_MfaKeyMetadata_MFA_KEY_TYPE_WEBAUTHN ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType = 2 +) + +// Enum value maps for ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType. +var ( + ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType_name = map[int32]string{ + 0: "MFA_KEY_TYPE_UNSPECIFIED", + 1: "MFA_KEY_TYPE_TOTP", + 2: "MFA_KEY_TYPE_WEBAUTHN", + } + ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType_value = map[string]int32{ + "MFA_KEY_TYPE_UNSPECIFIED": 0, + "MFA_KEY_TYPE_TOTP": 1, + "MFA_KEY_TYPE_WEBAUTHN": 2, + } +) + +func (x ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType) Enum() *ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType { + p := new(ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType) + *p = x + return p +} + +func (x ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType) Descriptor() protoreflect.EnumDescriptor { + return file_org_signal_chat_account_proto_enumTypes[0].Descriptor() +} + +func (ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType) Type() protoreflect.EnumType { + return &file_org_signal_chat_account_proto_enumTypes[0] +} + +func (x ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType.Descriptor instead. +func (ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType) EnumDescriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{57, 0, 0} +} + type GetAccountIdentityRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -2801,6 +2850,7 @@ type GenerateTotpKeyResponse struct { // // *GenerateTotpKeyResponse_KeyGenerated_ // *GenerateTotpKeyResponse_TooManyTotpKeys + // *GenerateTotpKeyResponse_TooManyMfaKeys Response isGenerateTotpKeyResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2861,6 +2911,15 @@ func (x *GenerateTotpKeyResponse) GetTooManyTotpKeys() *errors.FailedPreconditio return nil } +func (x *GenerateTotpKeyResponse) GetTooManyMfaKeys() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*GenerateTotpKeyResponse_TooManyMfaKeys); ok { + return x.TooManyMfaKeys + } + } + return nil +} + type isGenerateTotpKeyResponse_Response interface { isGenerateTotpKeyResponse_Response() } @@ -2877,10 +2936,18 @@ type GenerateTotpKeyResponse_TooManyTotpKeys struct { TooManyTotpKeys *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=too_many_totp_keys,json=tooManyTotpKeys,proto3,oneof"` } +type GenerateTotpKeyResponse_TooManyMfaKeys struct { + // The authenticated account already has too many MFA keys of all types, and + // the caller must remove one before adding more + TooManyMfaKeys *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=too_many_mfa_keys,json=tooManyMfaKeys,proto3,oneof"` +} + func (*GenerateTotpKeyResponse_KeyGenerated_) isGenerateTotpKeyResponse_Response() {} func (*GenerateTotpKeyResponse_TooManyTotpKeys) isGenerateTotpKeyResponse_Response() {} +func (*GenerateTotpKeyResponse_TooManyMfaKeys) isGenerateTotpKeyResponse_Response() {} + type ConfirmTotpKeyRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // A one-time password derived from the current pending TOTP key @@ -2943,6 +3010,7 @@ type ConfirmTotpKeyResponse struct { // // *ConfirmTotpKeyResponse_KeyConfirmed_ // *ConfirmTotpKeyResponse_OneTimePasswordNotVerified + // *ConfirmTotpKeyResponse_TooManyMfaKeys Response isConfirmTotpKeyResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -3003,6 +3071,15 @@ func (x *ConfirmTotpKeyResponse) GetOneTimePasswordNotVerified() *errors.FailedP return nil } +func (x *ConfirmTotpKeyResponse) GetTooManyMfaKeys() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*ConfirmTotpKeyResponse_TooManyMfaKeys); ok { + return x.TooManyMfaKeys + } + } + return nil +} + type isConfirmTotpKeyResponse_Response interface { isConfirmTotpKeyResponse_Response() } @@ -3019,30 +3096,38 @@ type ConfirmTotpKeyResponse_OneTimePasswordNotVerified struct { OneTimePasswordNotVerified *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=one_time_password_not_verified,json=oneTimePasswordNotVerified,proto3,oneof"` } +type ConfirmTotpKeyResponse_TooManyMfaKeys struct { + // The authenticated account already has too many MFA keys of all types, and + // the caller must remove one before adding more + TooManyMfaKeys *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=too_many_mfa_keys,json=tooManyMfaKeys,proto3,oneof"` +} + func (*ConfirmTotpKeyResponse_KeyConfirmed_) isConfirmTotpKeyResponse_Response() {} func (*ConfirmTotpKeyResponse_OneTimePasswordNotVerified) isConfirmTotpKeyResponse_Response() {} -type ListTotpKeysRequest struct { +func (*ConfirmTotpKeyResponse_TooManyMfaKeys) isConfirmTotpKeyResponse_Response() {} + +type StartWebAuthnRegistrationRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ListTotpKeysRequest) Reset() { - *x = ListTotpKeysRequest{} +func (x *StartWebAuthnRegistrationRequest) Reset() { + *x = StartWebAuthnRegistrationRequest{} mi := &file_org_signal_chat_account_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListTotpKeysRequest) String() string { +func (x *StartWebAuthnRegistrationRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListTotpKeysRequest) ProtoMessage() {} +func (*StartWebAuthnRegistrationRequest) ProtoMessage() {} -func (x *ListTotpKeysRequest) ProtoReflect() protoreflect.Message { +func (x *StartWebAuthnRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_account_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3054,32 +3139,36 @@ func (x *ListTotpKeysRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListTotpKeysRequest.ProtoReflect.Descriptor instead. -func (*ListTotpKeysRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use StartWebAuthnRegistrationRequest.ProtoReflect.Descriptor instead. +func (*StartWebAuthnRegistrationRequest) Descriptor() ([]byte, []int) { return file_org_signal_chat_account_proto_rawDescGZIP(), []int{52} } -type ListTotpKeysResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keys map[int32]*ListTotpKeysResponse_TotpKeyMetadata `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +type StartWebAuthnRegistrationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *StartWebAuthnRegistrationResponse_Params + // *StartWebAuthnRegistrationResponse_TooManyMfaKeys + Response isStartWebAuthnRegistrationResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ListTotpKeysResponse) Reset() { - *x = ListTotpKeysResponse{} +func (x *StartWebAuthnRegistrationResponse) Reset() { + *x = StartWebAuthnRegistrationResponse{} mi := &file_org_signal_chat_account_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListTotpKeysResponse) String() string { +func (x *StartWebAuthnRegistrationResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListTotpKeysResponse) ProtoMessage() {} +func (*StartWebAuthnRegistrationResponse) ProtoMessage() {} -func (x *ListTotpKeysResponse) ProtoReflect() protoreflect.Message { +func (x *StartWebAuthnRegistrationResponse) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_account_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3091,21 +3180,313 @@ func (x *ListTotpKeysResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListTotpKeysResponse.ProtoReflect.Descriptor instead. -func (*ListTotpKeysResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use StartWebAuthnRegistrationResponse.ProtoReflect.Descriptor instead. +func (*StartWebAuthnRegistrationResponse) Descriptor() ([]byte, []int) { return file_org_signal_chat_account_proto_rawDescGZIP(), []int{53} } -func (x *ListTotpKeysResponse) GetKeys() map[int32]*ListTotpKeysResponse_TotpKeyMetadata { +func (x *StartWebAuthnRegistrationResponse) GetResponse() isStartWebAuthnRegistrationResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *StartWebAuthnRegistrationResponse) GetParams() *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters { + if x != nil { + if x, ok := x.Response.(*StartWebAuthnRegistrationResponse_Params); ok { + return x.Params + } + } + return nil +} + +func (x *StartWebAuthnRegistrationResponse) GetTooManyMfaKeys() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*StartWebAuthnRegistrationResponse_TooManyMfaKeys); ok { + return x.TooManyMfaKeys + } + } + return nil +} + +type isStartWebAuthnRegistrationResponse_Response interface { + isStartWebAuthnRegistrationResponse_Response() +} + +type StartWebAuthnRegistrationResponse_Params struct { + // The parameters to use for a WebAuthn registration ceremony + Params *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters `protobuf:"bytes,1,opt,name=params,proto3,oneof"` +} + +type StartWebAuthnRegistrationResponse_TooManyMfaKeys struct { + // The authenticated account already has too many MFA keys, and the + // caller must remove one before adding one + TooManyMfaKeys *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=too_many_mfa_keys,json=tooManyMfaKeys,proto3,oneof"` +} + +func (*StartWebAuthnRegistrationResponse_Params) isStartWebAuthnRegistrationResponse_Response() {} + +func (*StartWebAuthnRegistrationResponse_TooManyMfaKeys) isStartWebAuthnRegistrationResponse_Response() { +} + +type FinishWebAuthnRegistrationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The attestation object from a completed registration ceremony, serialized + // as specified in https://www.w3.org/TR/webauthn/#attestation-object + AttestationObject []byte `protobuf:"bytes,1,opt,name=attestation_object,json=attestationObject,proto3" json:"attestation_object,omitempty"` + // The "collected client data" map used in the registration ceremony, as the + // exact JSON map that was hashed for the authenticator + CollectedClientDataJson string `protobuf:"bytes,2,opt,name=collected_client_data_json,json=collectedClientDataJson,proto3" json:"collected_client_data_json,omitempty"` + // The ciphertext of user-provided metadata (presumably including a + // human-readable name and creation timestamp) to be attached to the + // newly-confirmed key + MetadataCiphertext []byte `protobuf:"bytes,3,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishWebAuthnRegistrationRequest) Reset() { + *x = FinishWebAuthnRegistrationRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishWebAuthnRegistrationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishWebAuthnRegistrationRequest) ProtoMessage() {} + +func (x *FinishWebAuthnRegistrationRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishWebAuthnRegistrationRequest.ProtoReflect.Descriptor instead. +func (*FinishWebAuthnRegistrationRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{54} +} + +func (x *FinishWebAuthnRegistrationRequest) GetAttestationObject() []byte { + if x != nil { + return x.AttestationObject + } + return nil +} + +func (x *FinishWebAuthnRegistrationRequest) GetCollectedClientDataJson() string { + if x != nil { + return x.CollectedClientDataJson + } + return "" +} + +func (x *FinishWebAuthnRegistrationRequest) GetMetadataCiphertext() []byte { + if x != nil { + return x.MetadataCiphertext + } + return nil +} + +type FinishWebAuthnRegistrationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *FinishWebAuthnRegistrationResponse_KeyConfirmed_ + // *FinishWebAuthnRegistrationResponse_KeyNotConfirmed + // *FinishWebAuthnRegistrationResponse_TooManyMfaKeys + Response isFinishWebAuthnRegistrationResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishWebAuthnRegistrationResponse) Reset() { + *x = FinishWebAuthnRegistrationResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishWebAuthnRegistrationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishWebAuthnRegistrationResponse) ProtoMessage() {} + +func (x *FinishWebAuthnRegistrationResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishWebAuthnRegistrationResponse.ProtoReflect.Descriptor instead. +func (*FinishWebAuthnRegistrationResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55} +} + +func (x *FinishWebAuthnRegistrationResponse) GetResponse() isFinishWebAuthnRegistrationResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *FinishWebAuthnRegistrationResponse) GetKeyConfirmed() *FinishWebAuthnRegistrationResponse_KeyConfirmed { + if x != nil { + if x, ok := x.Response.(*FinishWebAuthnRegistrationResponse_KeyConfirmed_); ok { + return x.KeyConfirmed + } + } + return nil +} + +func (x *FinishWebAuthnRegistrationResponse) GetKeyNotConfirmed() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*FinishWebAuthnRegistrationResponse_KeyNotConfirmed); ok { + return x.KeyNotConfirmed + } + } + return nil +} + +func (x *FinishWebAuthnRegistrationResponse) GetTooManyMfaKeys() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*FinishWebAuthnRegistrationResponse_TooManyMfaKeys); ok { + return x.TooManyMfaKeys + } + } + return nil +} + +type isFinishWebAuthnRegistrationResponse_Response interface { + isFinishWebAuthnRegistrationResponse_Response() +} + +type FinishWebAuthnRegistrationResponse_KeyConfirmed_ struct { + // The provided public key has been registered for the account + KeyConfirmed *FinishWebAuthnRegistrationResponse_KeyConfirmed `protobuf:"bytes,1,opt,name=key_confirmed,json=keyConfirmed,proto3,oneof"` +} + +type FinishWebAuthnRegistrationResponse_KeyNotConfirmed struct { + // The registration response was not verified successfully for any reason + KeyNotConfirmed *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=key_not_confirmed,json=keyNotConfirmed,proto3,oneof"` +} + +type FinishWebAuthnRegistrationResponse_TooManyMfaKeys struct { + // The authenticated account already has too many MFA keys, and the + // caller must remove one before adding one (this can be true even if it + // was not when starting the request, since there is nothing to prevent + // multiple registrations from occurring in parallel) + TooManyMfaKeys *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=too_many_mfa_keys,json=tooManyMfaKeys,proto3,oneof"` +} + +func (*FinishWebAuthnRegistrationResponse_KeyConfirmed_) isFinishWebAuthnRegistrationResponse_Response() { +} + +func (*FinishWebAuthnRegistrationResponse_KeyNotConfirmed) isFinishWebAuthnRegistrationResponse_Response() { +} + +func (*FinishWebAuthnRegistrationResponse_TooManyMfaKeys) isFinishWebAuthnRegistrationResponse_Response() { +} + +type ListMfaKeysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMfaKeysRequest) Reset() { + *x = ListMfaKeysRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMfaKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMfaKeysRequest) ProtoMessage() {} + +func (x *ListMfaKeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMfaKeysRequest.ProtoReflect.Descriptor instead. +func (*ListMfaKeysRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{56} +} + +type ListMfaKeysResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Keys map[uint32]*ListMfaKeysResponse_MfaKeyMetadata `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMfaKeysResponse) Reset() { + *x = ListMfaKeysResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMfaKeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMfaKeysResponse) ProtoMessage() {} + +func (x *ListMfaKeysResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMfaKeysResponse.ProtoReflect.Descriptor instead. +func (*ListMfaKeysResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{57} +} + +func (x *ListMfaKeysResponse) GetKeys() map[uint32]*ListMfaKeysResponse_MfaKeyMetadata { if x != nil { return x.Keys } return nil } -type SetTotpKeyMetadataRequest struct { +type SetMfaKeyMetadataRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - // The account-specific identifier of the TOTP key to modify + // The account-specific identifier of the MFA key to modify KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // The ciphertext of the new user-provided metadata to be attached to the // identified key @@ -3114,21 +3495,21 @@ type SetTotpKeyMetadataRequest struct { sizeCache protoimpl.SizeCache } -func (x *SetTotpKeyMetadataRequest) Reset() { - *x = SetTotpKeyMetadataRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[54] +func (x *SetMfaKeyMetadataRequest) Reset() { + *x = SetMfaKeyMetadataRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SetTotpKeyMetadataRequest) String() string { +func (x *SetMfaKeyMetadataRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetTotpKeyMetadataRequest) ProtoMessage() {} +func (*SetMfaKeyMetadataRequest) ProtoMessage() {} -func (x *SetTotpKeyMetadataRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[54] +func (x *SetMfaKeyMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3139,51 +3520,51 @@ func (x *SetTotpKeyMetadataRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetTotpKeyMetadataRequest.ProtoReflect.Descriptor instead. -func (*SetTotpKeyMetadataRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{54} +// Deprecated: Use SetMfaKeyMetadataRequest.ProtoReflect.Descriptor instead. +func (*SetMfaKeyMetadataRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{58} } -func (x *SetTotpKeyMetadataRequest) GetKeyId() uint32 { +func (x *SetMfaKeyMetadataRequest) GetKeyId() uint32 { if x != nil { return x.KeyId } return 0 } -func (x *SetTotpKeyMetadataRequest) GetMetadataCiphertext() []byte { +func (x *SetMfaKeyMetadataRequest) GetMetadataCiphertext() []byte { if x != nil { return x.MetadataCiphertext } return nil } -type SetTotpKeyMetadataResponse struct { +type SetMfaKeyMetadataResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Response: // - // *SetTotpKeyMetadataResponse_MetadataUpdated_ - // *SetTotpKeyMetadataResponse_KeyNotFound - Response isSetTotpKeyMetadataResponse_Response `protobuf_oneof:"response"` + // *SetMfaKeyMetadataResponse_Success + // *SetMfaKeyMetadataResponse_KeyNotFound + Response isSetMfaKeyMetadataResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SetTotpKeyMetadataResponse) Reset() { - *x = SetTotpKeyMetadataResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[55] +func (x *SetMfaKeyMetadataResponse) Reset() { + *x = SetMfaKeyMetadataResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SetTotpKeyMetadataResponse) String() string { +func (x *SetMfaKeyMetadataResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetTotpKeyMetadataResponse) ProtoMessage() {} +func (*SetMfaKeyMetadataResponse) ProtoMessage() {} -func (x *SetTotpKeyMetadataResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[55] +func (x *SetMfaKeyMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3194,77 +3575,77 @@ func (x *SetTotpKeyMetadataResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetTotpKeyMetadataResponse.ProtoReflect.Descriptor instead. -func (*SetTotpKeyMetadataResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55} +// Deprecated: Use SetMfaKeyMetadataResponse.ProtoReflect.Descriptor instead. +func (*SetMfaKeyMetadataResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{59} } -func (x *SetTotpKeyMetadataResponse) GetResponse() isSetTotpKeyMetadataResponse_Response { +func (x *SetMfaKeyMetadataResponse) GetResponse() isSetMfaKeyMetadataResponse_Response { if x != nil { return x.Response } return nil } -func (x *SetTotpKeyMetadataResponse) GetMetadataUpdated() *SetTotpKeyMetadataResponse_MetadataUpdated { +func (x *SetMfaKeyMetadataResponse) GetSuccess() *SetMfaKeyMetadataResponse_MetadataUpdated { if x != nil { - if x, ok := x.Response.(*SetTotpKeyMetadataResponse_MetadataUpdated_); ok { - return x.MetadataUpdated + if x, ok := x.Response.(*SetMfaKeyMetadataResponse_Success); ok { + return x.Success } } return nil } -func (x *SetTotpKeyMetadataResponse) GetKeyNotFound() *errors.NotFound { +func (x *SetMfaKeyMetadataResponse) GetKeyNotFound() *errors.NotFound { if x != nil { - if x, ok := x.Response.(*SetTotpKeyMetadataResponse_KeyNotFound); ok { + if x, ok := x.Response.(*SetMfaKeyMetadataResponse_KeyNotFound); ok { return x.KeyNotFound } } return nil } -type isSetTotpKeyMetadataResponse_Response interface { - isSetTotpKeyMetadataResponse_Response() +type isSetMfaKeyMetadataResponse_Response interface { + isSetMfaKeyMetadataResponse_Response() } -type SetTotpKeyMetadataResponse_MetadataUpdated_ struct { - // New metadata was stored for the identified TOTP key - MetadataUpdated *SetTotpKeyMetadataResponse_MetadataUpdated `protobuf:"bytes,1,opt,name=metadata_updated,json=metadataUpdated,proto3,oneof"` +type SetMfaKeyMetadataResponse_Success struct { + // New metadata was stored for the identified key + Success *SetMfaKeyMetadataResponse_MetadataUpdated `protobuf:"bytes,1,opt,name=success,proto3,oneof"` } -type SetTotpKeyMetadataResponse_KeyNotFound struct { +type SetMfaKeyMetadataResponse_KeyNotFound struct { // No TOTP was found with the given ID KeyNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=key_not_found,json=keyNotFound,proto3,oneof"` } -func (*SetTotpKeyMetadataResponse_MetadataUpdated_) isSetTotpKeyMetadataResponse_Response() {} +func (*SetMfaKeyMetadataResponse_Success) isSetMfaKeyMetadataResponse_Response() {} -func (*SetTotpKeyMetadataResponse_KeyNotFound) isSetTotpKeyMetadataResponse_Response() {} +func (*SetMfaKeyMetadataResponse_KeyNotFound) isSetMfaKeyMetadataResponse_Response() {} -type RemoveTotpKeyRequest struct { +type RemoveMfaKeyRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - // The account-specific identifier of the TOTP key to remove + // The account-specific identifier of the MFA key to remove KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *RemoveTotpKeyRequest) Reset() { - *x = RemoveTotpKeyRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[56] +func (x *RemoveMfaKeyRequest) Reset() { + *x = RemoveMfaKeyRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *RemoveTotpKeyRequest) String() string { +func (x *RemoveMfaKeyRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RemoveTotpKeyRequest) ProtoMessage() {} +func (*RemoveMfaKeyRequest) ProtoMessage() {} -func (x *RemoveTotpKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[56] +func (x *RemoveMfaKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3275,39 +3656,39 @@ func (x *RemoveTotpKeyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RemoveTotpKeyRequest.ProtoReflect.Descriptor instead. -func (*RemoveTotpKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{56} +// Deprecated: Use RemoveMfaKeyRequest.ProtoReflect.Descriptor instead. +func (*RemoveMfaKeyRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{60} } -func (x *RemoveTotpKeyRequest) GetKeyId() uint32 { +func (x *RemoveMfaKeyRequest) GetKeyId() uint32 { if x != nil { return x.KeyId } return 0 } -type RemoveTotpKeyResponse struct { +type RemoveMfaKeyResponse struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *RemoveTotpKeyResponse) Reset() { - *x = RemoveTotpKeyResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[57] +func (x *RemoveMfaKeyResponse) Reset() { + *x = RemoveMfaKeyResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *RemoveTotpKeyResponse) String() string { +func (x *RemoveMfaKeyResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RemoveTotpKeyResponse) ProtoMessage() {} +func (*RemoveMfaKeyResponse) ProtoMessage() {} -func (x *RemoveTotpKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[57] +func (x *RemoveMfaKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3318,9 +3699,229 @@ func (x *RemoveTotpKeyResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RemoveTotpKeyResponse.ProtoReflect.Descriptor instead. -func (*RemoveTotpKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{57} +// Deprecated: Use RemoveMfaKeyResponse.ProtoReflect.Descriptor instead. +func (*RemoveMfaKeyResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{61} +} + +type StartMfaVerificationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartMfaVerificationRequest) Reset() { + *x = StartMfaVerificationRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartMfaVerificationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartMfaVerificationRequest) ProtoMessage() {} + +func (x *StartMfaVerificationRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[62] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartMfaVerificationRequest.ProtoReflect.Descriptor instead. +func (*StartMfaVerificationRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{62} +} + +type StartMfaVerificationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / If true, a TOTP password will be accepted for verification + HasTotp bool `protobuf:"varint,1,opt,name=has_totp,json=hasTotp,proto3" json:"has_totp,omitempty"` + // / If present, information required to complete a WebAuthn authentication + WebauthnAuthenticationParameters *StartMfaVerificationResponse_WebAuthnAuthenticationParameters `protobuf:"bytes,2,opt,name=webauthn_authentication_parameters,json=webauthnAuthenticationParameters,proto3,oneof" json:"webauthn_authentication_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartMfaVerificationResponse) Reset() { + *x = StartMfaVerificationResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartMfaVerificationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartMfaVerificationResponse) ProtoMessage() {} + +func (x *StartMfaVerificationResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartMfaVerificationResponse.ProtoReflect.Descriptor instead. +func (*StartMfaVerificationResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{63} +} + +func (x *StartMfaVerificationResponse) GetHasTotp() bool { + if x != nil { + return x.HasTotp + } + return false +} + +func (x *StartMfaVerificationResponse) GetWebauthnAuthenticationParameters() *StartMfaVerificationResponse_WebAuthnAuthenticationParameters { + if x != nil { + return x.WebauthnAuthenticationParameters + } + return nil +} + +type FinishMfaVerificationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Credential: + // + // *FinishMfaVerificationRequest_TotpPassword + // *FinishMfaVerificationRequest_WebauthnAuthenticationResponseJson + Credential isFinishMfaVerificationRequest_Credential `protobuf_oneof:"credential"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishMfaVerificationRequest) Reset() { + *x = FinishMfaVerificationRequest{} + mi := &file_org_signal_chat_account_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishMfaVerificationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishMfaVerificationRequest) ProtoMessage() {} + +func (x *FinishMfaVerificationRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishMfaVerificationRequest.ProtoReflect.Descriptor instead. +func (*FinishMfaVerificationRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{64} +} + +func (x *FinishMfaVerificationRequest) GetCredential() isFinishMfaVerificationRequest_Credential { + if x != nil { + return x.Credential + } + return nil +} + +func (x *FinishMfaVerificationRequest) GetTotpPassword() uint32 { + if x != nil { + if x, ok := x.Credential.(*FinishMfaVerificationRequest_TotpPassword); ok { + return x.TotpPassword + } + } + return 0 +} + +func (x *FinishMfaVerificationRequest) GetWebauthnAuthenticationResponseJson() string { + if x != nil { + if x, ok := x.Credential.(*FinishMfaVerificationRequest_WebauthnAuthenticationResponseJson); ok { + return x.WebauthnAuthenticationResponseJson + } + } + return "" +} + +type isFinishMfaVerificationRequest_Credential interface { + isFinishMfaVerificationRequest_Credential() +} + +type FinishMfaVerificationRequest_TotpPassword struct { + // / A 6-digit TOTP password to validate + TotpPassword uint32 `protobuf:"varint,1,opt,name=totp_password,json=totpPassword,proto3,oneof"` +} + +type FinishMfaVerificationRequest_WebauthnAuthenticationResponseJson struct { + // / A WebAuthn-compatible JSON-serialized authentication response + WebauthnAuthenticationResponseJson string `protobuf:"bytes,2,opt,name=webauthn_authentication_response_json,json=webauthnAuthenticationResponseJson,proto3,oneof"` +} + +func (*FinishMfaVerificationRequest_TotpPassword) isFinishMfaVerificationRequest_Credential() {} + +func (*FinishMfaVerificationRequest_WebauthnAuthenticationResponseJson) isFinishMfaVerificationRequest_Credential() { +} + +type FinishMfaVerificationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / If true, the selected authentication factor was verified correctly. + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishMfaVerificationResponse) Reset() { + *x = FinishMfaVerificationResponse{} + mi := &file_org_signal_chat_account_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishMfaVerificationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishMfaVerificationResponse) ProtoMessage() {} + +func (x *FinishMfaVerificationResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishMfaVerificationResponse.ProtoReflect.Descriptor instead. +func (*FinishMfaVerificationResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{65} +} + +func (x *FinishMfaVerificationResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false } type GetEntitlementsResponse_BadgeEntitlement struct { @@ -3339,7 +3940,7 @@ type GetEntitlementsResponse_BadgeEntitlement struct { func (x *GetEntitlementsResponse_BadgeEntitlement) Reset() { *x = GetEntitlementsResponse_BadgeEntitlement{} - mi := &file_org_signal_chat_account_proto_msgTypes[58] + mi := &file_org_signal_chat_account_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3351,7 +3952,7 @@ func (x *GetEntitlementsResponse_BadgeEntitlement) String() string { func (*GetEntitlementsResponse_BadgeEntitlement) ProtoMessage() {} func (x *GetEntitlementsResponse_BadgeEntitlement) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[58] + mi := &file_org_signal_chat_account_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3400,7 +4001,7 @@ type GetEntitlementsResponse_BackupEntitlement struct { func (x *GetEntitlementsResponse_BackupEntitlement) Reset() { *x = GetEntitlementsResponse_BackupEntitlement{} - mi := &file_org_signal_chat_account_proto_msgTypes[59] + mi := &file_org_signal_chat_account_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3412,7 +4013,7 @@ func (x *GetEntitlementsResponse_BackupEntitlement) String() string { func (*GetEntitlementsResponse_BackupEntitlement) ProtoMessage() {} func (x *GetEntitlementsResponse_BackupEntitlement) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[59] + mi := &file_org_signal_chat_account_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3452,7 +4053,7 @@ type ConfirmUsernameHashResponse_ConfirmedUsernameHash struct { func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) Reset() { *x = ConfirmUsernameHashResponse_ConfirmedUsernameHash{} - mi := &file_org_signal_chat_account_proto_msgTypes[60] + mi := &file_org_signal_chat_account_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3464,7 +4065,7 @@ func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) String() string { func (*ConfirmUsernameHashResponse_ConfirmedUsernameHash) ProtoMessage() {} func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[60] + mi := &file_org_signal_chat_account_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3499,7 +4100,7 @@ type GenerateTotpKeyResponse_KeyGenerated struct { func (x *GenerateTotpKeyResponse_KeyGenerated) Reset() { *x = GenerateTotpKeyResponse_KeyGenerated{} - mi := &file_org_signal_chat_account_proto_msgTypes[64] + mi := &file_org_signal_chat_account_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3511,7 +4112,7 @@ func (x *GenerateTotpKeyResponse_KeyGenerated) String() string { func (*GenerateTotpKeyResponse_KeyGenerated) ProtoMessage() {} func (x *GenerateTotpKeyResponse_KeyGenerated) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[64] + mi := &file_org_signal_chat_account_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3551,7 +4152,7 @@ type ConfirmTotpKeyResponse_KeyConfirmed struct { func (x *ConfirmTotpKeyResponse_KeyConfirmed) Reset() { *x = ConfirmTotpKeyResponse_KeyConfirmed{} - mi := &file_org_signal_chat_account_proto_msgTypes[65] + mi := &file_org_signal_chat_account_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3563,7 +4164,7 @@ func (x *ConfirmTotpKeyResponse_KeyConfirmed) String() string { func (*ConfirmTotpKeyResponse_KeyConfirmed) ProtoMessage() {} func (x *ConfirmTotpKeyResponse_KeyConfirmed) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[65] + mi := &file_org_signal_chat_account_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3586,31 +4187,36 @@ func (x *ConfirmTotpKeyResponse_KeyConfirmed) GetKeyId() uint32 { return 0 } -type ListTotpKeysResponse_TotpKeyMetadata struct { +type StartWebAuthnRegistrationResponse_WebAuthnCreateParameters struct { state protoimpl.MessageState `protogen:"open.v1"` - // The user-provided ciphertext for metadata associated with this TOTP key - MetadataCiphertext []byte `protobuf:"bytes,1,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` - // The TOTP parameters associated with this key - TotpParameters *TotpParameters `protobuf:"bytes,2,opt,name=totp_parameters,json=totpParameters,proto3" json:"totp_parameters,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // The "user handle" (user.id) that should be handed to the authenticator + UserHandle []byte `protobuf:"bytes,1,opt,name=user_handle,json=userHandle,proto3" json:"user_handle,omitempty"` + // The COSE IDs (https://www.iana.org/assignments/cose#algorithms) of + // acceptable algorithms for the created key + AllowedAlgorithms []int64 `protobuf:"varint,2,rep,packed,name=allowed_algorithms,json=allowedAlgorithms,proto3" json:"allowed_algorithms,omitempty"` + // A list of the credential IDs already registered for this account; these + // can be passed to candidate authenticators to tell them not to create a + // new key if they already have a private key matching one of these + ExcludeCredentialIds [][]byte `protobuf:"bytes,3,rep,name=exclude_credential_ids,json=excludeCredentialIds,proto3" json:"exclude_credential_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ListTotpKeysResponse_TotpKeyMetadata) Reset() { - *x = ListTotpKeysResponse_TotpKeyMetadata{} - mi := &file_org_signal_chat_account_proto_msgTypes[66] +func (x *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) Reset() { + *x = StartWebAuthnRegistrationResponse_WebAuthnCreateParameters{} + mi := &file_org_signal_chat_account_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListTotpKeysResponse_TotpKeyMetadata) String() string { +func (x *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListTotpKeysResponse_TotpKeyMetadata) ProtoMessage() {} +func (*StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) ProtoMessage() {} -func (x *ListTotpKeysResponse_TotpKeyMetadata) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[66] +func (x *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3621,46 +4227,152 @@ func (x *ListTotpKeysResponse_TotpKeyMetadata) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use ListTotpKeysResponse_TotpKeyMetadata.ProtoReflect.Descriptor instead. -func (*ListTotpKeysResponse_TotpKeyMetadata) Descriptor() ([]byte, []int) { +// Deprecated: Use StartWebAuthnRegistrationResponse_WebAuthnCreateParameters.ProtoReflect.Descriptor instead. +func (*StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) Descriptor() ([]byte, []int) { return file_org_signal_chat_account_proto_rawDescGZIP(), []int{53, 0} } -func (x *ListTotpKeysResponse_TotpKeyMetadata) GetMetadataCiphertext() []byte { +func (x *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) GetUserHandle() []byte { + if x != nil { + return x.UserHandle + } + return nil +} + +func (x *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) GetAllowedAlgorithms() []int64 { + if x != nil { + return x.AllowedAlgorithms + } + return nil +} + +func (x *StartWebAuthnRegistrationResponse_WebAuthnCreateParameters) GetExcludeCredentialIds() [][]byte { + if x != nil { + return x.ExcludeCredentialIds + } + return nil +} + +type FinishWebAuthnRegistrationResponse_KeyConfirmed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An account-specific identifier for the new WebAuthn key + KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishWebAuthnRegistrationResponse_KeyConfirmed) Reset() { + *x = FinishWebAuthnRegistrationResponse_KeyConfirmed{} + mi := &file_org_signal_chat_account_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishWebAuthnRegistrationResponse_KeyConfirmed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishWebAuthnRegistrationResponse_KeyConfirmed) ProtoMessage() {} + +func (x *FinishWebAuthnRegistrationResponse_KeyConfirmed) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[75] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishWebAuthnRegistrationResponse_KeyConfirmed.ProtoReflect.Descriptor instead. +func (*FinishWebAuthnRegistrationResponse_KeyConfirmed) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55, 0} +} + +func (x *FinishWebAuthnRegistrationResponse_KeyConfirmed) GetKeyId() uint32 { + if x != nil { + return x.KeyId + } + return 0 +} + +type ListMfaKeysResponse_MfaKeyMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The user-provided ciphertext for metadata associated with this MFA key + MetadataCiphertext []byte `protobuf:"bytes,1,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` + // The type of MFA factor this key is for + Type ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType `protobuf:"varint,2,opt,name=type,proto3,enum=org.signal.chat.account.ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMfaKeysResponse_MfaKeyMetadata) Reset() { + *x = ListMfaKeysResponse_MfaKeyMetadata{} + mi := &file_org_signal_chat_account_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMfaKeysResponse_MfaKeyMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMfaKeysResponse_MfaKeyMetadata) ProtoMessage() {} + +func (x *ListMfaKeysResponse_MfaKeyMetadata) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[76] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMfaKeysResponse_MfaKeyMetadata.ProtoReflect.Descriptor instead. +func (*ListMfaKeysResponse_MfaKeyMetadata) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{57, 0} +} + +func (x *ListMfaKeysResponse_MfaKeyMetadata) GetMetadataCiphertext() []byte { if x != nil { return x.MetadataCiphertext } return nil } -func (x *ListTotpKeysResponse_TotpKeyMetadata) GetTotpParameters() *TotpParameters { +func (x *ListMfaKeysResponse_MfaKeyMetadata) GetType() ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType { if x != nil { - return x.TotpParameters + return x.Type } - return nil + return ListMfaKeysResponse_MfaKeyMetadata_MFA_KEY_TYPE_UNSPECIFIED } -type SetTotpKeyMetadataResponse_MetadataUpdated struct { +type SetMfaKeyMetadataResponse_MetadataUpdated struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SetTotpKeyMetadataResponse_MetadataUpdated) Reset() { - *x = SetTotpKeyMetadataResponse_MetadataUpdated{} - mi := &file_org_signal_chat_account_proto_msgTypes[68] +func (x *SetMfaKeyMetadataResponse_MetadataUpdated) Reset() { + *x = SetMfaKeyMetadataResponse_MetadataUpdated{} + mi := &file_org_signal_chat_account_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SetTotpKeyMetadataResponse_MetadataUpdated) String() string { +func (x *SetMfaKeyMetadataResponse_MetadataUpdated) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetTotpKeyMetadataResponse_MetadataUpdated) ProtoMessage() {} +func (*SetMfaKeyMetadataResponse_MetadataUpdated) ProtoMessage() {} -func (x *SetTotpKeyMetadataResponse_MetadataUpdated) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[68] +func (x *SetMfaKeyMetadataResponse_MetadataUpdated) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3671,9 +4383,72 @@ func (x *SetTotpKeyMetadataResponse_MetadataUpdated) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use SetTotpKeyMetadataResponse_MetadataUpdated.ProtoReflect.Descriptor instead. -func (*SetTotpKeyMetadataResponse_MetadataUpdated) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55, 0} +// Deprecated: Use SetMfaKeyMetadataResponse_MetadataUpdated.ProtoReflect.Descriptor instead. +func (*SetMfaKeyMetadataResponse_MetadataUpdated) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{59, 0} +} + +type StartMfaVerificationResponse_WebAuthnAuthenticationParameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / A random challenge that must be included in the authenticator response, to prevent replay attacks + Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` + // / The estimated amount of time, in seconds, after which an otherwise-valid response will be rejected + TimeoutSeconds uint32 `protobuf:"varint,2,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` + // / A list of credential IDs associated with this account + AllowedCredentialIds [][]byte `protobuf:"bytes,3,rep,name=allowed_credential_ids,json=allowedCredentialIds,proto3" json:"allowed_credential_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartMfaVerificationResponse_WebAuthnAuthenticationParameters) Reset() { + *x = StartMfaVerificationResponse_WebAuthnAuthenticationParameters{} + mi := &file_org_signal_chat_account_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartMfaVerificationResponse_WebAuthnAuthenticationParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartMfaVerificationResponse_WebAuthnAuthenticationParameters) ProtoMessage() {} + +func (x *StartMfaVerificationResponse_WebAuthnAuthenticationParameters) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_account_proto_msgTypes[79] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartMfaVerificationResponse_WebAuthnAuthenticationParameters.ProtoReflect.Descriptor instead. +func (*StartMfaVerificationResponse_WebAuthnAuthenticationParameters) Descriptor() ([]byte, []int) { + return file_org_signal_chat_account_proto_rawDescGZIP(), []int{63, 0} +} + +func (x *StartMfaVerificationResponse_WebAuthnAuthenticationParameters) GetChallenge() []byte { + if x != nil { + return x.Challenge + } + return nil +} + +func (x *StartMfaVerificationResponse_WebAuthnAuthenticationParameters) GetTimeoutSeconds() uint32 { + if x != nil { + return x.TimeoutSeconds + } + return 0 +} + +func (x *StartMfaVerificationResponse_WebAuthnAuthenticationParameters) GetAllowedCredentialIds() [][]byte { + if x != nil { + return x.AllowedCredentialIds + } + return nil } var File_org_signal_chat_account_proto protoreflect.FileDescriptor @@ -3833,10 +4608,11 @@ const file_org_signal_chat_account_proto_rawDesc = "" + "\talgorithm\x18\x01 \x01(\tR\talgorithm\x12'\n" + "\x0fpassword_length\x18\x02 \x01(\rR\x0epasswordLength\x12*\n" + "\x11time_step_seconds\x18\x03 \x01(\rR\x0ftimeStepSeconds\"\x18\n" + - "\x16GenerateTotpKeyRequest\"\xf2\x02\n" + + "\x16GenerateTotpKeyRequest\"\xe2\x03\n" + "\x17GenerateTotpKeyResponse\x12d\n" + "\rkey_generated\x18\x01 \x01(\v2=.org.signal.chat.account.GenerateTotpKeyResponse.KeyGeneratedH\x00R\fkeyGenerated\x12q\n" + - "\x12too_many_totp_keys\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x16\xc2\xd5\"\x12too_many_totp_keysH\x00R\x0ftooManyTotpKeys\x1ar\n" + + "\x12too_many_totp_keys\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x16\xc2\xd5\"\x12too_many_totp_keysH\x00R\x0ftooManyTotpKeys\x12n\n" + + "\x11too_many_mfa_keys\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11too_many_mfa_keysH\x00R\x0etooManyMfaKeys\x1ar\n" + "\fKeyGenerated\x12\x10\n" + "\x03key\x18\x01 \x01(\fR\x03key\x12P\n" + "\x0ftotp_parameters\x18\x02 \x01(\v2'.org.signal.chat.account.TotpParametersR\x0etotpParametersB\n" + @@ -3844,35 +4620,80 @@ const file_org_signal_chat_account_proto_rawDesc = "" + "\bresponse\"|\n" + "\x15ConfirmTotpKeyRequest\x12*\n" + "\x11one_time_password\x18\x01 \x01(\rR\x0foneTimePassword\x127\n" + - "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\xc7\x02\n" + + "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\xc1\x03\n" + "\x16ConfirmTotpKeyResponse\x12c\n" + "\rkey_confirmed\x18\x01 \x01(\v2<.org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmedH\x00R\fkeyConfirmed\x12\x94\x01\n" + - "\x1eone_time_password_not_verified\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\"\xc2\xd5\"\x1eone_time_password_not_verifiedH\x00R\x1aoneTimePasswordNotVerified\x1a%\n" + - "\fKeyConfirmed\x12\x15\n" + - "\x06key_id\x18\x01 \x01(\rR\x05keyIdB\n" + + "\x1eone_time_password_not_verified\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\"\xc2\xd5\"\x1eone_time_password_not_verifiedH\x00R\x1aoneTimePasswordNotVerified\x12n\n" + + "\x11too_many_mfa_keys\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11too_many_mfa_keysH\x00R\x0etooManyMfaKeys\x1a/\n" + + "\fKeyConfirmed\x12\x1f\n" + + "\x06key_id\x18\x01 \x01(\rB\b\xb2\x97\"\x04\b\x00\x10\x7fR\x05keyIdB\n" + "\n" + - "\bresponse\"\x15\n" + - "\x13ListTotpKeysRequest\"\xf2\x02\n" + - "\x14ListTotpKeysResponse\x12K\n" + - "\x04keys\x18\x01 \x03(\v27.org.signal.chat.account.ListTotpKeysResponse.KeysEntryR\x04keys\x1a\x94\x01\n" + - "\x0fTotpKeyMetadata\x12/\n" + - "\x13metadata_ciphertext\x18\x01 \x01(\fR\x12metadataCiphertext\x12P\n" + - "\x0ftotp_parameters\x18\x02 \x01(\v2'.org.signal.chat.account.TotpParametersR\x0etotpParameters\x1av\n" + + "\bresponse\"\"\n" + + " StartWebAuthnRegistrationRequest\"\xb1\x03\n" + + "!StartWebAuthnRegistrationResponse\x12m\n" + + "\x06params\x18\x01 \x01(\v2S.org.signal.chat.account.StartWebAuthnRegistrationResponse.WebAuthnCreateParametersH\x00R\x06params\x12n\n" + + "\x11too_many_mfa_keys\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11too_many_mfa_keysH\x00R\x0etooManyMfaKeys\x1a\xa0\x01\n" + + "\x18WebAuthnCreateParameters\x12\x1f\n" + + "\vuser_handle\x18\x01 \x01(\fR\n" + + "userHandle\x12-\n" + + "\x12allowed_algorithms\x18\x02 \x03(\x03R\x11allowedAlgorithms\x124\n" + + "\x16exclude_credential_ids\x18\x03 \x03(\fR\x14excludeCredentialIdsB\n" + + "\n" + + "\bresponse\"\xc8\x01\n" + + "!FinishWebAuthnRegistrationRequest\x12-\n" + + "\x12attestation_object\x18\x01 \x01(\fR\x11attestationObject\x12;\n" + + "\x1acollected_client_data_json\x18\x02 \x01(\tR\x17collectedClientDataJson\x127\n" + + "\x13metadata_ciphertext\x18\x03 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\xc5\x03\n" + + "\"FinishWebAuthnRegistrationResponse\x12o\n" + + "\rkey_confirmed\x18\x01 \x01(\v2H.org.signal.chat.account.FinishWebAuthnRegistrationResponse.KeyConfirmedH\x00R\fkeyConfirmed\x12\x80\x01\n" + + "\x11key_not_confirmed\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB&\xc2\xd5\"\"registration_ceremony_unsuccessfulH\x00R\x0fkeyNotConfirmed\x12n\n" + + "\x11too_many_mfa_keys\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11too_many_mfa_keysH\x00R\x0etooManyMfaKeys\x1a/\n" + + "\fKeyConfirmed\x12\x1f\n" + + "\x06key_id\x18\x01 \x01(\rB\b\xb2\x97\"\x04\b\x00\x10\x7fR\x05keyIdB\n" + + "\n" + + "\bresponse\"\x14\n" + + "\x12ListMfaKeysRequest\"\xdd\x03\n" + + "\x13ListMfaKeysResponse\x12J\n" + + "\x04keys\x18\x01 \x03(\v26.org.signal.chat.account.ListMfaKeysResponse.KeysEntryR\x04keys\x1a\x83\x02\n" + + "\x0eMfaKeyMetadata\x127\n" + + "\x13metadata_ciphertext\x18\x01 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\x12Z\n" + + "\x04type\x18\x02 \x01(\x0e2F.org.signal.chat.account.ListMfaKeysResponse.MfaKeyMetadata.MfaKeyTypeR\x04type\"\\\n" + + "\n" + + "MfaKeyType\x12\x1c\n" + + "\x18MFA_KEY_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" + + "\x11MFA_KEY_TYPE_TOTP\x10\x01\x12\x19\n" + + "\x15MFA_KEY_TYPE_WEBAUTHN\x10\x02\x1at\n" + "\tKeysEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x05R\x03key\x12S\n" + - "\x05value\x18\x02 \x01(\v2=.org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadataR\x05value:\x028\x01\"k\n" + - "\x19SetTotpKeyMetadataRequest\x12\x15\n" + - "\x06key_id\x18\x01 \x01(\rR\x05keyId\x127\n" + - "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\x88\x02\n" + - "\x1aSetTotpKeyMetadataResponse\x12p\n" + - "\x10metadata_updated\x18\x01 \x01(\v2C.org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdatedH\x00R\x0fmetadataUpdated\x12Y\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12Q\n" + + "\x05value\x18\x02 \x01(\v2;.org.signal.chat.account.ListMfaKeysResponse.MfaKeyMetadataR\x05value:\x028\x01\"t\n" + + "\x18SetMfaKeyMetadataRequest\x12\x1f\n" + + "\x06key_id\x18\x01 \x01(\rB\b\xb2\x97\"\x04\b\x00\x10\x7fR\x05keyId\x127\n" + + "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\xf5\x01\n" + + "\x19SetMfaKeyMetadataResponse\x12^\n" + + "\asuccess\x18\x01 \x01(\v2B.org.signal.chat.account.SetMfaKeyMetadataResponse.MetadataUpdatedH\x00R\asuccess\x12Y\n" + "\rkey_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x11\xc2\xd5\"\rkey_not_foundH\x00R\vkeyNotFound\x1a\x11\n" + "\x0fMetadataUpdatedB\n" + "\n" + - "\bresponse\"-\n" + - "\x14RemoveTotpKeyRequest\x12\x15\n" + - "\x06key_id\x18\x01 \x01(\rR\x05keyId\"\x17\n" + - "\x15RemoveTotpKeyResponse2\xb4\x16\n" + + "\bresponse\"6\n" + + "\x13RemoveMfaKeyRequest\x12\x1f\n" + + "\x06key_id\x18\x01 \x01(\rB\b\xb2\x97\"\x04\b\x00\x10\x7fR\x05keyId\"\x16\n" + + "\x14RemoveMfaKeyResponse\"\x1d\n" + + "\x1bStartMfaVerificationRequest\"\xae\x03\n" + + "\x1cStartMfaVerificationResponse\x12\x19\n" + + "\bhas_totp\x18\x01 \x01(\bR\ahasTotp\x12\xa9\x01\n" + + "\"webauthn_authentication_parameters\x18\x02 \x01(\v2V.org.signal.chat.account.StartMfaVerificationResponse.WebAuthnAuthenticationParametersH\x00R webauthnAuthenticationParameters\x88\x01\x01\x1a\x9f\x01\n" + + " WebAuthnAuthenticationParameters\x12\x1c\n" + + "\tchallenge\x18\x01 \x01(\fR\tchallenge\x12'\n" + + "\x0ftimeout_seconds\x18\x02 \x01(\rR\x0etimeoutSeconds\x124\n" + + "\x16allowed_credential_ids\x18\x03 \x03(\fR\x14allowedCredentialIdsB%\n" + + "#_webauthn_authentication_parameters\"\xa8\x01\n" + + "\x1cFinishMfaVerificationRequest\x12%\n" + + "\rtotp_password\x18\x01 \x01(\rH\x00R\ftotpPassword\x12S\n" + + "%webauthn_authentication_response_json\x18\x02 \x01(\tH\x00R\"webauthnAuthenticationResponseJsonB\f\n" + + "\n" + + "credential\"9\n" + + "\x1dFinishMfaVerificationResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess2\xef\x1a\n" + "\bAccounts\x12\x7f\n" + "\x12GetAccountIdentity\x122.org.signal.chat.account.GetAccountIdentityRequest\x1a3.org.signal.chat.account.GetAccountIdentityResponse\"\x00\x12v\n" + "\x0fGetEntitlements\x12/.org.signal.chat.account.GetEntitlementsRequest\x1a0.org.signal.chat.account.GetEntitlementsResponse\"\x00\x12p\n" + @@ -3892,10 +4713,14 @@ const file_org_signal_chat_account_proto_rawDesc = "" + "\x14GetAccountDataReport\x124.org.signal.chat.account.GetAccountDataReportRequest\x1a5.org.signal.chat.account.GetAccountDataReportResponse\"\x00\x12v\n" + "\x0fGetCapabilities\x12/.org.signal.chat.account.GetCapabilitiesRequest\x1a0.org.signal.chat.account.GetCapabilitiesResponse\"\x00\x12v\n" + "\x0fGenerateTotpKey\x12/.org.signal.chat.account.GenerateTotpKeyRequest\x1a0.org.signal.chat.account.GenerateTotpKeyResponse\"\x00\x12s\n" + - "\x0eConfirmTotpKey\x12..org.signal.chat.account.ConfirmTotpKeyRequest\x1a/.org.signal.chat.account.ConfirmTotpKeyResponse\"\x00\x12m\n" + - "\fListTotpKeys\x12,.org.signal.chat.account.ListTotpKeysRequest\x1a-.org.signal.chat.account.ListTotpKeysResponse\"\x00\x12\x7f\n" + - "\x12SetTotpKeyMetadata\x122.org.signal.chat.account.SetTotpKeyMetadataRequest\x1a3.org.signal.chat.account.SetTotpKeyMetadataResponse\"\x00\x12p\n" + - "\rRemoveTotpKey\x12-.org.signal.chat.account.RemoveTotpKeyRequest\x1a..org.signal.chat.account.RemoveTotpKeyResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xb1\x04\n" + + "\x0eConfirmTotpKey\x12..org.signal.chat.account.ConfirmTotpKeyRequest\x1a/.org.signal.chat.account.ConfirmTotpKeyResponse\"\x00\x12\x94\x01\n" + + "\x19StartWebAuthnRegistration\x129.org.signal.chat.account.StartWebAuthnRegistrationRequest\x1a:.org.signal.chat.account.StartWebAuthnRegistrationResponse\"\x00\x12\x97\x01\n" + + "\x1aFinishWebAuthnRegistration\x12:.org.signal.chat.account.FinishWebAuthnRegistrationRequest\x1a;.org.signal.chat.account.FinishWebAuthnRegistrationResponse\"\x00\x12j\n" + + "\vListMfaKeys\x12+.org.signal.chat.account.ListMfaKeysRequest\x1a,.org.signal.chat.account.ListMfaKeysResponse\"\x00\x12|\n" + + "\x11SetMfaKeyMetadata\x121.org.signal.chat.account.SetMfaKeyMetadataRequest\x1a2.org.signal.chat.account.SetMfaKeyMetadataResponse\"\x00\x12m\n" + + "\fRemoveMfaKey\x12,.org.signal.chat.account.RemoveMfaKeyRequest\x1a-.org.signal.chat.account.RemoveMfaKeyResponse\"\x00\x12\x85\x01\n" + + "\x14StartMfaVerification\x124.org.signal.chat.account.StartMfaVerificationRequest\x1a5.org.signal.chat.account.StartMfaVerificationResponse\"\x00\x12\x88\x01\n" + + "\x15FinishMfaVerification\x125.org.signal.chat.account.FinishMfaVerificationRequest\x1a6.org.signal.chat.account.FinishMfaVerificationResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xb1\x04\n" + "\x11AccountsAnonymous\x12\x88\x01\n" + "\x15CheckAccountExistence\x125.org.signal.chat.account.CheckAccountExistenceRequest\x1a6.org.signal.chat.account.CheckAccountExistenceResponse\"\x00\x12\x7f\n" + "\x12LookupUsernameHash\x122.org.signal.chat.account.LookupUsernameHashRequest\x1a3.org.signal.chat.account.LookupUsernameHashResponse\"\x00\x12\x7f\n" + @@ -3914,191 +4739,220 @@ func file_org_signal_chat_account_proto_rawDescGZIP() []byte { return file_org_signal_chat_account_proto_rawDescData } -var file_org_signal_chat_account_proto_msgTypes = make([]protoimpl.MessageInfo, 69) +var file_org_signal_chat_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_org_signal_chat_account_proto_msgTypes = make([]protoimpl.MessageInfo, 80) var file_org_signal_chat_account_proto_goTypes = []any{ - (*GetAccountIdentityRequest)(nil), // 0: org.signal.chat.account.GetAccountIdentityRequest - (*GetAccountIdentityResponse)(nil), // 1: org.signal.chat.account.GetAccountIdentityResponse - (*GetEntitlementsRequest)(nil), // 2: org.signal.chat.account.GetEntitlementsRequest - (*GetEntitlementsResponse)(nil), // 3: org.signal.chat.account.GetEntitlementsResponse - (*DeleteAccountRequest)(nil), // 4: org.signal.chat.account.DeleteAccountRequest - (*DeleteAccountResponse)(nil), // 5: org.signal.chat.account.DeleteAccountResponse - (*SetRegistrationLockRequest)(nil), // 6: org.signal.chat.account.SetRegistrationLockRequest - (*SetRegistrationLockResponse)(nil), // 7: org.signal.chat.account.SetRegistrationLockResponse - (*ClearRegistrationLockRequest)(nil), // 8: org.signal.chat.account.ClearRegistrationLockRequest - (*ClearRegistrationLockResponse)(nil), // 9: org.signal.chat.account.ClearRegistrationLockResponse - (*ReserveUsernameHashRequest)(nil), // 10: org.signal.chat.account.ReserveUsernameHashRequest - (*UsernameNotAvailable)(nil), // 11: org.signal.chat.account.UsernameNotAvailable - (*ReserveUsernameHashResponse)(nil), // 12: org.signal.chat.account.ReserveUsernameHashResponse - (*ConfirmUsernameHashRequest)(nil), // 13: org.signal.chat.account.ConfirmUsernameHashRequest - (*ConfirmUsernameHashResponse)(nil), // 14: org.signal.chat.account.ConfirmUsernameHashResponse - (*DeleteUsernameHashRequest)(nil), // 15: org.signal.chat.account.DeleteUsernameHashRequest - (*DeleteUsernameHashResponse)(nil), // 16: org.signal.chat.account.DeleteUsernameHashResponse - (*SetUsernameLinkRequest)(nil), // 17: org.signal.chat.account.SetUsernameLinkRequest - (*SetUsernameLinkResponse)(nil), // 18: org.signal.chat.account.SetUsernameLinkResponse - (*DeleteUsernameLinkRequest)(nil), // 19: org.signal.chat.account.DeleteUsernameLinkRequest - (*DeleteUsernameLinkResponse)(nil), // 20: org.signal.chat.account.DeleteUsernameLinkResponse - (*ConfigureUnidentifiedAccessRequest)(nil), // 21: org.signal.chat.account.ConfigureUnidentifiedAccessRequest - (*ConfigureUnidentifiedAccessResponse)(nil), // 22: org.signal.chat.account.ConfigureUnidentifiedAccessResponse - (*SetDiscoverableByPhoneNumberRequest)(nil), // 23: org.signal.chat.account.SetDiscoverableByPhoneNumberRequest - (*SetDiscoverableByPhoneNumberResponse)(nil), // 24: org.signal.chat.account.SetDiscoverableByPhoneNumberResponse - (*SetRegistrationRecoveryPasswordRequest)(nil), // 25: org.signal.chat.account.SetRegistrationRecoveryPasswordRequest - (*SetRegistrationRecoveryPasswordResponse)(nil), // 26: org.signal.chat.account.SetRegistrationRecoveryPasswordResponse - (*CheckAccountExistenceRequest)(nil), // 27: org.signal.chat.account.CheckAccountExistenceRequest - (*CheckAccountExistenceResponse)(nil), // 28: org.signal.chat.account.CheckAccountExistenceResponse - (*LookupUsernameHashRequest)(nil), // 29: org.signal.chat.account.LookupUsernameHashRequest - (*LookupUsernameHashResponse)(nil), // 30: org.signal.chat.account.LookupUsernameHashResponse - (*LookupUsernameLinkRequest)(nil), // 31: org.signal.chat.account.LookupUsernameLinkRequest - (*LookupUsernameLinkResponse)(nil), // 32: org.signal.chat.account.LookupUsernameLinkResponse - (*SetZkCredentialKeyRequest)(nil), // 33: org.signal.chat.account.SetZkCredentialKeyRequest - (*SetZkCredentialKeyResponse)(nil), // 34: org.signal.chat.account.SetZkCredentialKeyResponse - (*ChangeNumberRequest)(nil), // 35: org.signal.chat.account.ChangeNumberRequest - (*ChangeNumberResponse)(nil), // 36: org.signal.chat.account.ChangeNumberResponse - (*RegistrationLockFailure)(nil), // 37: org.signal.chat.account.RegistrationLockFailure - (*ExternalServiceCredentials)(nil), // 38: org.signal.chat.account.ExternalServiceCredentials - (*StaleDevices)(nil), // 39: org.signal.chat.account.StaleDevices - (*GetAccountDataReportRequest)(nil), // 40: org.signal.chat.account.GetAccountDataReportRequest - (*GetAccountDataReportResponse)(nil), // 41: org.signal.chat.account.GetAccountDataReportResponse - (*GetCapabilitiesRequest)(nil), // 42: org.signal.chat.account.GetCapabilitiesRequest - (*Capabilities)(nil), // 43: org.signal.chat.account.Capabilities - (*GetCapabilitiesResponse)(nil), // 44: org.signal.chat.account.GetCapabilitiesResponse - (*GetCapabilitiesAnonymousRequest)(nil), // 45: org.signal.chat.account.GetCapabilitiesAnonymousRequest - (*GetCapabilitiesAnonymousResponse)(nil), // 46: org.signal.chat.account.GetCapabilitiesAnonymousResponse - (*TotpParameters)(nil), // 47: org.signal.chat.account.TotpParameters - (*GenerateTotpKeyRequest)(nil), // 48: org.signal.chat.account.GenerateTotpKeyRequest - (*GenerateTotpKeyResponse)(nil), // 49: org.signal.chat.account.GenerateTotpKeyResponse - (*ConfirmTotpKeyRequest)(nil), // 50: org.signal.chat.account.ConfirmTotpKeyRequest - (*ConfirmTotpKeyResponse)(nil), // 51: org.signal.chat.account.ConfirmTotpKeyResponse - (*ListTotpKeysRequest)(nil), // 52: org.signal.chat.account.ListTotpKeysRequest - (*ListTotpKeysResponse)(nil), // 53: org.signal.chat.account.ListTotpKeysResponse - (*SetTotpKeyMetadataRequest)(nil), // 54: org.signal.chat.account.SetTotpKeyMetadataRequest - (*SetTotpKeyMetadataResponse)(nil), // 55: org.signal.chat.account.SetTotpKeyMetadataResponse - (*RemoveTotpKeyRequest)(nil), // 56: org.signal.chat.account.RemoveTotpKeyRequest - (*RemoveTotpKeyResponse)(nil), // 57: org.signal.chat.account.RemoveTotpKeyResponse - (*GetEntitlementsResponse_BadgeEntitlement)(nil), // 58: org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement - (*GetEntitlementsResponse_BackupEntitlement)(nil), // 59: org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement - (*ConfirmUsernameHashResponse_ConfirmedUsernameHash)(nil), // 60: org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash - nil, // 61: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry - nil, // 62: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry - nil, // 63: org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry - (*GenerateTotpKeyResponse_KeyGenerated)(nil), // 64: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated - (*ConfirmTotpKeyResponse_KeyConfirmed)(nil), // 65: org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed - (*ListTotpKeysResponse_TotpKeyMetadata)(nil), // 66: org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata - nil, // 67: org.signal.chat.account.ListTotpKeysResponse.KeysEntry - (*SetTotpKeyMetadataResponse_MetadataUpdated)(nil), // 68: org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdated - (*common.AccountIdentifiers)(nil), // 69: org.signal.chat.common.AccountIdentifiers - (*errors.FailedPrecondition)(nil), // 70: org.signal.chat.errors.FailedPrecondition - (*emptypb.Empty)(nil), // 71: google.protobuf.Empty - (*common.ServiceIdentifier)(nil), // 72: org.signal.chat.common.ServiceIdentifier - (*errors.NotFound)(nil), // 73: org.signal.chat.errors.NotFound - (*messages.IndividualRecipientMessageBundle)(nil), // 74: org.signal.chat.messages.IndividualRecipientMessageBundle - (*messages.MismatchedDevices)(nil), // 75: org.signal.chat.messages.MismatchedDevices - (common.DeviceCapability)(0), // 76: org.signal.chat.common.DeviceCapability - (*errors.FailedUnidentifiedAuthorization)(nil), // 77: org.signal.chat.errors.FailedUnidentifiedAuthorization - (*common.EcSignedPreKey)(nil), // 78: org.signal.chat.common.EcSignedPreKey - (*common.KemSignedPreKey)(nil), // 79: org.signal.chat.common.KemSignedPreKey + (ListMfaKeysResponse_MfaKeyMetadata_MfaKeyType)(0), // 0: org.signal.chat.account.ListMfaKeysResponse.MfaKeyMetadata.MfaKeyType + (*GetAccountIdentityRequest)(nil), // 1: org.signal.chat.account.GetAccountIdentityRequest + (*GetAccountIdentityResponse)(nil), // 2: org.signal.chat.account.GetAccountIdentityResponse + (*GetEntitlementsRequest)(nil), // 3: org.signal.chat.account.GetEntitlementsRequest + (*GetEntitlementsResponse)(nil), // 4: org.signal.chat.account.GetEntitlementsResponse + (*DeleteAccountRequest)(nil), // 5: org.signal.chat.account.DeleteAccountRequest + (*DeleteAccountResponse)(nil), // 6: org.signal.chat.account.DeleteAccountResponse + (*SetRegistrationLockRequest)(nil), // 7: org.signal.chat.account.SetRegistrationLockRequest + (*SetRegistrationLockResponse)(nil), // 8: org.signal.chat.account.SetRegistrationLockResponse + (*ClearRegistrationLockRequest)(nil), // 9: org.signal.chat.account.ClearRegistrationLockRequest + (*ClearRegistrationLockResponse)(nil), // 10: org.signal.chat.account.ClearRegistrationLockResponse + (*ReserveUsernameHashRequest)(nil), // 11: org.signal.chat.account.ReserveUsernameHashRequest + (*UsernameNotAvailable)(nil), // 12: org.signal.chat.account.UsernameNotAvailable + (*ReserveUsernameHashResponse)(nil), // 13: org.signal.chat.account.ReserveUsernameHashResponse + (*ConfirmUsernameHashRequest)(nil), // 14: org.signal.chat.account.ConfirmUsernameHashRequest + (*ConfirmUsernameHashResponse)(nil), // 15: org.signal.chat.account.ConfirmUsernameHashResponse + (*DeleteUsernameHashRequest)(nil), // 16: org.signal.chat.account.DeleteUsernameHashRequest + (*DeleteUsernameHashResponse)(nil), // 17: org.signal.chat.account.DeleteUsernameHashResponse + (*SetUsernameLinkRequest)(nil), // 18: org.signal.chat.account.SetUsernameLinkRequest + (*SetUsernameLinkResponse)(nil), // 19: org.signal.chat.account.SetUsernameLinkResponse + (*DeleteUsernameLinkRequest)(nil), // 20: org.signal.chat.account.DeleteUsernameLinkRequest + (*DeleteUsernameLinkResponse)(nil), // 21: org.signal.chat.account.DeleteUsernameLinkResponse + (*ConfigureUnidentifiedAccessRequest)(nil), // 22: org.signal.chat.account.ConfigureUnidentifiedAccessRequest + (*ConfigureUnidentifiedAccessResponse)(nil), // 23: org.signal.chat.account.ConfigureUnidentifiedAccessResponse + (*SetDiscoverableByPhoneNumberRequest)(nil), // 24: org.signal.chat.account.SetDiscoverableByPhoneNumberRequest + (*SetDiscoverableByPhoneNumberResponse)(nil), // 25: org.signal.chat.account.SetDiscoverableByPhoneNumberResponse + (*SetRegistrationRecoveryPasswordRequest)(nil), // 26: org.signal.chat.account.SetRegistrationRecoveryPasswordRequest + (*SetRegistrationRecoveryPasswordResponse)(nil), // 27: org.signal.chat.account.SetRegistrationRecoveryPasswordResponse + (*CheckAccountExistenceRequest)(nil), // 28: org.signal.chat.account.CheckAccountExistenceRequest + (*CheckAccountExistenceResponse)(nil), // 29: org.signal.chat.account.CheckAccountExistenceResponse + (*LookupUsernameHashRequest)(nil), // 30: org.signal.chat.account.LookupUsernameHashRequest + (*LookupUsernameHashResponse)(nil), // 31: org.signal.chat.account.LookupUsernameHashResponse + (*LookupUsernameLinkRequest)(nil), // 32: org.signal.chat.account.LookupUsernameLinkRequest + (*LookupUsernameLinkResponse)(nil), // 33: org.signal.chat.account.LookupUsernameLinkResponse + (*SetZkCredentialKeyRequest)(nil), // 34: org.signal.chat.account.SetZkCredentialKeyRequest + (*SetZkCredentialKeyResponse)(nil), // 35: org.signal.chat.account.SetZkCredentialKeyResponse + (*ChangeNumberRequest)(nil), // 36: org.signal.chat.account.ChangeNumberRequest + (*ChangeNumberResponse)(nil), // 37: org.signal.chat.account.ChangeNumberResponse + (*RegistrationLockFailure)(nil), // 38: org.signal.chat.account.RegistrationLockFailure + (*ExternalServiceCredentials)(nil), // 39: org.signal.chat.account.ExternalServiceCredentials + (*StaleDevices)(nil), // 40: org.signal.chat.account.StaleDevices + (*GetAccountDataReportRequest)(nil), // 41: org.signal.chat.account.GetAccountDataReportRequest + (*GetAccountDataReportResponse)(nil), // 42: org.signal.chat.account.GetAccountDataReportResponse + (*GetCapabilitiesRequest)(nil), // 43: org.signal.chat.account.GetCapabilitiesRequest + (*Capabilities)(nil), // 44: org.signal.chat.account.Capabilities + (*GetCapabilitiesResponse)(nil), // 45: org.signal.chat.account.GetCapabilitiesResponse + (*GetCapabilitiesAnonymousRequest)(nil), // 46: org.signal.chat.account.GetCapabilitiesAnonymousRequest + (*GetCapabilitiesAnonymousResponse)(nil), // 47: org.signal.chat.account.GetCapabilitiesAnonymousResponse + (*TotpParameters)(nil), // 48: org.signal.chat.account.TotpParameters + (*GenerateTotpKeyRequest)(nil), // 49: org.signal.chat.account.GenerateTotpKeyRequest + (*GenerateTotpKeyResponse)(nil), // 50: org.signal.chat.account.GenerateTotpKeyResponse + (*ConfirmTotpKeyRequest)(nil), // 51: org.signal.chat.account.ConfirmTotpKeyRequest + (*ConfirmTotpKeyResponse)(nil), // 52: org.signal.chat.account.ConfirmTotpKeyResponse + (*StartWebAuthnRegistrationRequest)(nil), // 53: org.signal.chat.account.StartWebAuthnRegistrationRequest + (*StartWebAuthnRegistrationResponse)(nil), // 54: org.signal.chat.account.StartWebAuthnRegistrationResponse + (*FinishWebAuthnRegistrationRequest)(nil), // 55: org.signal.chat.account.FinishWebAuthnRegistrationRequest + (*FinishWebAuthnRegistrationResponse)(nil), // 56: org.signal.chat.account.FinishWebAuthnRegistrationResponse + (*ListMfaKeysRequest)(nil), // 57: org.signal.chat.account.ListMfaKeysRequest + (*ListMfaKeysResponse)(nil), // 58: org.signal.chat.account.ListMfaKeysResponse + (*SetMfaKeyMetadataRequest)(nil), // 59: org.signal.chat.account.SetMfaKeyMetadataRequest + (*SetMfaKeyMetadataResponse)(nil), // 60: org.signal.chat.account.SetMfaKeyMetadataResponse + (*RemoveMfaKeyRequest)(nil), // 61: org.signal.chat.account.RemoveMfaKeyRequest + (*RemoveMfaKeyResponse)(nil), // 62: org.signal.chat.account.RemoveMfaKeyResponse + (*StartMfaVerificationRequest)(nil), // 63: org.signal.chat.account.StartMfaVerificationRequest + (*StartMfaVerificationResponse)(nil), // 64: org.signal.chat.account.StartMfaVerificationResponse + (*FinishMfaVerificationRequest)(nil), // 65: org.signal.chat.account.FinishMfaVerificationRequest + (*FinishMfaVerificationResponse)(nil), // 66: org.signal.chat.account.FinishMfaVerificationResponse + (*GetEntitlementsResponse_BadgeEntitlement)(nil), // 67: org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement + (*GetEntitlementsResponse_BackupEntitlement)(nil), // 68: org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement + (*ConfirmUsernameHashResponse_ConfirmedUsernameHash)(nil), // 69: org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash + nil, // 70: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry + nil, // 71: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry + nil, // 72: org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry + (*GenerateTotpKeyResponse_KeyGenerated)(nil), // 73: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated + (*ConfirmTotpKeyResponse_KeyConfirmed)(nil), // 74: org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed + (*StartWebAuthnRegistrationResponse_WebAuthnCreateParameters)(nil), // 75: org.signal.chat.account.StartWebAuthnRegistrationResponse.WebAuthnCreateParameters + (*FinishWebAuthnRegistrationResponse_KeyConfirmed)(nil), // 76: org.signal.chat.account.FinishWebAuthnRegistrationResponse.KeyConfirmed + (*ListMfaKeysResponse_MfaKeyMetadata)(nil), // 77: org.signal.chat.account.ListMfaKeysResponse.MfaKeyMetadata + nil, // 78: org.signal.chat.account.ListMfaKeysResponse.KeysEntry + (*SetMfaKeyMetadataResponse_MetadataUpdated)(nil), // 79: org.signal.chat.account.SetMfaKeyMetadataResponse.MetadataUpdated + (*StartMfaVerificationResponse_WebAuthnAuthenticationParameters)(nil), // 80: org.signal.chat.account.StartMfaVerificationResponse.WebAuthnAuthenticationParameters + (*common.AccountIdentifiers)(nil), // 81: org.signal.chat.common.AccountIdentifiers + (*errors.FailedPrecondition)(nil), // 82: org.signal.chat.errors.FailedPrecondition + (*emptypb.Empty)(nil), // 83: google.protobuf.Empty + (*common.ServiceIdentifier)(nil), // 84: org.signal.chat.common.ServiceIdentifier + (*errors.NotFound)(nil), // 85: org.signal.chat.errors.NotFound + (*messages.IndividualRecipientMessageBundle)(nil), // 86: org.signal.chat.messages.IndividualRecipientMessageBundle + (*messages.MismatchedDevices)(nil), // 87: org.signal.chat.messages.MismatchedDevices + (common.DeviceCapability)(0), // 88: org.signal.chat.common.DeviceCapability + (*errors.FailedUnidentifiedAuthorization)(nil), // 89: org.signal.chat.errors.FailedUnidentifiedAuthorization + (*common.EcSignedPreKey)(nil), // 90: org.signal.chat.common.EcSignedPreKey + (*common.KemSignedPreKey)(nil), // 91: org.signal.chat.common.KemSignedPreKey } var file_org_signal_chat_account_proto_depIdxs = []int32{ - 69, // 0: org.signal.chat.account.GetAccountIdentityResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers - 58, // 1: org.signal.chat.account.GetEntitlementsResponse.badges:type_name -> org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement - 59, // 2: org.signal.chat.account.GetEntitlementsResponse.backup:type_name -> org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement - 11, // 3: org.signal.chat.account.ReserveUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable - 60, // 4: org.signal.chat.account.ConfirmUsernameHashResponse.confirmed_username_hash:type_name -> org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash - 70, // 5: org.signal.chat.account.ConfirmUsernameHashResponse.reservation_not_found:type_name -> org.signal.chat.errors.FailedPrecondition - 11, // 6: org.signal.chat.account.ConfirmUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable - 70, // 7: org.signal.chat.account.SetUsernameLinkResponse.no_username_set:type_name -> org.signal.chat.errors.FailedPrecondition - 71, // 8: org.signal.chat.account.ConfigureUnidentifiedAccessRequest.allow_unrestricted_unidentified_access:type_name -> google.protobuf.Empty - 72, // 9: org.signal.chat.account.CheckAccountExistenceRequest.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 72, // 10: org.signal.chat.account.LookupUsernameHashResponse.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 73, // 11: org.signal.chat.account.LookupUsernameHashResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 73, // 12: org.signal.chat.account.LookupUsernameLinkResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 74, // 13: org.signal.chat.account.ChangeNumberRequest.device_messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 61, // 14: org.signal.chat.account.ChangeNumberRequest.device_pni_signed_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry - 62, // 15: org.signal.chat.account.ChangeNumberRequest.device_pni_pq_last_resort_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry - 63, // 16: org.signal.chat.account.ChangeNumberRequest.pni_registration_ids:type_name -> org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry - 69, // 17: org.signal.chat.account.ChangeNumberResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers - 75, // 18: org.signal.chat.account.ChangeNumberResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices - 37, // 19: org.signal.chat.account.ChangeNumberResponse.registration_lock_failure:type_name -> org.signal.chat.account.RegistrationLockFailure - 39, // 20: org.signal.chat.account.ChangeNumberResponse.stale_devices:type_name -> org.signal.chat.account.StaleDevices - 70, // 21: org.signal.chat.account.ChangeNumberResponse.message_too_large:type_name -> org.signal.chat.errors.FailedPrecondition - 70, // 22: org.signal.chat.account.ChangeNumberResponse.unverified_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition - 70, // 23: org.signal.chat.account.ChangeNumberResponse.invalid_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition - 70, // 24: org.signal.chat.account.ChangeNumberResponse.recovery_password_verification_failed:type_name -> org.signal.chat.errors.FailedPrecondition - 38, // 25: org.signal.chat.account.RegistrationLockFailure.svr2_credentials:type_name -> org.signal.chat.account.ExternalServiceCredentials - 76, // 26: org.signal.chat.account.Capabilities.capabilities:type_name -> org.signal.chat.common.DeviceCapability - 43, // 27: org.signal.chat.account.GetCapabilitiesResponse.capabilities:type_name -> org.signal.chat.account.Capabilities - 72, // 28: org.signal.chat.account.GetCapabilitiesAnonymousRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 43, // 29: org.signal.chat.account.GetCapabilitiesAnonymousResponse.capabilities:type_name -> org.signal.chat.account.Capabilities - 73, // 30: org.signal.chat.account.GetCapabilitiesAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 77, // 31: org.signal.chat.account.GetCapabilitiesAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 64, // 32: org.signal.chat.account.GenerateTotpKeyResponse.key_generated:type_name -> org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated - 70, // 33: org.signal.chat.account.GenerateTotpKeyResponse.too_many_totp_keys:type_name -> org.signal.chat.errors.FailedPrecondition - 65, // 34: org.signal.chat.account.ConfirmTotpKeyResponse.key_confirmed:type_name -> org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed - 70, // 35: org.signal.chat.account.ConfirmTotpKeyResponse.one_time_password_not_verified:type_name -> org.signal.chat.errors.FailedPrecondition - 67, // 36: org.signal.chat.account.ListTotpKeysResponse.keys:type_name -> org.signal.chat.account.ListTotpKeysResponse.KeysEntry - 68, // 37: org.signal.chat.account.SetTotpKeyMetadataResponse.metadata_updated:type_name -> org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdated - 73, // 38: org.signal.chat.account.SetTotpKeyMetadataResponse.key_not_found:type_name -> org.signal.chat.errors.NotFound - 78, // 39: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry.value:type_name -> org.signal.chat.common.EcSignedPreKey - 79, // 40: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry.value:type_name -> org.signal.chat.common.KemSignedPreKey - 47, // 41: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated.totp_parameters:type_name -> org.signal.chat.account.TotpParameters - 47, // 42: org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata.totp_parameters:type_name -> org.signal.chat.account.TotpParameters - 66, // 43: org.signal.chat.account.ListTotpKeysResponse.KeysEntry.value:type_name -> org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata - 0, // 44: org.signal.chat.account.Accounts.GetAccountIdentity:input_type -> org.signal.chat.account.GetAccountIdentityRequest - 2, // 45: org.signal.chat.account.Accounts.GetEntitlements:input_type -> org.signal.chat.account.GetEntitlementsRequest - 4, // 46: org.signal.chat.account.Accounts.DeleteAccount:input_type -> org.signal.chat.account.DeleteAccountRequest - 6, // 47: org.signal.chat.account.Accounts.SetRegistrationLock:input_type -> org.signal.chat.account.SetRegistrationLockRequest - 8, // 48: org.signal.chat.account.Accounts.ClearRegistrationLock:input_type -> org.signal.chat.account.ClearRegistrationLockRequest - 10, // 49: org.signal.chat.account.Accounts.ReserveUsernameHash:input_type -> org.signal.chat.account.ReserveUsernameHashRequest - 13, // 50: org.signal.chat.account.Accounts.ConfirmUsernameHash:input_type -> org.signal.chat.account.ConfirmUsernameHashRequest - 15, // 51: org.signal.chat.account.Accounts.DeleteUsernameHash:input_type -> org.signal.chat.account.DeleteUsernameHashRequest - 17, // 52: org.signal.chat.account.Accounts.SetUsernameLink:input_type -> org.signal.chat.account.SetUsernameLinkRequest - 19, // 53: org.signal.chat.account.Accounts.DeleteUsernameLink:input_type -> org.signal.chat.account.DeleteUsernameLinkRequest - 21, // 54: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:input_type -> org.signal.chat.account.ConfigureUnidentifiedAccessRequest - 23, // 55: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:input_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberRequest - 25, // 56: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:input_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordRequest - 33, // 57: org.signal.chat.account.Accounts.SetZkCredentialKey:input_type -> org.signal.chat.account.SetZkCredentialKeyRequest - 35, // 58: org.signal.chat.account.Accounts.ChangeNumber:input_type -> org.signal.chat.account.ChangeNumberRequest - 40, // 59: org.signal.chat.account.Accounts.GetAccountDataReport:input_type -> org.signal.chat.account.GetAccountDataReportRequest - 42, // 60: org.signal.chat.account.Accounts.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesRequest - 48, // 61: org.signal.chat.account.Accounts.GenerateTotpKey:input_type -> org.signal.chat.account.GenerateTotpKeyRequest - 50, // 62: org.signal.chat.account.Accounts.ConfirmTotpKey:input_type -> org.signal.chat.account.ConfirmTotpKeyRequest - 52, // 63: org.signal.chat.account.Accounts.ListTotpKeys:input_type -> org.signal.chat.account.ListTotpKeysRequest - 54, // 64: org.signal.chat.account.Accounts.SetTotpKeyMetadata:input_type -> org.signal.chat.account.SetTotpKeyMetadataRequest - 56, // 65: org.signal.chat.account.Accounts.RemoveTotpKey:input_type -> org.signal.chat.account.RemoveTotpKeyRequest - 27, // 66: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:input_type -> org.signal.chat.account.CheckAccountExistenceRequest - 29, // 67: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:input_type -> org.signal.chat.account.LookupUsernameHashRequest - 31, // 68: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:input_type -> org.signal.chat.account.LookupUsernameLinkRequest - 45, // 69: org.signal.chat.account.AccountsAnonymous.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesAnonymousRequest - 1, // 70: org.signal.chat.account.Accounts.GetAccountIdentity:output_type -> org.signal.chat.account.GetAccountIdentityResponse - 3, // 71: org.signal.chat.account.Accounts.GetEntitlements:output_type -> org.signal.chat.account.GetEntitlementsResponse - 5, // 72: org.signal.chat.account.Accounts.DeleteAccount:output_type -> org.signal.chat.account.DeleteAccountResponse - 7, // 73: org.signal.chat.account.Accounts.SetRegistrationLock:output_type -> org.signal.chat.account.SetRegistrationLockResponse - 9, // 74: org.signal.chat.account.Accounts.ClearRegistrationLock:output_type -> org.signal.chat.account.ClearRegistrationLockResponse - 12, // 75: org.signal.chat.account.Accounts.ReserveUsernameHash:output_type -> org.signal.chat.account.ReserveUsernameHashResponse - 14, // 76: org.signal.chat.account.Accounts.ConfirmUsernameHash:output_type -> org.signal.chat.account.ConfirmUsernameHashResponse - 16, // 77: org.signal.chat.account.Accounts.DeleteUsernameHash:output_type -> org.signal.chat.account.DeleteUsernameHashResponse - 18, // 78: org.signal.chat.account.Accounts.SetUsernameLink:output_type -> org.signal.chat.account.SetUsernameLinkResponse - 20, // 79: org.signal.chat.account.Accounts.DeleteUsernameLink:output_type -> org.signal.chat.account.DeleteUsernameLinkResponse - 22, // 80: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:output_type -> org.signal.chat.account.ConfigureUnidentifiedAccessResponse - 24, // 81: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:output_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberResponse - 26, // 82: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:output_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordResponse - 34, // 83: org.signal.chat.account.Accounts.SetZkCredentialKey:output_type -> org.signal.chat.account.SetZkCredentialKeyResponse - 36, // 84: org.signal.chat.account.Accounts.ChangeNumber:output_type -> org.signal.chat.account.ChangeNumberResponse - 41, // 85: org.signal.chat.account.Accounts.GetAccountDataReport:output_type -> org.signal.chat.account.GetAccountDataReportResponse - 44, // 86: org.signal.chat.account.Accounts.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesResponse - 49, // 87: org.signal.chat.account.Accounts.GenerateTotpKey:output_type -> org.signal.chat.account.GenerateTotpKeyResponse - 51, // 88: org.signal.chat.account.Accounts.ConfirmTotpKey:output_type -> org.signal.chat.account.ConfirmTotpKeyResponse - 53, // 89: org.signal.chat.account.Accounts.ListTotpKeys:output_type -> org.signal.chat.account.ListTotpKeysResponse - 55, // 90: org.signal.chat.account.Accounts.SetTotpKeyMetadata:output_type -> org.signal.chat.account.SetTotpKeyMetadataResponse - 57, // 91: org.signal.chat.account.Accounts.RemoveTotpKey:output_type -> org.signal.chat.account.RemoveTotpKeyResponse - 28, // 92: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:output_type -> org.signal.chat.account.CheckAccountExistenceResponse - 30, // 93: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:output_type -> org.signal.chat.account.LookupUsernameHashResponse - 32, // 94: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:output_type -> org.signal.chat.account.LookupUsernameLinkResponse - 46, // 95: org.signal.chat.account.AccountsAnonymous.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesAnonymousResponse - 70, // [70:96] is the sub-list for method output_type - 44, // [44:70] is the sub-list for method input_type - 44, // [44:44] is the sub-list for extension type_name - 44, // [44:44] is the sub-list for extension extendee - 0, // [0:44] is the sub-list for field type_name + 81, // 0: org.signal.chat.account.GetAccountIdentityResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers + 67, // 1: org.signal.chat.account.GetEntitlementsResponse.badges:type_name -> org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement + 68, // 2: org.signal.chat.account.GetEntitlementsResponse.backup:type_name -> org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement + 12, // 3: org.signal.chat.account.ReserveUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable + 69, // 4: org.signal.chat.account.ConfirmUsernameHashResponse.confirmed_username_hash:type_name -> org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash + 82, // 5: org.signal.chat.account.ConfirmUsernameHashResponse.reservation_not_found:type_name -> org.signal.chat.errors.FailedPrecondition + 12, // 6: org.signal.chat.account.ConfirmUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable + 82, // 7: org.signal.chat.account.SetUsernameLinkResponse.no_username_set:type_name -> org.signal.chat.errors.FailedPrecondition + 83, // 8: org.signal.chat.account.ConfigureUnidentifiedAccessRequest.allow_unrestricted_unidentified_access:type_name -> google.protobuf.Empty + 84, // 9: org.signal.chat.account.CheckAccountExistenceRequest.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 84, // 10: org.signal.chat.account.LookupUsernameHashResponse.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 85, // 11: org.signal.chat.account.LookupUsernameHashResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 85, // 12: org.signal.chat.account.LookupUsernameLinkResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 86, // 13: org.signal.chat.account.ChangeNumberRequest.device_messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle + 70, // 14: org.signal.chat.account.ChangeNumberRequest.device_pni_signed_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry + 71, // 15: org.signal.chat.account.ChangeNumberRequest.device_pni_pq_last_resort_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry + 72, // 16: org.signal.chat.account.ChangeNumberRequest.pni_registration_ids:type_name -> org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry + 81, // 17: org.signal.chat.account.ChangeNumberResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers + 87, // 18: org.signal.chat.account.ChangeNumberResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices + 38, // 19: org.signal.chat.account.ChangeNumberResponse.registration_lock_failure:type_name -> org.signal.chat.account.RegistrationLockFailure + 40, // 20: org.signal.chat.account.ChangeNumberResponse.stale_devices:type_name -> org.signal.chat.account.StaleDevices + 82, // 21: org.signal.chat.account.ChangeNumberResponse.message_too_large:type_name -> org.signal.chat.errors.FailedPrecondition + 82, // 22: org.signal.chat.account.ChangeNumberResponse.unverified_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition + 82, // 23: org.signal.chat.account.ChangeNumberResponse.invalid_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition + 82, // 24: org.signal.chat.account.ChangeNumberResponse.recovery_password_verification_failed:type_name -> org.signal.chat.errors.FailedPrecondition + 39, // 25: org.signal.chat.account.RegistrationLockFailure.svr2_credentials:type_name -> org.signal.chat.account.ExternalServiceCredentials + 88, // 26: org.signal.chat.account.Capabilities.capabilities:type_name -> org.signal.chat.common.DeviceCapability + 44, // 27: org.signal.chat.account.GetCapabilitiesResponse.capabilities:type_name -> org.signal.chat.account.Capabilities + 84, // 28: org.signal.chat.account.GetCapabilitiesAnonymousRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 44, // 29: org.signal.chat.account.GetCapabilitiesAnonymousResponse.capabilities:type_name -> org.signal.chat.account.Capabilities + 85, // 30: org.signal.chat.account.GetCapabilitiesAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 89, // 31: org.signal.chat.account.GetCapabilitiesAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 73, // 32: org.signal.chat.account.GenerateTotpKeyResponse.key_generated:type_name -> org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated + 82, // 33: org.signal.chat.account.GenerateTotpKeyResponse.too_many_totp_keys:type_name -> org.signal.chat.errors.FailedPrecondition + 82, // 34: org.signal.chat.account.GenerateTotpKeyResponse.too_many_mfa_keys:type_name -> org.signal.chat.errors.FailedPrecondition + 74, // 35: org.signal.chat.account.ConfirmTotpKeyResponse.key_confirmed:type_name -> org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed + 82, // 36: org.signal.chat.account.ConfirmTotpKeyResponse.one_time_password_not_verified:type_name -> org.signal.chat.errors.FailedPrecondition + 82, // 37: org.signal.chat.account.ConfirmTotpKeyResponse.too_many_mfa_keys:type_name -> org.signal.chat.errors.FailedPrecondition + 75, // 38: org.signal.chat.account.StartWebAuthnRegistrationResponse.params:type_name -> org.signal.chat.account.StartWebAuthnRegistrationResponse.WebAuthnCreateParameters + 82, // 39: org.signal.chat.account.StartWebAuthnRegistrationResponse.too_many_mfa_keys:type_name -> org.signal.chat.errors.FailedPrecondition + 76, // 40: org.signal.chat.account.FinishWebAuthnRegistrationResponse.key_confirmed:type_name -> org.signal.chat.account.FinishWebAuthnRegistrationResponse.KeyConfirmed + 82, // 41: org.signal.chat.account.FinishWebAuthnRegistrationResponse.key_not_confirmed:type_name -> org.signal.chat.errors.FailedPrecondition + 82, // 42: org.signal.chat.account.FinishWebAuthnRegistrationResponse.too_many_mfa_keys:type_name -> org.signal.chat.errors.FailedPrecondition + 78, // 43: org.signal.chat.account.ListMfaKeysResponse.keys:type_name -> org.signal.chat.account.ListMfaKeysResponse.KeysEntry + 79, // 44: org.signal.chat.account.SetMfaKeyMetadataResponse.success:type_name -> org.signal.chat.account.SetMfaKeyMetadataResponse.MetadataUpdated + 85, // 45: org.signal.chat.account.SetMfaKeyMetadataResponse.key_not_found:type_name -> org.signal.chat.errors.NotFound + 80, // 46: org.signal.chat.account.StartMfaVerificationResponse.webauthn_authentication_parameters:type_name -> org.signal.chat.account.StartMfaVerificationResponse.WebAuthnAuthenticationParameters + 90, // 47: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry.value:type_name -> org.signal.chat.common.EcSignedPreKey + 91, // 48: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry.value:type_name -> org.signal.chat.common.KemSignedPreKey + 48, // 49: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated.totp_parameters:type_name -> org.signal.chat.account.TotpParameters + 0, // 50: org.signal.chat.account.ListMfaKeysResponse.MfaKeyMetadata.type:type_name -> org.signal.chat.account.ListMfaKeysResponse.MfaKeyMetadata.MfaKeyType + 77, // 51: org.signal.chat.account.ListMfaKeysResponse.KeysEntry.value:type_name -> org.signal.chat.account.ListMfaKeysResponse.MfaKeyMetadata + 1, // 52: org.signal.chat.account.Accounts.GetAccountIdentity:input_type -> org.signal.chat.account.GetAccountIdentityRequest + 3, // 53: org.signal.chat.account.Accounts.GetEntitlements:input_type -> org.signal.chat.account.GetEntitlementsRequest + 5, // 54: org.signal.chat.account.Accounts.DeleteAccount:input_type -> org.signal.chat.account.DeleteAccountRequest + 7, // 55: org.signal.chat.account.Accounts.SetRegistrationLock:input_type -> org.signal.chat.account.SetRegistrationLockRequest + 9, // 56: org.signal.chat.account.Accounts.ClearRegistrationLock:input_type -> org.signal.chat.account.ClearRegistrationLockRequest + 11, // 57: org.signal.chat.account.Accounts.ReserveUsernameHash:input_type -> org.signal.chat.account.ReserveUsernameHashRequest + 14, // 58: org.signal.chat.account.Accounts.ConfirmUsernameHash:input_type -> org.signal.chat.account.ConfirmUsernameHashRequest + 16, // 59: org.signal.chat.account.Accounts.DeleteUsernameHash:input_type -> org.signal.chat.account.DeleteUsernameHashRequest + 18, // 60: org.signal.chat.account.Accounts.SetUsernameLink:input_type -> org.signal.chat.account.SetUsernameLinkRequest + 20, // 61: org.signal.chat.account.Accounts.DeleteUsernameLink:input_type -> org.signal.chat.account.DeleteUsernameLinkRequest + 22, // 62: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:input_type -> org.signal.chat.account.ConfigureUnidentifiedAccessRequest + 24, // 63: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:input_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberRequest + 26, // 64: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:input_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordRequest + 34, // 65: org.signal.chat.account.Accounts.SetZkCredentialKey:input_type -> org.signal.chat.account.SetZkCredentialKeyRequest + 36, // 66: org.signal.chat.account.Accounts.ChangeNumber:input_type -> org.signal.chat.account.ChangeNumberRequest + 41, // 67: org.signal.chat.account.Accounts.GetAccountDataReport:input_type -> org.signal.chat.account.GetAccountDataReportRequest + 43, // 68: org.signal.chat.account.Accounts.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesRequest + 49, // 69: org.signal.chat.account.Accounts.GenerateTotpKey:input_type -> org.signal.chat.account.GenerateTotpKeyRequest + 51, // 70: org.signal.chat.account.Accounts.ConfirmTotpKey:input_type -> org.signal.chat.account.ConfirmTotpKeyRequest + 53, // 71: org.signal.chat.account.Accounts.StartWebAuthnRegistration:input_type -> org.signal.chat.account.StartWebAuthnRegistrationRequest + 55, // 72: org.signal.chat.account.Accounts.FinishWebAuthnRegistration:input_type -> org.signal.chat.account.FinishWebAuthnRegistrationRequest + 57, // 73: org.signal.chat.account.Accounts.ListMfaKeys:input_type -> org.signal.chat.account.ListMfaKeysRequest + 59, // 74: org.signal.chat.account.Accounts.SetMfaKeyMetadata:input_type -> org.signal.chat.account.SetMfaKeyMetadataRequest + 61, // 75: org.signal.chat.account.Accounts.RemoveMfaKey:input_type -> org.signal.chat.account.RemoveMfaKeyRequest + 63, // 76: org.signal.chat.account.Accounts.StartMfaVerification:input_type -> org.signal.chat.account.StartMfaVerificationRequest + 65, // 77: org.signal.chat.account.Accounts.FinishMfaVerification:input_type -> org.signal.chat.account.FinishMfaVerificationRequest + 28, // 78: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:input_type -> org.signal.chat.account.CheckAccountExistenceRequest + 30, // 79: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:input_type -> org.signal.chat.account.LookupUsernameHashRequest + 32, // 80: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:input_type -> org.signal.chat.account.LookupUsernameLinkRequest + 46, // 81: org.signal.chat.account.AccountsAnonymous.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesAnonymousRequest + 2, // 82: org.signal.chat.account.Accounts.GetAccountIdentity:output_type -> org.signal.chat.account.GetAccountIdentityResponse + 4, // 83: org.signal.chat.account.Accounts.GetEntitlements:output_type -> org.signal.chat.account.GetEntitlementsResponse + 6, // 84: org.signal.chat.account.Accounts.DeleteAccount:output_type -> org.signal.chat.account.DeleteAccountResponse + 8, // 85: org.signal.chat.account.Accounts.SetRegistrationLock:output_type -> org.signal.chat.account.SetRegistrationLockResponse + 10, // 86: org.signal.chat.account.Accounts.ClearRegistrationLock:output_type -> org.signal.chat.account.ClearRegistrationLockResponse + 13, // 87: org.signal.chat.account.Accounts.ReserveUsernameHash:output_type -> org.signal.chat.account.ReserveUsernameHashResponse + 15, // 88: org.signal.chat.account.Accounts.ConfirmUsernameHash:output_type -> org.signal.chat.account.ConfirmUsernameHashResponse + 17, // 89: org.signal.chat.account.Accounts.DeleteUsernameHash:output_type -> org.signal.chat.account.DeleteUsernameHashResponse + 19, // 90: org.signal.chat.account.Accounts.SetUsernameLink:output_type -> org.signal.chat.account.SetUsernameLinkResponse + 21, // 91: org.signal.chat.account.Accounts.DeleteUsernameLink:output_type -> org.signal.chat.account.DeleteUsernameLinkResponse + 23, // 92: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:output_type -> org.signal.chat.account.ConfigureUnidentifiedAccessResponse + 25, // 93: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:output_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberResponse + 27, // 94: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:output_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordResponse + 35, // 95: org.signal.chat.account.Accounts.SetZkCredentialKey:output_type -> org.signal.chat.account.SetZkCredentialKeyResponse + 37, // 96: org.signal.chat.account.Accounts.ChangeNumber:output_type -> org.signal.chat.account.ChangeNumberResponse + 42, // 97: org.signal.chat.account.Accounts.GetAccountDataReport:output_type -> org.signal.chat.account.GetAccountDataReportResponse + 45, // 98: org.signal.chat.account.Accounts.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesResponse + 50, // 99: org.signal.chat.account.Accounts.GenerateTotpKey:output_type -> org.signal.chat.account.GenerateTotpKeyResponse + 52, // 100: org.signal.chat.account.Accounts.ConfirmTotpKey:output_type -> org.signal.chat.account.ConfirmTotpKeyResponse + 54, // 101: org.signal.chat.account.Accounts.StartWebAuthnRegistration:output_type -> org.signal.chat.account.StartWebAuthnRegistrationResponse + 56, // 102: org.signal.chat.account.Accounts.FinishWebAuthnRegistration:output_type -> org.signal.chat.account.FinishWebAuthnRegistrationResponse + 58, // 103: org.signal.chat.account.Accounts.ListMfaKeys:output_type -> org.signal.chat.account.ListMfaKeysResponse + 60, // 104: org.signal.chat.account.Accounts.SetMfaKeyMetadata:output_type -> org.signal.chat.account.SetMfaKeyMetadataResponse + 62, // 105: org.signal.chat.account.Accounts.RemoveMfaKey:output_type -> org.signal.chat.account.RemoveMfaKeyResponse + 64, // 106: org.signal.chat.account.Accounts.StartMfaVerification:output_type -> org.signal.chat.account.StartMfaVerificationResponse + 66, // 107: org.signal.chat.account.Accounts.FinishMfaVerification:output_type -> org.signal.chat.account.FinishMfaVerificationResponse + 29, // 108: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:output_type -> org.signal.chat.account.CheckAccountExistenceResponse + 31, // 109: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:output_type -> org.signal.chat.account.LookupUsernameHashResponse + 33, // 110: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:output_type -> org.signal.chat.account.LookupUsernameLinkResponse + 47, // 111: org.signal.chat.account.AccountsAnonymous.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesAnonymousResponse + 82, // [82:112] is the sub-list for method output_type + 52, // [52:82] is the sub-list for method input_type + 52, // [52:52] is the sub-list for extension type_name + 52, // [52:52] is the sub-list for extension extendee + 0, // [0:52] is the sub-list for field type_name } func init() { file_org_signal_chat_account_proto_init() } @@ -4157,27 +5011,44 @@ func file_org_signal_chat_account_proto_init() { file_org_signal_chat_account_proto_msgTypes[49].OneofWrappers = []any{ (*GenerateTotpKeyResponse_KeyGenerated_)(nil), (*GenerateTotpKeyResponse_TooManyTotpKeys)(nil), + (*GenerateTotpKeyResponse_TooManyMfaKeys)(nil), } file_org_signal_chat_account_proto_msgTypes[51].OneofWrappers = []any{ (*ConfirmTotpKeyResponse_KeyConfirmed_)(nil), (*ConfirmTotpKeyResponse_OneTimePasswordNotVerified)(nil), + (*ConfirmTotpKeyResponse_TooManyMfaKeys)(nil), + } + file_org_signal_chat_account_proto_msgTypes[53].OneofWrappers = []any{ + (*StartWebAuthnRegistrationResponse_Params)(nil), + (*StartWebAuthnRegistrationResponse_TooManyMfaKeys)(nil), } file_org_signal_chat_account_proto_msgTypes[55].OneofWrappers = []any{ - (*SetTotpKeyMetadataResponse_MetadataUpdated_)(nil), - (*SetTotpKeyMetadataResponse_KeyNotFound)(nil), + (*FinishWebAuthnRegistrationResponse_KeyConfirmed_)(nil), + (*FinishWebAuthnRegistrationResponse_KeyNotConfirmed)(nil), + (*FinishWebAuthnRegistrationResponse_TooManyMfaKeys)(nil), + } + file_org_signal_chat_account_proto_msgTypes[59].OneofWrappers = []any{ + (*SetMfaKeyMetadataResponse_Success)(nil), + (*SetMfaKeyMetadataResponse_KeyNotFound)(nil), + } + file_org_signal_chat_account_proto_msgTypes[63].OneofWrappers = []any{} + file_org_signal_chat_account_proto_msgTypes[64].OneofWrappers = []any{ + (*FinishMfaVerificationRequest_TotpPassword)(nil), + (*FinishMfaVerificationRequest_WebauthnAuthenticationResponseJson)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_account_proto_rawDesc), len(file_org_signal_chat_account_proto_rawDesc)), - NumEnums: 0, - NumMessages: 69, + NumEnums: 1, + NumMessages: 80, NumExtensions: 0, NumServices: 2, }, GoTypes: file_org_signal_chat_account_proto_goTypes, DependencyIndexes: file_org_signal_chat_account_proto_depIdxs, + EnumInfos: file_org_signal_chat_account_proto_enumTypes, MessageInfos: file_org_signal_chat_account_proto_msgTypes, }.Build() File_org_signal_chat_account_proto = out.File diff --git a/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go index 609e7d6..efea2b0 100644 --- a/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go @@ -38,9 +38,13 @@ const ( Accounts_GetCapabilities_FullMethodName = "/org.signal.chat.account.Accounts/GetCapabilities" Accounts_GenerateTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/GenerateTotpKey" Accounts_ConfirmTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/ConfirmTotpKey" - Accounts_ListTotpKeys_FullMethodName = "/org.signal.chat.account.Accounts/ListTotpKeys" - Accounts_SetTotpKeyMetadata_FullMethodName = "/org.signal.chat.account.Accounts/SetTotpKeyMetadata" - Accounts_RemoveTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/RemoveTotpKey" + Accounts_StartWebAuthnRegistration_FullMethodName = "/org.signal.chat.account.Accounts/StartWebAuthnRegistration" + Accounts_FinishWebAuthnRegistration_FullMethodName = "/org.signal.chat.account.Accounts/FinishWebAuthnRegistration" + Accounts_ListMfaKeys_FullMethodName = "/org.signal.chat.account.Accounts/ListMfaKeys" + Accounts_SetMfaKeyMetadata_FullMethodName = "/org.signal.chat.account.Accounts/SetMfaKeyMetadata" + Accounts_RemoveMfaKey_FullMethodName = "/org.signal.chat.account.Accounts/RemoveMfaKey" + Accounts_StartMfaVerification_FullMethodName = "/org.signal.chat.account.Accounts/StartMfaVerification" + Accounts_FinishMfaVerification_FullMethodName = "/org.signal.chat.account.Accounts/FinishMfaVerification" ) // AccountsClient is the client API for Accounts service. @@ -96,18 +100,34 @@ type AccountsClient interface { GetCapabilities(ctx context.Context, in *GetCapabilitiesRequest, opts ...grpc.CallOption) (*GetCapabilitiesResponse, error) // Generates and stores a pending TOTP key for the authenticated account. // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. + // + // TOTP keys may only be generated for accounts without phone numbers. GenerateTotpKey(ctx context.Context, in *GenerateTotpKeyRequest, opts ...grpc.CallOption) (*GenerateTotpKeyResponse, error) // Confirms that the caller has stored and can derive one-time passwords from // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the // key for the caller's account + // + // TOTP keys may only be generated for accounts without phone numbers. ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error) - // Returns a list of confirmed TOTP keys for the authenticated account - ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) + // Returns parameters for initiating a WebAuthn registration ceremony + // + // WebAuthn credentials may only be registered for accounts without phone numbers + StartWebAuthnRegistration(ctx context.Context, in *StartWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*StartWebAuthnRegistrationResponse, error) + // Concludes a WebAuthn registration ceremony to add a passkey to the authenticated account + // + // WebAuthn credentials may only be registered for accounts without phone numbers + FinishWebAuthnRegistration(ctx context.Context, in *FinishWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*FinishWebAuthnRegistrationResponse, error) + // Returns a list of confirmed MFA keys for the authenticated account + ListMfaKeys(ctx context.Context, in *ListMfaKeysRequest, opts ...grpc.CallOption) (*ListMfaKeysResponse, error) // Updates encrypted, user-supplied metadata (e.g. a human-readable name and - // creation timestamp) for an existing, confirmed TOTP key - SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) - // Removes a TOTP from the authenticated account - RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, error) + // creation timestamp) for an existing, confirmed MFA key + SetMfaKeyMetadata(ctx context.Context, in *SetMfaKeyMetadataRequest, opts ...grpc.CallOption) (*SetMfaKeyMetadataResponse, error) + // Removes an MFA key from the authenticated account + RemoveMfaKey(ctx context.Context, in *RemoveMfaKeyRequest, opts ...grpc.CallOption) (*RemoveMfaKeyResponse, error) + // Requests the parameters needed to verify with an MFA factor associated with this account. + StartMfaVerification(ctx context.Context, in *StartMfaVerificationRequest, opts ...grpc.CallOption) (*StartMfaVerificationResponse, error) + // Attemps to verify an MFA factor associated with this account. + FinishMfaVerification(ctx context.Context, in *FinishMfaVerificationRequest, opts ...grpc.CallOption) (*FinishMfaVerificationResponse, error) } type accountsClient struct { @@ -308,30 +328,70 @@ func (c *accountsClient) ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyR return out, nil } -func (c *accountsClient) ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) { +func (c *accountsClient) StartWebAuthnRegistration(ctx context.Context, in *StartWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*StartWebAuthnRegistrationResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListTotpKeysResponse) - err := c.cc.Invoke(ctx, Accounts_ListTotpKeys_FullMethodName, in, out, cOpts...) + out := new(StartWebAuthnRegistrationResponse) + err := c.cc.Invoke(ctx, Accounts_StartWebAuthnRegistration_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *accountsClient) SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) { +func (c *accountsClient) FinishWebAuthnRegistration(ctx context.Context, in *FinishWebAuthnRegistrationRequest, opts ...grpc.CallOption) (*FinishWebAuthnRegistrationResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetTotpKeyMetadataResponse) - err := c.cc.Invoke(ctx, Accounts_SetTotpKeyMetadata_FullMethodName, in, out, cOpts...) + out := new(FinishWebAuthnRegistrationResponse) + err := c.cc.Invoke(ctx, Accounts_FinishWebAuthnRegistration_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *accountsClient) RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, error) { +func (c *accountsClient) ListMfaKeys(ctx context.Context, in *ListMfaKeysRequest, opts ...grpc.CallOption) (*ListMfaKeysResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RemoveTotpKeyResponse) - err := c.cc.Invoke(ctx, Accounts_RemoveTotpKey_FullMethodName, in, out, cOpts...) + out := new(ListMfaKeysResponse) + err := c.cc.Invoke(ctx, Accounts_ListMfaKeys_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) SetMfaKeyMetadata(ctx context.Context, in *SetMfaKeyMetadataRequest, opts ...grpc.CallOption) (*SetMfaKeyMetadataResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetMfaKeyMetadataResponse) + err := c.cc.Invoke(ctx, Accounts_SetMfaKeyMetadata_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) RemoveMfaKey(ctx context.Context, in *RemoveMfaKeyRequest, opts ...grpc.CallOption) (*RemoveMfaKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemoveMfaKeyResponse) + err := c.cc.Invoke(ctx, Accounts_RemoveMfaKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) StartMfaVerification(ctx context.Context, in *StartMfaVerificationRequest, opts ...grpc.CallOption) (*StartMfaVerificationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StartMfaVerificationResponse) + err := c.cc.Invoke(ctx, Accounts_StartMfaVerification_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) FinishMfaVerification(ctx context.Context, in *FinishMfaVerificationRequest, opts ...grpc.CallOption) (*FinishMfaVerificationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FinishMfaVerificationResponse) + err := c.cc.Invoke(ctx, Accounts_FinishMfaVerification_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -391,18 +451,34 @@ type AccountsServer interface { GetCapabilities(context.Context, *GetCapabilitiesRequest) (*GetCapabilitiesResponse, error) // Generates and stores a pending TOTP key for the authenticated account. // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. + // + // TOTP keys may only be generated for accounts without phone numbers. GenerateTotpKey(context.Context, *GenerateTotpKeyRequest) (*GenerateTotpKeyResponse, error) // Confirms that the caller has stored and can derive one-time passwords from // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the // key for the caller's account + // + // TOTP keys may only be generated for accounts without phone numbers. ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) - // Returns a list of confirmed TOTP keys for the authenticated account - ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) + // Returns parameters for initiating a WebAuthn registration ceremony + // + // WebAuthn credentials may only be registered for accounts without phone numbers + StartWebAuthnRegistration(context.Context, *StartWebAuthnRegistrationRequest) (*StartWebAuthnRegistrationResponse, error) + // Concludes a WebAuthn registration ceremony to add a passkey to the authenticated account + // + // WebAuthn credentials may only be registered for accounts without phone numbers + FinishWebAuthnRegistration(context.Context, *FinishWebAuthnRegistrationRequest) (*FinishWebAuthnRegistrationResponse, error) + // Returns a list of confirmed MFA keys for the authenticated account + ListMfaKeys(context.Context, *ListMfaKeysRequest) (*ListMfaKeysResponse, error) // Updates encrypted, user-supplied metadata (e.g. a human-readable name and - // creation timestamp) for an existing, confirmed TOTP key - SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) - // Removes a TOTP from the authenticated account - RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, error) + // creation timestamp) for an existing, confirmed MFA key + SetMfaKeyMetadata(context.Context, *SetMfaKeyMetadataRequest) (*SetMfaKeyMetadataResponse, error) + // Removes an MFA key from the authenticated account + RemoveMfaKey(context.Context, *RemoveMfaKeyRequest) (*RemoveMfaKeyResponse, error) + // Requests the parameters needed to verify with an MFA factor associated with this account. + StartMfaVerification(context.Context, *StartMfaVerificationRequest) (*StartMfaVerificationResponse, error) + // Attemps to verify an MFA factor associated with this account. + FinishMfaVerification(context.Context, *FinishMfaVerificationRequest) (*FinishMfaVerificationResponse, error) mustEmbedUnimplementedAccountsServer() } @@ -470,14 +546,26 @@ func (UnimplementedAccountsServer) GenerateTotpKey(context.Context, *GenerateTot func (UnimplementedAccountsServer) ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) { return nil, status.Error(codes.Unimplemented, "method ConfirmTotpKey not implemented") } -func (UnimplementedAccountsServer) ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListTotpKeys not implemented") +func (UnimplementedAccountsServer) StartWebAuthnRegistration(context.Context, *StartWebAuthnRegistrationRequest) (*StartWebAuthnRegistrationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method StartWebAuthnRegistration not implemented") } -func (UnimplementedAccountsServer) SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetTotpKeyMetadata not implemented") +func (UnimplementedAccountsServer) FinishWebAuthnRegistration(context.Context, *FinishWebAuthnRegistrationRequest) (*FinishWebAuthnRegistrationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method FinishWebAuthnRegistration not implemented") } -func (UnimplementedAccountsServer) RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RemoveTotpKey not implemented") +func (UnimplementedAccountsServer) ListMfaKeys(context.Context, *ListMfaKeysRequest) (*ListMfaKeysResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListMfaKeys not implemented") +} +func (UnimplementedAccountsServer) SetMfaKeyMetadata(context.Context, *SetMfaKeyMetadataRequest) (*SetMfaKeyMetadataResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetMfaKeyMetadata not implemented") +} +func (UnimplementedAccountsServer) RemoveMfaKey(context.Context, *RemoveMfaKeyRequest) (*RemoveMfaKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemoveMfaKey not implemented") +} +func (UnimplementedAccountsServer) StartMfaVerification(context.Context, *StartMfaVerificationRequest) (*StartMfaVerificationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method StartMfaVerification not implemented") +} +func (UnimplementedAccountsServer) FinishMfaVerification(context.Context, *FinishMfaVerificationRequest) (*FinishMfaVerificationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method FinishMfaVerification not implemented") } func (UnimplementedAccountsServer) mustEmbedUnimplementedAccountsServer() {} func (UnimplementedAccountsServer) testEmbeddedByValue() {} @@ -842,56 +930,128 @@ func _Accounts_ConfirmTotpKey_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Accounts_ListTotpKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTotpKeysRequest) +func _Accounts_StartWebAuthnRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartWebAuthnRegistrationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AccountsServer).ListTotpKeys(ctx, in) + return srv.(AccountsServer).StartWebAuthnRegistration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Accounts_ListTotpKeys_FullMethodName, + FullMethod: Accounts_StartWebAuthnRegistration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ListTotpKeys(ctx, req.(*ListTotpKeysRequest)) + return srv.(AccountsServer).StartWebAuthnRegistration(ctx, req.(*StartWebAuthnRegistrationRequest)) } return interceptor(ctx, in, info, handler) } -func _Accounts_SetTotpKeyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetTotpKeyMetadataRequest) +func _Accounts_FinishWebAuthnRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FinishWebAuthnRegistrationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AccountsServer).SetTotpKeyMetadata(ctx, in) + return srv.(AccountsServer).FinishWebAuthnRegistration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Accounts_SetTotpKeyMetadata_FullMethodName, + FullMethod: Accounts_FinishWebAuthnRegistration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).SetTotpKeyMetadata(ctx, req.(*SetTotpKeyMetadataRequest)) + return srv.(AccountsServer).FinishWebAuthnRegistration(ctx, req.(*FinishWebAuthnRegistrationRequest)) } return interceptor(ctx, in, info, handler) } -func _Accounts_RemoveTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveTotpKeyRequest) +func _Accounts_ListMfaKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMfaKeysRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AccountsServer).RemoveTotpKey(ctx, in) + return srv.(AccountsServer).ListMfaKeys(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Accounts_RemoveTotpKey_FullMethodName, + FullMethod: Accounts_ListMfaKeys_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).RemoveTotpKey(ctx, req.(*RemoveTotpKeyRequest)) + return srv.(AccountsServer).ListMfaKeys(ctx, req.(*ListMfaKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_SetMfaKeyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetMfaKeyMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).SetMfaKeyMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_SetMfaKeyMetadata_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).SetMfaKeyMetadata(ctx, req.(*SetMfaKeyMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_RemoveMfaKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveMfaKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).RemoveMfaKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_RemoveMfaKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).RemoveMfaKey(ctx, req.(*RemoveMfaKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_StartMfaVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartMfaVerificationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).StartMfaVerification(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_StartMfaVerification_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).StartMfaVerification(ctx, req.(*StartMfaVerificationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_FinishMfaVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FinishMfaVerificationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).FinishMfaVerification(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Accounts_FinishMfaVerification_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).FinishMfaVerification(ctx, req.(*FinishMfaVerificationRequest)) } return interceptor(ctx, in, info, handler) } @@ -980,16 +1140,32 @@ var Accounts_ServiceDesc = grpc.ServiceDesc{ Handler: _Accounts_ConfirmTotpKey_Handler, }, { - MethodName: "ListTotpKeys", - Handler: _Accounts_ListTotpKeys_Handler, + MethodName: "StartWebAuthnRegistration", + Handler: _Accounts_StartWebAuthnRegistration_Handler, }, { - MethodName: "SetTotpKeyMetadata", - Handler: _Accounts_SetTotpKeyMetadata_Handler, + MethodName: "FinishWebAuthnRegistration", + Handler: _Accounts_FinishWebAuthnRegistration_Handler, }, { - MethodName: "RemoveTotpKey", - Handler: _Accounts_RemoveTotpKey_Handler, + MethodName: "ListMfaKeys", + Handler: _Accounts_ListMfaKeys_Handler, + }, + { + MethodName: "SetMfaKeyMetadata", + Handler: _Accounts_SetMfaKeyMetadata_Handler, + }, + { + MethodName: "RemoveMfaKey", + Handler: _Accounts_RemoveMfaKey_Handler, + }, + { + MethodName: "StartMfaVerification", + Handler: _Accounts_StartMfaVerification_Handler, + }, + { + MethodName: "FinishMfaVerification", + Handler: _Accounts_FinishMfaVerification_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go b/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go index 91a3fc7..e65b019 100644 --- a/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go +++ b/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go @@ -375,6 +375,60 @@ func (x *GetBackupAuthCredentialsResponse) GetCredentials() *GetBackupAuthCreden return nil } +type GetBackupIdLimitsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If true, a call to SetBackupId may succeed without waiting + HasPermitsRemaining bool `protobuf:"varint,1,opt,name=hasPermitsRemaining,proto3" json:"hasPermitsRemaining,omitempty"` + // How long to wait before a permit becomes available, in seconds + RetryAfterSeconds uint64 `protobuf:"varint,2,opt,name=retryAfterSeconds,proto3" json:"retryAfterSeconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBackupIdLimitsResponse) Reset() { + *x = GetBackupIdLimitsResponse{} + mi := &file_org_signal_chat_backups_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBackupIdLimitsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBackupIdLimitsResponse) ProtoMessage() {} + +func (x *GetBackupIdLimitsResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_backups_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBackupIdLimitsResponse.ProtoReflect.Descriptor instead. +func (*GetBackupIdLimitsResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{6} +} + +func (x *GetBackupIdLimitsResponse) GetHasPermitsRemaining() bool { + if x != nil { + return x.HasPermitsRemaining + } + return false +} + +func (x *GetBackupIdLimitsResponse) GetRetryAfterSeconds() uint64 { + if x != nil { + return x.RetryAfterSeconds + } + return 0 +} + type SignedPresentation struct { state protoimpl.MessageState `protogen:"open.v1"` // Presentation of a BackupAuthCredential previously retrieved from @@ -389,7 +443,7 @@ type SignedPresentation struct { func (x *SignedPresentation) Reset() { *x = SignedPresentation{} - mi := &file_org_signal_chat_backups_proto_msgTypes[6] + mi := &file_org_signal_chat_backups_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -401,7 +455,7 @@ func (x *SignedPresentation) String() string { func (*SignedPresentation) ProtoMessage() {} func (x *SignedPresentation) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[6] + mi := &file_org_signal_chat_backups_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -414,7 +468,7 @@ func (x *SignedPresentation) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedPresentation.ProtoReflect.Descriptor instead. func (*SignedPresentation) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{6} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{7} } func (x *SignedPresentation) GetPresentation() []byte { @@ -442,7 +496,7 @@ type SetPublicKeyRequest struct { func (x *SetPublicKeyRequest) Reset() { *x = SetPublicKeyRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[7] + mi := &file_org_signal_chat_backups_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -454,7 +508,7 @@ func (x *SetPublicKeyRequest) String() string { func (*SetPublicKeyRequest) ProtoMessage() {} func (x *SetPublicKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[7] + mi := &file_org_signal_chat_backups_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -467,7 +521,7 @@ func (x *SetPublicKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPublicKeyRequest.ProtoReflect.Descriptor instead. func (*SetPublicKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{7} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{8} } func (x *SetPublicKeyRequest) GetSignedPresentation() *SignedPresentation { @@ -497,7 +551,7 @@ type SetPublicKeyResponse struct { func (x *SetPublicKeyResponse) Reset() { *x = SetPublicKeyResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[8] + mi := &file_org_signal_chat_backups_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -509,7 +563,7 @@ func (x *SetPublicKeyResponse) String() string { func (*SetPublicKeyResponse) ProtoMessage() {} func (x *SetPublicKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[8] + mi := &file_org_signal_chat_backups_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -522,7 +576,7 @@ func (x *SetPublicKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPublicKeyResponse.ProtoReflect.Descriptor instead. func (*SetPublicKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{8} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{9} } func (x *SetPublicKeyResponse) GetResponse() isSetPublicKeyResponse_Response { @@ -584,7 +638,7 @@ type GetCdnCredentialsRequest struct { func (x *GetCdnCredentialsRequest) Reset() { *x = GetCdnCredentialsRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[9] + mi := &file_org_signal_chat_backups_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -596,7 +650,7 @@ func (x *GetCdnCredentialsRequest) String() string { func (*GetCdnCredentialsRequest) ProtoMessage() {} func (x *GetCdnCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[9] + mi := &file_org_signal_chat_backups_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -609,7 +663,7 @@ func (x *GetCdnCredentialsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCdnCredentialsRequest.ProtoReflect.Descriptor instead. func (*GetCdnCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{9} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{10} } func (x *GetCdnCredentialsRequest) GetSignedPresentation() *SignedPresentation { @@ -639,7 +693,7 @@ type GetCdnCredentialsResponse struct { func (x *GetCdnCredentialsResponse) Reset() { *x = GetCdnCredentialsResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[10] + mi := &file_org_signal_chat_backups_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -651,7 +705,7 @@ func (x *GetCdnCredentialsResponse) String() string { func (*GetCdnCredentialsResponse) ProtoMessage() {} func (x *GetCdnCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[10] + mi := &file_org_signal_chat_backups_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -664,7 +718,7 @@ func (x *GetCdnCredentialsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCdnCredentialsResponse.ProtoReflect.Descriptor instead. func (*GetCdnCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{10} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{11} } func (x *GetCdnCredentialsResponse) GetResponse() isGetCdnCredentialsResponse_Response { @@ -723,7 +777,7 @@ type GetSvrBCredentialsRequest struct { func (x *GetSvrBCredentialsRequest) Reset() { *x = GetSvrBCredentialsRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[11] + mi := &file_org_signal_chat_backups_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -735,7 +789,7 @@ func (x *GetSvrBCredentialsRequest) String() string { func (*GetSvrBCredentialsRequest) ProtoMessage() {} func (x *GetSvrBCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[11] + mi := &file_org_signal_chat_backups_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -748,7 +802,7 @@ func (x *GetSvrBCredentialsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSvrBCredentialsRequest.ProtoReflect.Descriptor instead. func (*GetSvrBCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{11} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{12} } func (x *GetSvrBCredentialsRequest) GetSignedPresentation() *SignedPresentation { @@ -771,7 +825,7 @@ type GetSvrBCredentialsResponse struct { func (x *GetSvrBCredentialsResponse) Reset() { *x = GetSvrBCredentialsResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[12] + mi := &file_org_signal_chat_backups_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -783,7 +837,7 @@ func (x *GetSvrBCredentialsResponse) String() string { func (*GetSvrBCredentialsResponse) ProtoMessage() {} func (x *GetSvrBCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[12] + mi := &file_org_signal_chat_backups_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -796,7 +850,7 @@ func (x *GetSvrBCredentialsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSvrBCredentialsResponse.ProtoReflect.Descriptor instead. func (*GetSvrBCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{12} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{13} } func (x *GetSvrBCredentialsResponse) GetResponse() isGetSvrBCredentialsResponse_Response { @@ -853,7 +907,7 @@ type GetBackupInfoRequest struct { func (x *GetBackupInfoRequest) Reset() { *x = GetBackupInfoRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[13] + mi := &file_org_signal_chat_backups_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -865,7 +919,7 @@ func (x *GetBackupInfoRequest) String() string { func (*GetBackupInfoRequest) ProtoMessage() {} func (x *GetBackupInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[13] + mi := &file_org_signal_chat_backups_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -878,7 +932,7 @@ func (x *GetBackupInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBackupInfoRequest.ProtoReflect.Descriptor instead. func (*GetBackupInfoRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{13} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{14} } func (x *GetBackupInfoRequest) GetSignedPresentation() *SignedPresentation { @@ -901,7 +955,7 @@ type GetMessageBackupInfoResponse struct { func (x *GetMessageBackupInfoResponse) Reset() { *x = GetMessageBackupInfoResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[14] + mi := &file_org_signal_chat_backups_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -913,7 +967,7 @@ func (x *GetMessageBackupInfoResponse) String() string { func (*GetMessageBackupInfoResponse) ProtoMessage() {} func (x *GetMessageBackupInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[14] + mi := &file_org_signal_chat_backups_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -926,7 +980,7 @@ func (x *GetMessageBackupInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMessageBackupInfoResponse.ProtoReflect.Descriptor instead. func (*GetMessageBackupInfoResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{14} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15} } func (x *GetMessageBackupInfoResponse) GetResponse() isGetMessageBackupInfoResponse_Response { @@ -987,7 +1041,7 @@ type GetMediaBackupInfoResponse struct { func (x *GetMediaBackupInfoResponse) Reset() { *x = GetMediaBackupInfoResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[15] + mi := &file_org_signal_chat_backups_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -999,7 +1053,7 @@ func (x *GetMediaBackupInfoResponse) String() string { func (*GetMediaBackupInfoResponse) ProtoMessage() {} func (x *GetMediaBackupInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[15] + mi := &file_org_signal_chat_backups_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1012,7 +1066,7 @@ func (x *GetMediaBackupInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMediaBackupInfoResponse.ProtoReflect.Descriptor instead. func (*GetMediaBackupInfoResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{16} } func (x *GetMediaBackupInfoResponse) GetResponse() isGetMediaBackupInfoResponse_Response { @@ -1069,7 +1123,7 @@ type RefreshRequest struct { func (x *RefreshRequest) Reset() { *x = RefreshRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[16] + mi := &file_org_signal_chat_backups_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1081,7 +1135,7 @@ func (x *RefreshRequest) String() string { func (*RefreshRequest) ProtoMessage() {} func (x *RefreshRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[16] + mi := &file_org_signal_chat_backups_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1094,7 +1148,7 @@ func (x *RefreshRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead. func (*RefreshRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{16} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{17} } func (x *RefreshRequest) GetSignedPresentation() *SignedPresentation { @@ -1117,7 +1171,7 @@ type RefreshResponse struct { func (x *RefreshResponse) Reset() { *x = RefreshResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[17] + mi := &file_org_signal_chat_backups_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1129,7 +1183,7 @@ func (x *RefreshResponse) String() string { func (*RefreshResponse) ProtoMessage() {} func (x *RefreshResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[17] + mi := &file_org_signal_chat_backups_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1142,7 +1196,7 @@ func (x *RefreshResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshResponse.ProtoReflect.Descriptor instead. func (*RefreshResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{17} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18} } func (x *RefreshResponse) GetResponse() isRefreshResponse_Response { @@ -1208,7 +1262,7 @@ type GetUploadFormRequest struct { func (x *GetUploadFormRequest) Reset() { *x = GetUploadFormRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[18] + mi := &file_org_signal_chat_backups_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1220,7 +1274,7 @@ func (x *GetUploadFormRequest) String() string { func (*GetUploadFormRequest) ProtoMessage() {} func (x *GetUploadFormRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[18] + mi := &file_org_signal_chat_backups_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1233,7 +1287,7 @@ func (x *GetUploadFormRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUploadFormRequest.ProtoReflect.Descriptor instead. func (*GetUploadFormRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{19} } func (x *GetUploadFormRequest) GetSignedPresentation() *SignedPresentation { @@ -1312,7 +1366,7 @@ type GetUploadFormResponse struct { func (x *GetUploadFormResponse) Reset() { *x = GetUploadFormResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[19] + mi := &file_org_signal_chat_backups_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1324,7 +1378,7 @@ func (x *GetUploadFormResponse) String() string { func (*GetUploadFormResponse) ProtoMessage() {} func (x *GetUploadFormResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[19] + mi := &file_org_signal_chat_backups_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1337,7 +1391,7 @@ func (x *GetUploadFormResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUploadFormResponse.ProtoReflect.Descriptor instead. func (*GetUploadFormResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{19} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{20} } func (x *GetUploadFormResponse) GetResponse() isGetUploadFormResponse_Response { @@ -1424,7 +1478,7 @@ type CopyMediaItem struct { func (x *CopyMediaItem) Reset() { *x = CopyMediaItem{} - mi := &file_org_signal_chat_backups_proto_msgTypes[20] + mi := &file_org_signal_chat_backups_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1436,7 +1490,7 @@ func (x *CopyMediaItem) String() string { func (*CopyMediaItem) ProtoMessage() {} func (x *CopyMediaItem) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[20] + mi := &file_org_signal_chat_backups_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1449,7 +1503,7 @@ func (x *CopyMediaItem) ProtoReflect() protoreflect.Message { // Deprecated: Use CopyMediaItem.ProtoReflect.Descriptor instead. func (*CopyMediaItem) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{20} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{21} } func (x *CopyMediaItem) GetSourceAttachmentCdn() uint32 { @@ -1505,7 +1559,7 @@ type CopyMediaRequest struct { func (x *CopyMediaRequest) Reset() { *x = CopyMediaRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[21] + mi := &file_org_signal_chat_backups_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1517,7 +1571,7 @@ func (x *CopyMediaRequest) String() string { func (*CopyMediaRequest) ProtoMessage() {} func (x *CopyMediaRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[21] + mi := &file_org_signal_chat_backups_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1530,7 +1584,7 @@ func (x *CopyMediaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CopyMediaRequest.ProtoReflect.Descriptor instead. func (*CopyMediaRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{21} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22} } func (x *CopyMediaRequest) GetSignedPresentation() *SignedPresentation { @@ -1564,7 +1618,7 @@ type CopyMediaResponse struct { func (x *CopyMediaResponse) Reset() { *x = CopyMediaResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[22] + mi := &file_org_signal_chat_backups_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1576,7 +1630,7 @@ func (x *CopyMediaResponse) String() string { func (*CopyMediaResponse) ProtoMessage() {} func (x *CopyMediaResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[22] + mi := &file_org_signal_chat_backups_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1589,7 +1643,7 @@ func (x *CopyMediaResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CopyMediaResponse.ProtoReflect.Descriptor instead. func (*CopyMediaResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23} } func (x *CopyMediaResponse) GetMediaId() []byte { @@ -1687,7 +1741,7 @@ type BackupStreamClosed struct { func (x *BackupStreamClosed) Reset() { *x = BackupStreamClosed{} - mi := &file_org_signal_chat_backups_proto_msgTypes[23] + mi := &file_org_signal_chat_backups_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1699,7 +1753,7 @@ func (x *BackupStreamClosed) String() string { func (*BackupStreamClosed) ProtoMessage() {} func (x *BackupStreamClosed) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[23] + mi := &file_org_signal_chat_backups_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1712,7 +1766,7 @@ func (x *BackupStreamClosed) ProtoReflect() protoreflect.Message { // Deprecated: Use BackupStreamClosed.ProtoReflect.Descriptor instead. func (*BackupStreamClosed) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{24} } func (x *BackupStreamClosed) GetReason() isBackupStreamClosed_Reason { @@ -1759,7 +1813,7 @@ type ListMediaRequest struct { func (x *ListMediaRequest) Reset() { *x = ListMediaRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[24] + mi := &file_org_signal_chat_backups_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1771,7 +1825,7 @@ func (x *ListMediaRequest) String() string { func (*ListMediaRequest) ProtoMessage() {} func (x *ListMediaRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[24] + mi := &file_org_signal_chat_backups_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1784,7 +1838,7 @@ func (x *ListMediaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMediaRequest.ProtoReflect.Descriptor instead. func (*ListMediaRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{24} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25} } func (x *ListMediaRequest) GetSignedPresentation() *SignedPresentation { @@ -1821,7 +1875,7 @@ type ListMediaResponse struct { func (x *ListMediaResponse) Reset() { *x = ListMediaResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[25] + mi := &file_org_signal_chat_backups_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1833,7 +1887,7 @@ func (x *ListMediaResponse) String() string { func (*ListMediaResponse) ProtoMessage() {} func (x *ListMediaResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[25] + mi := &file_org_signal_chat_backups_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1846,7 +1900,7 @@ func (x *ListMediaResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMediaResponse.ProtoReflect.Descriptor instead. func (*ListMediaResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{26} } func (x *ListMediaResponse) GetResponse() isListMediaResponse_Response { @@ -1903,7 +1957,7 @@ type DeleteAllRequest struct { func (x *DeleteAllRequest) Reset() { *x = DeleteAllRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[26] + mi := &file_org_signal_chat_backups_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1915,7 +1969,7 @@ func (x *DeleteAllRequest) String() string { func (*DeleteAllRequest) ProtoMessage() {} func (x *DeleteAllRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[26] + mi := &file_org_signal_chat_backups_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1928,7 +1982,7 @@ func (x *DeleteAllRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAllRequest.ProtoReflect.Descriptor instead. func (*DeleteAllRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{26} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{27} } func (x *DeleteAllRequest) GetSignedPresentation() *SignedPresentation { @@ -1951,7 +2005,7 @@ type DeleteAllResponse struct { func (x *DeleteAllResponse) Reset() { *x = DeleteAllResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[27] + mi := &file_org_signal_chat_backups_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1963,7 +2017,7 @@ func (x *DeleteAllResponse) String() string { func (*DeleteAllResponse) ProtoMessage() {} func (x *DeleteAllResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[27] + mi := &file_org_signal_chat_backups_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1976,7 +2030,7 @@ func (x *DeleteAllResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAllResponse.ProtoReflect.Descriptor instead. func (*DeleteAllResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{27} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{28} } func (x *DeleteAllResponse) GetResponse() isDeleteAllResponse_Response { @@ -2037,7 +2091,7 @@ type DeleteMediaItem struct { func (x *DeleteMediaItem) Reset() { *x = DeleteMediaItem{} - mi := &file_org_signal_chat_backups_proto_msgTypes[28] + mi := &file_org_signal_chat_backups_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2049,7 +2103,7 @@ func (x *DeleteMediaItem) String() string { func (*DeleteMediaItem) ProtoMessage() {} func (x *DeleteMediaItem) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[28] + mi := &file_org_signal_chat_backups_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2062,7 +2116,7 @@ func (x *DeleteMediaItem) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMediaItem.ProtoReflect.Descriptor instead. func (*DeleteMediaItem) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{28} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{29} } func (x *DeleteMediaItem) GetCdn() uint32 { @@ -2089,7 +2143,7 @@ type DeleteMediaRequest struct { func (x *DeleteMediaRequest) Reset() { *x = DeleteMediaRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[29] + mi := &file_org_signal_chat_backups_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2101,7 +2155,7 @@ func (x *DeleteMediaRequest) String() string { func (*DeleteMediaRequest) ProtoMessage() {} func (x *DeleteMediaRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[29] + mi := &file_org_signal_chat_backups_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2114,7 +2168,7 @@ func (x *DeleteMediaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMediaRequest.ProtoReflect.Descriptor instead. func (*DeleteMediaRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{29} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{30} } func (x *DeleteMediaRequest) GetSignedPresentation() *SignedPresentation { @@ -2140,7 +2194,7 @@ type DeleteMediaResponse struct { func (x *DeleteMediaResponse) Reset() { *x = DeleteMediaResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[30] + mi := &file_org_signal_chat_backups_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2152,7 +2206,7 @@ func (x *DeleteMediaResponse) String() string { func (*DeleteMediaResponse) ProtoMessage() {} func (x *DeleteMediaResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[30] + mi := &file_org_signal_chat_backups_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2165,7 +2219,7 @@ func (x *DeleteMediaResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMediaResponse.ProtoReflect.Descriptor instead. func (*DeleteMediaResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{30} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{31} } func (x *DeleteMediaResponse) GetDeletedItem() *DeleteMediaItem { @@ -2191,7 +2245,7 @@ type GetBackupAuthCredentialsResponse_Credentials struct { func (x *GetBackupAuthCredentialsResponse_Credentials) Reset() { *x = GetBackupAuthCredentialsResponse_Credentials{} - mi := &file_org_signal_chat_backups_proto_msgTypes[31] + mi := &file_org_signal_chat_backups_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2203,7 +2257,7 @@ func (x *GetBackupAuthCredentialsResponse_Credentials) String() string { func (*GetBackupAuthCredentialsResponse_Credentials) ProtoMessage() {} func (x *GetBackupAuthCredentialsResponse_Credentials) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[31] + mi := &file_org_signal_chat_backups_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2242,7 +2296,7 @@ type GetCdnCredentialsResponse_CdnCredentials struct { func (x *GetCdnCredentialsResponse_CdnCredentials) Reset() { *x = GetCdnCredentialsResponse_CdnCredentials{} - mi := &file_org_signal_chat_backups_proto_msgTypes[34] + mi := &file_org_signal_chat_backups_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2254,7 +2308,7 @@ func (x *GetCdnCredentialsResponse_CdnCredentials) String() string { func (*GetCdnCredentialsResponse_CdnCredentials) ProtoMessage() {} func (x *GetCdnCredentialsResponse_CdnCredentials) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[34] + mi := &file_org_signal_chat_backups_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2267,7 +2321,7 @@ func (x *GetCdnCredentialsResponse_CdnCredentials) ProtoReflect() protoreflect.M // Deprecated: Use GetCdnCredentialsResponse_CdnCredentials.ProtoReflect.Descriptor instead. func (*GetCdnCredentialsResponse_CdnCredentials) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{10, 0} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{11, 0} } func (x *GetCdnCredentialsResponse_CdnCredentials) GetHeaders() map[string]string { @@ -2289,7 +2343,7 @@ type GetSvrBCredentialsResponse_SvrBCredentials struct { func (x *GetSvrBCredentialsResponse_SvrBCredentials) Reset() { *x = GetSvrBCredentialsResponse_SvrBCredentials{} - mi := &file_org_signal_chat_backups_proto_msgTypes[36] + mi := &file_org_signal_chat_backups_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2301,7 +2355,7 @@ func (x *GetSvrBCredentialsResponse_SvrBCredentials) String() string { func (*GetSvrBCredentialsResponse_SvrBCredentials) ProtoMessage() {} func (x *GetSvrBCredentialsResponse_SvrBCredentials) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[36] + mi := &file_org_signal_chat_backups_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2314,7 +2368,7 @@ func (x *GetSvrBCredentialsResponse_SvrBCredentials) ProtoReflect() protoreflect // Deprecated: Use GetSvrBCredentialsResponse_SvrBCredentials.ProtoReflect.Descriptor instead. func (*GetSvrBCredentialsResponse_SvrBCredentials) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{12, 0} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{13, 0} } func (x *GetSvrBCredentialsResponse_SvrBCredentials) GetUsername() string { @@ -2352,7 +2406,7 @@ type GetMessageBackupInfoResponse_MessageBackupInfo struct { func (x *GetMessageBackupInfoResponse_MessageBackupInfo) Reset() { *x = GetMessageBackupInfoResponse_MessageBackupInfo{} - mi := &file_org_signal_chat_backups_proto_msgTypes[37] + mi := &file_org_signal_chat_backups_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2364,7 +2418,7 @@ func (x *GetMessageBackupInfoResponse_MessageBackupInfo) String() string { func (*GetMessageBackupInfoResponse_MessageBackupInfo) ProtoMessage() {} func (x *GetMessageBackupInfoResponse_MessageBackupInfo) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[37] + mi := &file_org_signal_chat_backups_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2377,7 +2431,7 @@ func (x *GetMessageBackupInfoResponse_MessageBackupInfo) ProtoReflect() protoref // Deprecated: Use GetMessageBackupInfoResponse_MessageBackupInfo.ProtoReflect.Descriptor instead. func (*GetMessageBackupInfoResponse_MessageBackupInfo) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{14, 0} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15, 0} } func (x *GetMessageBackupInfoResponse_MessageBackupInfo) GetBackupDir() string { @@ -2421,7 +2475,7 @@ type GetMediaBackupInfoResponse_MediaBackupInfo struct { func (x *GetMediaBackupInfoResponse_MediaBackupInfo) Reset() { *x = GetMediaBackupInfoResponse_MediaBackupInfo{} - mi := &file_org_signal_chat_backups_proto_msgTypes[38] + mi := &file_org_signal_chat_backups_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2433,7 +2487,7 @@ func (x *GetMediaBackupInfoResponse_MediaBackupInfo) String() string { func (*GetMediaBackupInfoResponse_MediaBackupInfo) ProtoMessage() {} func (x *GetMediaBackupInfoResponse_MediaBackupInfo) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[38] + mi := &file_org_signal_chat_backups_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2446,7 +2500,7 @@ func (x *GetMediaBackupInfoResponse_MediaBackupInfo) ProtoReflect() protoreflect // Deprecated: Use GetMediaBackupInfoResponse_MediaBackupInfo.ProtoReflect.Descriptor instead. func (*GetMediaBackupInfoResponse_MediaBackupInfo) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15, 0} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{16, 0} } func (x *GetMediaBackupInfoResponse_MediaBackupInfo) GetBackupDir() string { @@ -2478,7 +2532,7 @@ type GetUploadFormRequest_MessagesUploadType struct { func (x *GetUploadFormRequest_MessagesUploadType) Reset() { *x = GetUploadFormRequest_MessagesUploadType{} - mi := &file_org_signal_chat_backups_proto_msgTypes[39] + mi := &file_org_signal_chat_backups_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2490,7 +2544,7 @@ func (x *GetUploadFormRequest_MessagesUploadType) String() string { func (*GetUploadFormRequest_MessagesUploadType) ProtoMessage() {} func (x *GetUploadFormRequest_MessagesUploadType) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[39] + mi := &file_org_signal_chat_backups_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2503,7 +2557,7 @@ func (x *GetUploadFormRequest_MessagesUploadType) ProtoReflect() protoreflect.Me // Deprecated: Use GetUploadFormRequest_MessagesUploadType.ProtoReflect.Descriptor instead. func (*GetUploadFormRequest_MessagesUploadType) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18, 0} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{19, 0} } type GetUploadFormRequest_MediaUploadType struct { @@ -2514,7 +2568,7 @@ type GetUploadFormRequest_MediaUploadType struct { func (x *GetUploadFormRequest_MediaUploadType) Reset() { *x = GetUploadFormRequest_MediaUploadType{} - mi := &file_org_signal_chat_backups_proto_msgTypes[40] + mi := &file_org_signal_chat_backups_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2526,7 +2580,7 @@ func (x *GetUploadFormRequest_MediaUploadType) String() string { func (*GetUploadFormRequest_MediaUploadType) ProtoMessage() {} func (x *GetUploadFormRequest_MediaUploadType) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[40] + mi := &file_org_signal_chat_backups_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2539,7 +2593,7 @@ func (x *GetUploadFormRequest_MediaUploadType) ProtoReflect() protoreflect.Messa // Deprecated: Use GetUploadFormRequest_MediaUploadType.ProtoReflect.Descriptor instead. func (*GetUploadFormRequest_MediaUploadType) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18, 1} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{19, 1} } type CopyMediaResponse_SourceNotFound struct { @@ -2550,7 +2604,7 @@ type CopyMediaResponse_SourceNotFound struct { func (x *CopyMediaResponse_SourceNotFound) Reset() { *x = CopyMediaResponse_SourceNotFound{} - mi := &file_org_signal_chat_backups_proto_msgTypes[41] + mi := &file_org_signal_chat_backups_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2562,7 +2616,7 @@ func (x *CopyMediaResponse_SourceNotFound) String() string { func (*CopyMediaResponse_SourceNotFound) ProtoMessage() {} func (x *CopyMediaResponse_SourceNotFound) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[41] + mi := &file_org_signal_chat_backups_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2575,7 +2629,7 @@ func (x *CopyMediaResponse_SourceNotFound) ProtoReflect() protoreflect.Message { // Deprecated: Use CopyMediaResponse_SourceNotFound.ProtoReflect.Descriptor instead. func (*CopyMediaResponse_SourceNotFound) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 0} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23, 0} } type CopyMediaResponse_WrongSourceLength struct { @@ -2586,7 +2640,7 @@ type CopyMediaResponse_WrongSourceLength struct { func (x *CopyMediaResponse_WrongSourceLength) Reset() { *x = CopyMediaResponse_WrongSourceLength{} - mi := &file_org_signal_chat_backups_proto_msgTypes[42] + mi := &file_org_signal_chat_backups_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2598,7 +2652,7 @@ func (x *CopyMediaResponse_WrongSourceLength) String() string { func (*CopyMediaResponse_WrongSourceLength) ProtoMessage() {} func (x *CopyMediaResponse_WrongSourceLength) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[42] + mi := &file_org_signal_chat_backups_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2611,7 +2665,7 @@ func (x *CopyMediaResponse_WrongSourceLength) ProtoReflect() protoreflect.Messag // Deprecated: Use CopyMediaResponse_WrongSourceLength.ProtoReflect.Descriptor instead. func (*CopyMediaResponse_WrongSourceLength) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 1} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23, 1} } type CopyMediaResponse_OutOfSpace struct { @@ -2622,7 +2676,7 @@ type CopyMediaResponse_OutOfSpace struct { func (x *CopyMediaResponse_OutOfSpace) Reset() { *x = CopyMediaResponse_OutOfSpace{} - mi := &file_org_signal_chat_backups_proto_msgTypes[43] + mi := &file_org_signal_chat_backups_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2634,7 +2688,7 @@ func (x *CopyMediaResponse_OutOfSpace) String() string { func (*CopyMediaResponse_OutOfSpace) ProtoMessage() {} func (x *CopyMediaResponse_OutOfSpace) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[43] + mi := &file_org_signal_chat_backups_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2647,7 +2701,7 @@ func (x *CopyMediaResponse_OutOfSpace) ProtoReflect() protoreflect.Message { // Deprecated: Use CopyMediaResponse_OutOfSpace.ProtoReflect.Descriptor instead. func (*CopyMediaResponse_OutOfSpace) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 2} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23, 2} } type CopyMediaResponse_CopySuccess struct { @@ -2660,7 +2714,7 @@ type CopyMediaResponse_CopySuccess struct { func (x *CopyMediaResponse_CopySuccess) Reset() { *x = CopyMediaResponse_CopySuccess{} - mi := &file_org_signal_chat_backups_proto_msgTypes[44] + mi := &file_org_signal_chat_backups_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2672,7 +2726,7 @@ func (x *CopyMediaResponse_CopySuccess) String() string { func (*CopyMediaResponse_CopySuccess) ProtoMessage() {} func (x *CopyMediaResponse_CopySuccess) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[44] + mi := &file_org_signal_chat_backups_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2685,7 +2739,7 @@ func (x *CopyMediaResponse_CopySuccess) ProtoReflect() protoreflect.Message { // Deprecated: Use CopyMediaResponse_CopySuccess.ProtoReflect.Descriptor instead. func (*CopyMediaResponse_CopySuccess) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 3} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23, 3} } func (x *CopyMediaResponse_CopySuccess) GetCdn() uint32 { @@ -2709,7 +2763,7 @@ type ListMediaResponse_ListEntry struct { func (x *ListMediaResponse_ListEntry) Reset() { *x = ListMediaResponse_ListEntry{} - mi := &file_org_signal_chat_backups_proto_msgTypes[45] + mi := &file_org_signal_chat_backups_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2721,7 +2775,7 @@ func (x *ListMediaResponse_ListEntry) String() string { func (*ListMediaResponse_ListEntry) ProtoMessage() {} func (x *ListMediaResponse_ListEntry) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[45] + mi := &file_org_signal_chat_backups_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2734,7 +2788,7 @@ func (x *ListMediaResponse_ListEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMediaResponse_ListEntry.ProtoReflect.Descriptor instead. func (*ListMediaResponse_ListEntry) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25, 0} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{26, 0} } func (x *ListMediaResponse_ListEntry) GetCdn() uint32 { @@ -2779,7 +2833,7 @@ type ListMediaResponse_ListResult struct { func (x *ListMediaResponse_ListResult) Reset() { *x = ListMediaResponse_ListResult{} - mi := &file_org_signal_chat_backups_proto_msgTypes[46] + mi := &file_org_signal_chat_backups_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2791,7 +2845,7 @@ func (x *ListMediaResponse_ListResult) String() string { func (*ListMediaResponse_ListResult) ProtoMessage() {} func (x *ListMediaResponse_ListResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[46] + mi := &file_org_signal_chat_backups_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2804,7 +2858,7 @@ func (x *ListMediaResponse_ListResult) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMediaResponse_ListResult.ProtoReflect.Descriptor instead. func (*ListMediaResponse_ListResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25, 1} + return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{26, 1} } func (x *ListMediaResponse_ListResult) GetPage() []*ListMediaResponse_ListEntry { @@ -2866,6 +2920,9 @@ const file_org_signal_chat_backups_proto_rawDesc = "" + "\x15MediaCredentialsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x03R\x03key\x12:\n" + "\x05value\x18\x02 \x01(\v2$.org.signal.chat.common.ZkCredentialR\x05value:\x028\x01\"{\n" + + "\x19GetBackupIdLimitsResponse\x120\n" + + "\x13hasPermitsRemaining\x18\x01 \x01(\bR\x13hasPermitsRemaining\x12,\n" + + "\x11retryAfterSeconds\x18\x02 \x01(\x04R\x11retryAfterSeconds\"{\n" + "\x12SignedPresentation\x12(\n" + "\fpresentation\x18\x01 \x01(\fB\x04\x88\x97\"\x01R\fpresentation\x12;\n" + "\x16presentation_signature\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\x15presentationSignature\"\x97\x01\n" + @@ -3016,11 +3073,12 @@ const file_org_signal_chat_backups_proto_rawDesc = "" + "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12H\n" + "\x05items\x18\x02 \x03(\v2'.org.signal.chat.backup.DeleteMediaItemB\t\x9a\x97\"\x05\b\x01\x10\xe8\aR\x05items\"a\n" + "\x13DeleteMediaResponse\x12J\n" + - "\fdeleted_item\x18\x01 \x01(\v2'.org.signal.chat.backup.DeleteMediaItemR\vdeletedItem2\xfb\x02\n" + + "\fdeleted_item\x18\x01 \x01(\v2'.org.signal.chat.backup.DeleteMediaItemR\vdeletedItem2\xdd\x03\n" + "\aBackups\x12h\n" + "\vSetBackupId\x12*.org.signal.chat.backup.SetBackupIdRequest\x1a+.org.signal.chat.backup.SetBackupIdResponse\"\x00\x12n\n" + "\rRedeemReceipt\x12,.org.signal.chat.backup.RedeemReceiptRequest\x1a-.org.signal.chat.backup.RedeemReceiptResponse\"\x00\x12\x8f\x01\n" + - "\x18GetBackupAuthCredentials\x127.org.signal.chat.backup.GetBackupAuthCredentialsRequest\x1a8.org.signal.chat.backup.GetBackupAuthCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xe0\t\n" + + "\x18GetBackupAuthCredentials\x127.org.signal.chat.backup.GetBackupAuthCredentialsRequest\x1a8.org.signal.chat.backup.GetBackupAuthCredentialsResponse\"\x00\x12`\n" + + "\x11GetBackupIdLimits\x12\x16.google.protobuf.Empty\x1a1.org.signal.chat.backup.GetBackupIdLimitsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xe0\t\n" + "\x10BackupsAnonymous\x12z\n" + "\x11GetCdnCredentials\x120.org.signal.chat.backup.GetCdnCredentialsRequest\x1a1.org.signal.chat.backup.GetCdnCredentialsResponse\"\x00\x12}\n" + "\x12GetSvrBCredentials\x121.org.signal.chat.backup.GetSvrBCredentialsRequest\x1a2.org.signal.chat.backup.GetSvrBCredentialsResponse\"\x00\x12|\n" + @@ -3046,7 +3104,7 @@ func file_org_signal_chat_backups_proto_rawDescGZIP() []byte { return file_org_signal_chat_backups_proto_rawDescData } -var file_org_signal_chat_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 47) +var file_org_signal_chat_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 48) var file_org_signal_chat_backups_proto_goTypes = []any{ (*SetBackupIdRequest)(nil), // 0: org.signal.chat.backup.SetBackupIdRequest (*SetBackupIdResponse)(nil), // 1: org.signal.chat.backup.SetBackupIdResponse @@ -3054,133 +3112,136 @@ var file_org_signal_chat_backups_proto_goTypes = []any{ (*RedeemReceiptResponse)(nil), // 3: org.signal.chat.backup.RedeemReceiptResponse (*GetBackupAuthCredentialsRequest)(nil), // 4: org.signal.chat.backup.GetBackupAuthCredentialsRequest (*GetBackupAuthCredentialsResponse)(nil), // 5: org.signal.chat.backup.GetBackupAuthCredentialsResponse - (*SignedPresentation)(nil), // 6: org.signal.chat.backup.SignedPresentation - (*SetPublicKeyRequest)(nil), // 7: org.signal.chat.backup.SetPublicKeyRequest - (*SetPublicKeyResponse)(nil), // 8: org.signal.chat.backup.SetPublicKeyResponse - (*GetCdnCredentialsRequest)(nil), // 9: org.signal.chat.backup.GetCdnCredentialsRequest - (*GetCdnCredentialsResponse)(nil), // 10: org.signal.chat.backup.GetCdnCredentialsResponse - (*GetSvrBCredentialsRequest)(nil), // 11: org.signal.chat.backup.GetSvrBCredentialsRequest - (*GetSvrBCredentialsResponse)(nil), // 12: org.signal.chat.backup.GetSvrBCredentialsResponse - (*GetBackupInfoRequest)(nil), // 13: org.signal.chat.backup.GetBackupInfoRequest - (*GetMessageBackupInfoResponse)(nil), // 14: org.signal.chat.backup.GetMessageBackupInfoResponse - (*GetMediaBackupInfoResponse)(nil), // 15: org.signal.chat.backup.GetMediaBackupInfoResponse - (*RefreshRequest)(nil), // 16: org.signal.chat.backup.RefreshRequest - (*RefreshResponse)(nil), // 17: org.signal.chat.backup.RefreshResponse - (*GetUploadFormRequest)(nil), // 18: org.signal.chat.backup.GetUploadFormRequest - (*GetUploadFormResponse)(nil), // 19: org.signal.chat.backup.GetUploadFormResponse - (*CopyMediaItem)(nil), // 20: org.signal.chat.backup.CopyMediaItem - (*CopyMediaRequest)(nil), // 21: org.signal.chat.backup.CopyMediaRequest - (*CopyMediaResponse)(nil), // 22: org.signal.chat.backup.CopyMediaResponse - (*BackupStreamClosed)(nil), // 23: org.signal.chat.backup.BackupStreamClosed - (*ListMediaRequest)(nil), // 24: org.signal.chat.backup.ListMediaRequest - (*ListMediaResponse)(nil), // 25: org.signal.chat.backup.ListMediaResponse - (*DeleteAllRequest)(nil), // 26: org.signal.chat.backup.DeleteAllRequest - (*DeleteAllResponse)(nil), // 27: org.signal.chat.backup.DeleteAllResponse - (*DeleteMediaItem)(nil), // 28: org.signal.chat.backup.DeleteMediaItem - (*DeleteMediaRequest)(nil), // 29: org.signal.chat.backup.DeleteMediaRequest - (*DeleteMediaResponse)(nil), // 30: org.signal.chat.backup.DeleteMediaResponse - (*GetBackupAuthCredentialsResponse_Credentials)(nil), // 31: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials - nil, // 32: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry - nil, // 33: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry - (*GetCdnCredentialsResponse_CdnCredentials)(nil), // 34: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials - nil, // 35: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry - (*GetSvrBCredentialsResponse_SvrBCredentials)(nil), // 36: org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials - (*GetMessageBackupInfoResponse_MessageBackupInfo)(nil), // 37: org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo - (*GetMediaBackupInfoResponse_MediaBackupInfo)(nil), // 38: org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo - (*GetUploadFormRequest_MessagesUploadType)(nil), // 39: org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType - (*GetUploadFormRequest_MediaUploadType)(nil), // 40: org.signal.chat.backup.GetUploadFormRequest.MediaUploadType - (*CopyMediaResponse_SourceNotFound)(nil), // 41: org.signal.chat.backup.CopyMediaResponse.SourceNotFound - (*CopyMediaResponse_WrongSourceLength)(nil), // 42: org.signal.chat.backup.CopyMediaResponse.WrongSourceLength - (*CopyMediaResponse_OutOfSpace)(nil), // 43: org.signal.chat.backup.CopyMediaResponse.OutOfSpace - (*CopyMediaResponse_CopySuccess)(nil), // 44: org.signal.chat.backup.CopyMediaResponse.CopySuccess - (*ListMediaResponse_ListEntry)(nil), // 45: org.signal.chat.backup.ListMediaResponse.ListEntry - (*ListMediaResponse_ListResult)(nil), // 46: org.signal.chat.backup.ListMediaResponse.ListResult - (*emptypb.Empty)(nil), // 47: google.protobuf.Empty - (*errors.FailedPrecondition)(nil), // 48: org.signal.chat.errors.FailedPrecondition - (*errors.FailedZkAuthentication)(nil), // 49: org.signal.chat.errors.FailedZkAuthentication - (*common.UploadForm)(nil), // 50: org.signal.chat.common.UploadForm - (*common.ZkCredential)(nil), // 51: org.signal.chat.common.ZkCredential + (*GetBackupIdLimitsResponse)(nil), // 6: org.signal.chat.backup.GetBackupIdLimitsResponse + (*SignedPresentation)(nil), // 7: org.signal.chat.backup.SignedPresentation + (*SetPublicKeyRequest)(nil), // 8: org.signal.chat.backup.SetPublicKeyRequest + (*SetPublicKeyResponse)(nil), // 9: org.signal.chat.backup.SetPublicKeyResponse + (*GetCdnCredentialsRequest)(nil), // 10: org.signal.chat.backup.GetCdnCredentialsRequest + (*GetCdnCredentialsResponse)(nil), // 11: org.signal.chat.backup.GetCdnCredentialsResponse + (*GetSvrBCredentialsRequest)(nil), // 12: org.signal.chat.backup.GetSvrBCredentialsRequest + (*GetSvrBCredentialsResponse)(nil), // 13: org.signal.chat.backup.GetSvrBCredentialsResponse + (*GetBackupInfoRequest)(nil), // 14: org.signal.chat.backup.GetBackupInfoRequest + (*GetMessageBackupInfoResponse)(nil), // 15: org.signal.chat.backup.GetMessageBackupInfoResponse + (*GetMediaBackupInfoResponse)(nil), // 16: org.signal.chat.backup.GetMediaBackupInfoResponse + (*RefreshRequest)(nil), // 17: org.signal.chat.backup.RefreshRequest + (*RefreshResponse)(nil), // 18: org.signal.chat.backup.RefreshResponse + (*GetUploadFormRequest)(nil), // 19: org.signal.chat.backup.GetUploadFormRequest + (*GetUploadFormResponse)(nil), // 20: org.signal.chat.backup.GetUploadFormResponse + (*CopyMediaItem)(nil), // 21: org.signal.chat.backup.CopyMediaItem + (*CopyMediaRequest)(nil), // 22: org.signal.chat.backup.CopyMediaRequest + (*CopyMediaResponse)(nil), // 23: org.signal.chat.backup.CopyMediaResponse + (*BackupStreamClosed)(nil), // 24: org.signal.chat.backup.BackupStreamClosed + (*ListMediaRequest)(nil), // 25: org.signal.chat.backup.ListMediaRequest + (*ListMediaResponse)(nil), // 26: org.signal.chat.backup.ListMediaResponse + (*DeleteAllRequest)(nil), // 27: org.signal.chat.backup.DeleteAllRequest + (*DeleteAllResponse)(nil), // 28: org.signal.chat.backup.DeleteAllResponse + (*DeleteMediaItem)(nil), // 29: org.signal.chat.backup.DeleteMediaItem + (*DeleteMediaRequest)(nil), // 30: org.signal.chat.backup.DeleteMediaRequest + (*DeleteMediaResponse)(nil), // 31: org.signal.chat.backup.DeleteMediaResponse + (*GetBackupAuthCredentialsResponse_Credentials)(nil), // 32: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials + nil, // 33: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry + nil, // 34: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry + (*GetCdnCredentialsResponse_CdnCredentials)(nil), // 35: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials + nil, // 36: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry + (*GetSvrBCredentialsResponse_SvrBCredentials)(nil), // 37: org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials + (*GetMessageBackupInfoResponse_MessageBackupInfo)(nil), // 38: org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo + (*GetMediaBackupInfoResponse_MediaBackupInfo)(nil), // 39: org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo + (*GetUploadFormRequest_MessagesUploadType)(nil), // 40: org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType + (*GetUploadFormRequest_MediaUploadType)(nil), // 41: org.signal.chat.backup.GetUploadFormRequest.MediaUploadType + (*CopyMediaResponse_SourceNotFound)(nil), // 42: org.signal.chat.backup.CopyMediaResponse.SourceNotFound + (*CopyMediaResponse_WrongSourceLength)(nil), // 43: org.signal.chat.backup.CopyMediaResponse.WrongSourceLength + (*CopyMediaResponse_OutOfSpace)(nil), // 44: org.signal.chat.backup.CopyMediaResponse.OutOfSpace + (*CopyMediaResponse_CopySuccess)(nil), // 45: org.signal.chat.backup.CopyMediaResponse.CopySuccess + (*ListMediaResponse_ListEntry)(nil), // 46: org.signal.chat.backup.ListMediaResponse.ListEntry + (*ListMediaResponse_ListResult)(nil), // 47: org.signal.chat.backup.ListMediaResponse.ListResult + (*emptypb.Empty)(nil), // 48: google.protobuf.Empty + (*errors.FailedPrecondition)(nil), // 49: org.signal.chat.errors.FailedPrecondition + (*errors.FailedZkAuthentication)(nil), // 50: org.signal.chat.errors.FailedZkAuthentication + (*common.UploadForm)(nil), // 51: org.signal.chat.common.UploadForm + (*common.ZkCredential)(nil), // 52: org.signal.chat.common.ZkCredential } var file_org_signal_chat_backups_proto_depIdxs = []int32{ - 47, // 0: org.signal.chat.backup.RedeemReceiptResponse.success:type_name -> google.protobuf.Empty - 48, // 1: org.signal.chat.backup.RedeemReceiptResponse.account_missing_commitment:type_name -> org.signal.chat.errors.FailedPrecondition - 48, // 2: org.signal.chat.backup.RedeemReceiptResponse.invalid_receipt:type_name -> org.signal.chat.errors.FailedPrecondition - 31, // 3: org.signal.chat.backup.GetBackupAuthCredentialsResponse.credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials - 6, // 4: org.signal.chat.backup.SetPublicKeyRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 47, // 5: org.signal.chat.backup.SetPublicKeyResponse.success:type_name -> google.protobuf.Empty - 49, // 6: org.signal.chat.backup.SetPublicKeyResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 7: org.signal.chat.backup.GetCdnCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 34, // 8: org.signal.chat.backup.GetCdnCredentialsResponse.cdn_credentials:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials - 49, // 9: org.signal.chat.backup.GetCdnCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 10: org.signal.chat.backup.GetSvrBCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 36, // 11: org.signal.chat.backup.GetSvrBCredentialsResponse.svrb_credentials:type_name -> org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials - 49, // 12: org.signal.chat.backup.GetSvrBCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 13: org.signal.chat.backup.GetBackupInfoRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 37, // 14: org.signal.chat.backup.GetMessageBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo - 49, // 15: org.signal.chat.backup.GetMessageBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 38, // 16: org.signal.chat.backup.GetMediaBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo - 49, // 17: org.signal.chat.backup.GetMediaBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 18: org.signal.chat.backup.RefreshRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 47, // 19: org.signal.chat.backup.RefreshResponse.success:type_name -> google.protobuf.Empty - 49, // 20: org.signal.chat.backup.RefreshResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 21: org.signal.chat.backup.GetUploadFormRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 39, // 22: org.signal.chat.backup.GetUploadFormRequest.messages:type_name -> org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType - 40, // 23: org.signal.chat.backup.GetUploadFormRequest.media:type_name -> org.signal.chat.backup.GetUploadFormRequest.MediaUploadType - 50, // 24: org.signal.chat.backup.GetUploadFormResponse.upload_form:type_name -> org.signal.chat.common.UploadForm - 49, // 25: org.signal.chat.backup.GetUploadFormResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 48, // 26: org.signal.chat.backup.GetUploadFormResponse.exceeds_max_upload_length:type_name -> org.signal.chat.errors.FailedPrecondition - 6, // 27: org.signal.chat.backup.CopyMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 20, // 28: org.signal.chat.backup.CopyMediaRequest.items:type_name -> org.signal.chat.backup.CopyMediaItem - 44, // 29: org.signal.chat.backup.CopyMediaResponse.success:type_name -> org.signal.chat.backup.CopyMediaResponse.CopySuccess - 41, // 30: org.signal.chat.backup.CopyMediaResponse.source_not_found:type_name -> org.signal.chat.backup.CopyMediaResponse.SourceNotFound - 42, // 31: org.signal.chat.backup.CopyMediaResponse.wrong_source_length:type_name -> org.signal.chat.backup.CopyMediaResponse.WrongSourceLength - 43, // 32: org.signal.chat.backup.CopyMediaResponse.out_of_space:type_name -> org.signal.chat.backup.CopyMediaResponse.OutOfSpace - 49, // 33: org.signal.chat.backup.BackupStreamClosed.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 34: org.signal.chat.backup.ListMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 46, // 35: org.signal.chat.backup.ListMediaResponse.list_result:type_name -> org.signal.chat.backup.ListMediaResponse.ListResult - 49, // 36: org.signal.chat.backup.ListMediaResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 37: org.signal.chat.backup.DeleteAllRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 47, // 38: org.signal.chat.backup.DeleteAllResponse.success:type_name -> google.protobuf.Empty - 49, // 39: org.signal.chat.backup.DeleteAllResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 40: org.signal.chat.backup.DeleteMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 28, // 41: org.signal.chat.backup.DeleteMediaRequest.items:type_name -> org.signal.chat.backup.DeleteMediaItem - 28, // 42: org.signal.chat.backup.DeleteMediaResponse.deleted_item:type_name -> org.signal.chat.backup.DeleteMediaItem - 32, // 43: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.message_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry - 33, // 44: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.media_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry - 51, // 45: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential - 51, // 46: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential - 35, // 47: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.headers:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry - 45, // 48: org.signal.chat.backup.ListMediaResponse.ListResult.page:type_name -> org.signal.chat.backup.ListMediaResponse.ListEntry + 48, // 0: org.signal.chat.backup.RedeemReceiptResponse.success:type_name -> google.protobuf.Empty + 49, // 1: org.signal.chat.backup.RedeemReceiptResponse.account_missing_commitment:type_name -> org.signal.chat.errors.FailedPrecondition + 49, // 2: org.signal.chat.backup.RedeemReceiptResponse.invalid_receipt:type_name -> org.signal.chat.errors.FailedPrecondition + 32, // 3: org.signal.chat.backup.GetBackupAuthCredentialsResponse.credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials + 7, // 4: org.signal.chat.backup.SetPublicKeyRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 48, // 5: org.signal.chat.backup.SetPublicKeyResponse.success:type_name -> google.protobuf.Empty + 50, // 6: org.signal.chat.backup.SetPublicKeyResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 7: org.signal.chat.backup.GetCdnCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 35, // 8: org.signal.chat.backup.GetCdnCredentialsResponse.cdn_credentials:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials + 50, // 9: org.signal.chat.backup.GetCdnCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 10: org.signal.chat.backup.GetSvrBCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 37, // 11: org.signal.chat.backup.GetSvrBCredentialsResponse.svrb_credentials:type_name -> org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials + 50, // 12: org.signal.chat.backup.GetSvrBCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 13: org.signal.chat.backup.GetBackupInfoRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 38, // 14: org.signal.chat.backup.GetMessageBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo + 50, // 15: org.signal.chat.backup.GetMessageBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 39, // 16: org.signal.chat.backup.GetMediaBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo + 50, // 17: org.signal.chat.backup.GetMediaBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 18: org.signal.chat.backup.RefreshRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 48, // 19: org.signal.chat.backup.RefreshResponse.success:type_name -> google.protobuf.Empty + 50, // 20: org.signal.chat.backup.RefreshResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 21: org.signal.chat.backup.GetUploadFormRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 40, // 22: org.signal.chat.backup.GetUploadFormRequest.messages:type_name -> org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType + 41, // 23: org.signal.chat.backup.GetUploadFormRequest.media:type_name -> org.signal.chat.backup.GetUploadFormRequest.MediaUploadType + 51, // 24: org.signal.chat.backup.GetUploadFormResponse.upload_form:type_name -> org.signal.chat.common.UploadForm + 50, // 25: org.signal.chat.backup.GetUploadFormResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 49, // 26: org.signal.chat.backup.GetUploadFormResponse.exceeds_max_upload_length:type_name -> org.signal.chat.errors.FailedPrecondition + 7, // 27: org.signal.chat.backup.CopyMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 21, // 28: org.signal.chat.backup.CopyMediaRequest.items:type_name -> org.signal.chat.backup.CopyMediaItem + 45, // 29: org.signal.chat.backup.CopyMediaResponse.success:type_name -> org.signal.chat.backup.CopyMediaResponse.CopySuccess + 42, // 30: org.signal.chat.backup.CopyMediaResponse.source_not_found:type_name -> org.signal.chat.backup.CopyMediaResponse.SourceNotFound + 43, // 31: org.signal.chat.backup.CopyMediaResponse.wrong_source_length:type_name -> org.signal.chat.backup.CopyMediaResponse.WrongSourceLength + 44, // 32: org.signal.chat.backup.CopyMediaResponse.out_of_space:type_name -> org.signal.chat.backup.CopyMediaResponse.OutOfSpace + 50, // 33: org.signal.chat.backup.BackupStreamClosed.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 34: org.signal.chat.backup.ListMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 47, // 35: org.signal.chat.backup.ListMediaResponse.list_result:type_name -> org.signal.chat.backup.ListMediaResponse.ListResult + 50, // 36: org.signal.chat.backup.ListMediaResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 37: org.signal.chat.backup.DeleteAllRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 48, // 38: org.signal.chat.backup.DeleteAllResponse.success:type_name -> google.protobuf.Empty + 50, // 39: org.signal.chat.backup.DeleteAllResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication + 7, // 40: org.signal.chat.backup.DeleteMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation + 29, // 41: org.signal.chat.backup.DeleteMediaRequest.items:type_name -> org.signal.chat.backup.DeleteMediaItem + 29, // 42: org.signal.chat.backup.DeleteMediaResponse.deleted_item:type_name -> org.signal.chat.backup.DeleteMediaItem + 33, // 43: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.message_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry + 34, // 44: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.media_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry + 52, // 45: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential + 52, // 46: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential + 36, // 47: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.headers:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry + 46, // 48: org.signal.chat.backup.ListMediaResponse.ListResult.page:type_name -> org.signal.chat.backup.ListMediaResponse.ListEntry 0, // 49: org.signal.chat.backup.Backups.SetBackupId:input_type -> org.signal.chat.backup.SetBackupIdRequest 2, // 50: org.signal.chat.backup.Backups.RedeemReceipt:input_type -> org.signal.chat.backup.RedeemReceiptRequest 4, // 51: org.signal.chat.backup.Backups.GetBackupAuthCredentials:input_type -> org.signal.chat.backup.GetBackupAuthCredentialsRequest - 9, // 52: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:input_type -> org.signal.chat.backup.GetCdnCredentialsRequest - 11, // 53: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:input_type -> org.signal.chat.backup.GetSvrBCredentialsRequest - 13, // 54: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest - 13, // 55: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest - 7, // 56: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:input_type -> org.signal.chat.backup.SetPublicKeyRequest - 16, // 57: org.signal.chat.backup.BackupsAnonymous.Refresh:input_type -> org.signal.chat.backup.RefreshRequest - 18, // 58: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:input_type -> org.signal.chat.backup.GetUploadFormRequest - 21, // 59: org.signal.chat.backup.BackupsAnonymous.CopyMedia:input_type -> org.signal.chat.backup.CopyMediaRequest - 24, // 60: org.signal.chat.backup.BackupsAnonymous.ListMedia:input_type -> org.signal.chat.backup.ListMediaRequest - 29, // 61: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:input_type -> org.signal.chat.backup.DeleteMediaRequest - 26, // 62: org.signal.chat.backup.BackupsAnonymous.DeleteAll:input_type -> org.signal.chat.backup.DeleteAllRequest - 1, // 63: org.signal.chat.backup.Backups.SetBackupId:output_type -> org.signal.chat.backup.SetBackupIdResponse - 3, // 64: org.signal.chat.backup.Backups.RedeemReceipt:output_type -> org.signal.chat.backup.RedeemReceiptResponse - 5, // 65: org.signal.chat.backup.Backups.GetBackupAuthCredentials:output_type -> org.signal.chat.backup.GetBackupAuthCredentialsResponse - 10, // 66: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:output_type -> org.signal.chat.backup.GetCdnCredentialsResponse - 12, // 67: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:output_type -> org.signal.chat.backup.GetSvrBCredentialsResponse - 14, // 68: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:output_type -> org.signal.chat.backup.GetMessageBackupInfoResponse - 15, // 69: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:output_type -> org.signal.chat.backup.GetMediaBackupInfoResponse - 8, // 70: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:output_type -> org.signal.chat.backup.SetPublicKeyResponse - 17, // 71: org.signal.chat.backup.BackupsAnonymous.Refresh:output_type -> org.signal.chat.backup.RefreshResponse - 19, // 72: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:output_type -> org.signal.chat.backup.GetUploadFormResponse - 22, // 73: org.signal.chat.backup.BackupsAnonymous.CopyMedia:output_type -> org.signal.chat.backup.CopyMediaResponse - 25, // 74: org.signal.chat.backup.BackupsAnonymous.ListMedia:output_type -> org.signal.chat.backup.ListMediaResponse - 30, // 75: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:output_type -> org.signal.chat.backup.DeleteMediaResponse - 27, // 76: org.signal.chat.backup.BackupsAnonymous.DeleteAll:output_type -> org.signal.chat.backup.DeleteAllResponse - 63, // [63:77] is the sub-list for method output_type - 49, // [49:63] is the sub-list for method input_type + 48, // 52: org.signal.chat.backup.Backups.GetBackupIdLimits:input_type -> google.protobuf.Empty + 10, // 53: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:input_type -> org.signal.chat.backup.GetCdnCredentialsRequest + 12, // 54: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:input_type -> org.signal.chat.backup.GetSvrBCredentialsRequest + 14, // 55: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest + 14, // 56: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest + 8, // 57: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:input_type -> org.signal.chat.backup.SetPublicKeyRequest + 17, // 58: org.signal.chat.backup.BackupsAnonymous.Refresh:input_type -> org.signal.chat.backup.RefreshRequest + 19, // 59: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:input_type -> org.signal.chat.backup.GetUploadFormRequest + 22, // 60: org.signal.chat.backup.BackupsAnonymous.CopyMedia:input_type -> org.signal.chat.backup.CopyMediaRequest + 25, // 61: org.signal.chat.backup.BackupsAnonymous.ListMedia:input_type -> org.signal.chat.backup.ListMediaRequest + 30, // 62: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:input_type -> org.signal.chat.backup.DeleteMediaRequest + 27, // 63: org.signal.chat.backup.BackupsAnonymous.DeleteAll:input_type -> org.signal.chat.backup.DeleteAllRequest + 1, // 64: org.signal.chat.backup.Backups.SetBackupId:output_type -> org.signal.chat.backup.SetBackupIdResponse + 3, // 65: org.signal.chat.backup.Backups.RedeemReceipt:output_type -> org.signal.chat.backup.RedeemReceiptResponse + 5, // 66: org.signal.chat.backup.Backups.GetBackupAuthCredentials:output_type -> org.signal.chat.backup.GetBackupAuthCredentialsResponse + 6, // 67: org.signal.chat.backup.Backups.GetBackupIdLimits:output_type -> org.signal.chat.backup.GetBackupIdLimitsResponse + 11, // 68: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:output_type -> org.signal.chat.backup.GetCdnCredentialsResponse + 13, // 69: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:output_type -> org.signal.chat.backup.GetSvrBCredentialsResponse + 15, // 70: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:output_type -> org.signal.chat.backup.GetMessageBackupInfoResponse + 16, // 71: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:output_type -> org.signal.chat.backup.GetMediaBackupInfoResponse + 9, // 72: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:output_type -> org.signal.chat.backup.SetPublicKeyResponse + 18, // 73: org.signal.chat.backup.BackupsAnonymous.Refresh:output_type -> org.signal.chat.backup.RefreshResponse + 20, // 74: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:output_type -> org.signal.chat.backup.GetUploadFormResponse + 23, // 75: org.signal.chat.backup.BackupsAnonymous.CopyMedia:output_type -> org.signal.chat.backup.CopyMediaResponse + 26, // 76: org.signal.chat.backup.BackupsAnonymous.ListMedia:output_type -> org.signal.chat.backup.ListMediaResponse + 31, // 77: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:output_type -> org.signal.chat.backup.DeleteMediaResponse + 28, // 78: org.signal.chat.backup.BackupsAnonymous.DeleteAll:output_type -> org.signal.chat.backup.DeleteAllResponse + 64, // [64:79] is the sub-list for method output_type + 49, // [49:64] is the sub-list for method input_type 49, // [49:49] is the sub-list for extension type_name 49, // [49:49] is the sub-list for extension extendee 0, // [0:49] is the sub-list for field type_name @@ -3196,65 +3257,65 @@ func file_org_signal_chat_backups_proto_init() { (*RedeemReceiptResponse_AccountMissingCommitment)(nil), (*RedeemReceiptResponse_InvalidReceipt)(nil), } - file_org_signal_chat_backups_proto_msgTypes[8].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[9].OneofWrappers = []any{ (*SetPublicKeyResponse_Success)(nil), (*SetPublicKeyResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[10].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[11].OneofWrappers = []any{ (*GetCdnCredentialsResponse_CdnCredentials_)(nil), (*GetCdnCredentialsResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[12].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[13].OneofWrappers = []any{ (*GetSvrBCredentialsResponse_SvrbCredentials)(nil), (*GetSvrBCredentialsResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[14].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[15].OneofWrappers = []any{ (*GetMessageBackupInfoResponse_BackupInfo)(nil), (*GetMessageBackupInfoResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[15].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[16].OneofWrappers = []any{ (*GetMediaBackupInfoResponse_BackupInfo)(nil), (*GetMediaBackupInfoResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[17].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[18].OneofWrappers = []any{ (*RefreshResponse_Success)(nil), (*RefreshResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[18].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[19].OneofWrappers = []any{ (*GetUploadFormRequest_Messages)(nil), (*GetUploadFormRequest_Media)(nil), } - file_org_signal_chat_backups_proto_msgTypes[19].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[20].OneofWrappers = []any{ (*GetUploadFormResponse_UploadForm)(nil), (*GetUploadFormResponse_FailedAuthentication)(nil), (*GetUploadFormResponse_ExceedsMaxUploadLength)(nil), } - file_org_signal_chat_backups_proto_msgTypes[22].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[23].OneofWrappers = []any{ (*CopyMediaResponse_Success)(nil), (*CopyMediaResponse_SourceNotFound_)(nil), (*CopyMediaResponse_WrongSourceLength_)(nil), (*CopyMediaResponse_OutOfSpace_)(nil), } - file_org_signal_chat_backups_proto_msgTypes[23].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[24].OneofWrappers = []any{ (*BackupStreamClosed_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[24].OneofWrappers = []any{} - file_org_signal_chat_backups_proto_msgTypes[25].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[25].OneofWrappers = []any{} + file_org_signal_chat_backups_proto_msgTypes[26].OneofWrappers = []any{ (*ListMediaResponse_ListResult_)(nil), (*ListMediaResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[27].OneofWrappers = []any{ + file_org_signal_chat_backups_proto_msgTypes[28].OneofWrappers = []any{ (*DeleteAllResponse_Success)(nil), (*DeleteAllResponse_FailedAuthentication)(nil), } - file_org_signal_chat_backups_proto_msgTypes[46].OneofWrappers = []any{} + file_org_signal_chat_backups_proto_msgTypes[47].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_backups_proto_rawDesc), len(file_org_signal_chat_backups_proto_rawDesc)), NumEnums: 0, - NumMessages: 47, + NumMessages: 48, NumExtensions: 0, NumServices: 2, }, diff --git a/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go index b7079e3..137e6c4 100644 --- a/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go @@ -15,6 +15,7 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file @@ -26,6 +27,7 @@ const ( Backups_SetBackupId_FullMethodName = "/org.signal.chat.backup.Backups/SetBackupId" Backups_RedeemReceipt_FullMethodName = "/org.signal.chat.backup.Backups/RedeemReceipt" Backups_GetBackupAuthCredentials_FullMethodName = "/org.signal.chat.backup.Backups/GetBackupAuthCredentials" + Backups_GetBackupIdLimits_FullMethodName = "/org.signal.chat.backup.Backups/GetBackupIdLimits" ) // BackupsClient is the client API for Backups service. @@ -72,6 +74,8 @@ type BackupsClient interface { // Clients must validate the receipt level on the credential matches a known // receipt level before using it. GetBackupAuthCredentials(ctx context.Context, in *GetBackupAuthCredentialsRequest, opts ...grpc.CallOption) (*GetBackupAuthCredentialsResponse, error) + // Retrieve backup ID rotation limits + GetBackupIdLimits(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBackupIdLimitsResponse, error) } type backupsClient struct { @@ -112,6 +116,16 @@ func (c *backupsClient) GetBackupAuthCredentials(ctx context.Context, in *GetBac return out, nil } +func (c *backupsClient) GetBackupIdLimits(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBackupIdLimitsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBackupIdLimitsResponse) + err := c.cc.Invoke(ctx, Backups_GetBackupIdLimits_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // BackupsServer is the server API for Backups service. // All implementations must embed UnimplementedBackupsServer // for forward compatibility. @@ -156,6 +170,8 @@ type BackupsServer interface { // Clients must validate the receipt level on the credential matches a known // receipt level before using it. GetBackupAuthCredentials(context.Context, *GetBackupAuthCredentialsRequest) (*GetBackupAuthCredentialsResponse, error) + // Retrieve backup ID rotation limits + GetBackupIdLimits(context.Context, *emptypb.Empty) (*GetBackupIdLimitsResponse, error) mustEmbedUnimplementedBackupsServer() } @@ -175,6 +191,9 @@ func (UnimplementedBackupsServer) RedeemReceipt(context.Context, *RedeemReceiptR func (UnimplementedBackupsServer) GetBackupAuthCredentials(context.Context, *GetBackupAuthCredentialsRequest) (*GetBackupAuthCredentialsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetBackupAuthCredentials not implemented") } +func (UnimplementedBackupsServer) GetBackupIdLimits(context.Context, *emptypb.Empty) (*GetBackupIdLimitsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetBackupIdLimits not implemented") +} func (UnimplementedBackupsServer) mustEmbedUnimplementedBackupsServer() {} func (UnimplementedBackupsServer) testEmbeddedByValue() {} @@ -250,6 +269,24 @@ func _Backups_GetBackupAuthCredentials_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _Backups_GetBackupIdLimits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BackupsServer).GetBackupIdLimits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Backups_GetBackupIdLimits_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BackupsServer).GetBackupIdLimits(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + // Backups_ServiceDesc is the grpc.ServiceDesc for Backups service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -269,6 +306,10 @@ var Backups_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetBackupAuthCredentials", Handler: _Backups_GetBackupAuthCredentials_Handler, }, + { + MethodName: "GetBackupIdLimits", + Handler: _Backups_GetBackupIdLimits_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "org/signal/chat/backups.proto", diff --git a/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go b/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go index 3643365..b6b5a57 100644 --- a/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go +++ b/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go @@ -11,9 +11,12 @@ package challenge import ( + errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" + _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" unsafe "unsafe" @@ -163,6 +166,127 @@ func (x *AnswerChallengeResponse) GetSuccess() bool { return false } +type RequestPushChallengeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestPushChallengeRequest) Reset() { + *x = RequestPushChallengeRequest{} + mi := &file_org_signal_chat_challenge_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestPushChallengeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestPushChallengeRequest) ProtoMessage() {} + +func (x *RequestPushChallengeRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_challenge_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestPushChallengeRequest.ProtoReflect.Descriptor instead. +func (*RequestPushChallengeRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{2} +} + +type RequestPushChallengeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *RequestPushChallengeResponse_SentPushChallenge_ + // *RequestPushChallengeResponse_NoPushToken + Response isRequestPushChallengeResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestPushChallengeResponse) Reset() { + *x = RequestPushChallengeResponse{} + mi := &file_org_signal_chat_challenge_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestPushChallengeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestPushChallengeResponse) ProtoMessage() {} + +func (x *RequestPushChallengeResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_challenge_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestPushChallengeResponse.ProtoReflect.Descriptor instead. +func (*RequestPushChallengeResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{3} +} + +func (x *RequestPushChallengeResponse) GetResponse() isRequestPushChallengeResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *RequestPushChallengeResponse) GetSentPushChallenge() *emptypb.Empty { + if x != nil { + if x, ok := x.Response.(*RequestPushChallengeResponse_SentPushChallenge_); ok { + return x.SentPushChallenge + } + } + return nil +} + +func (x *RequestPushChallengeResponse) GetNoPushToken() *errors.FailedPrecondition { + if x != nil { + if x, ok := x.Response.(*RequestPushChallengeResponse_NoPushToken); ok { + return x.NoPushToken + } + } + return nil +} + +type isRequestPushChallengeResponse_Response interface { + isRequestPushChallengeResponse_Response() +} + +type RequestPushChallengeResponse_SentPushChallenge_ struct { + // The server attempted to send a challenge value to the authenticated + // account's primary device via a push notification. + SentPushChallenge *emptypb.Empty `protobuf:"bytes,1,opt,name=sent_push_challenge,json=sentPushChallenge,proto3,oneof"` +} + +type RequestPushChallengeResponse_NoPushToken struct { + // The authenticated account's primary device does not have a push token. + NoPushToken *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=no_push_token,json=noPushToken,proto3,oneof"` +} + +func (*RequestPushChallengeResponse_SentPushChallenge_) isRequestPushChallengeResponse_Response() {} + +func (*RequestPushChallengeResponse_NoPushToken) isRequestPushChallengeResponse_Response() {} + type AnswerChallengeRequest_AnswerPushChallengeRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // The challenge string provided to the client via a push payload @@ -173,7 +297,7 @@ type AnswerChallengeRequest_AnswerPushChallengeRequest struct { func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) Reset() { *x = AnswerChallengeRequest_AnswerPushChallengeRequest{} - mi := &file_org_signal_chat_challenge_proto_msgTypes[2] + mi := &file_org_signal_chat_challenge_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -185,7 +309,7 @@ func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) String() string { func (*AnswerChallengeRequest_AnswerPushChallengeRequest) ProtoMessage() {} func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_challenge_proto_msgTypes[2] + mi := &file_org_signal_chat_challenge_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -219,7 +343,7 @@ type AnswerChallengeRequest_AnswerCaptchaChallengeRequest struct { func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) Reset() { *x = AnswerChallengeRequest_AnswerCaptchaChallengeRequest{} - mi := &file_org_signal_chat_challenge_proto_msgTypes[3] + mi := &file_org_signal_chat_challenge_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -231,7 +355,7 @@ func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) String() string { func (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest) ProtoMessage() {} func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_challenge_proto_msgTypes[3] + mi := &file_org_signal_chat_challenge_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -254,11 +378,47 @@ func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) GetCaptcha() stri return "" } +type RequestPushChallengeResponse_SentPushChallenge struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestPushChallengeResponse_SentPushChallenge) Reset() { + *x = RequestPushChallengeResponse_SentPushChallenge{} + mi := &file_org_signal_chat_challenge_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestPushChallengeResponse_SentPushChallenge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestPushChallengeResponse_SentPushChallenge) ProtoMessage() {} + +func (x *RequestPushChallengeResponse_SentPushChallenge) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_challenge_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestPushChallengeResponse_SentPushChallenge.ProtoReflect.Descriptor instead. +func (*RequestPushChallengeResponse_SentPushChallenge) Descriptor() ([]byte, []int) { + return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{3, 0} +} + var File_org_signal_chat_challenge_proto protoreflect.FileDescriptor const file_org_signal_chat_challenge_proto_rawDesc = "" + "\n" + - "\x1forg/signal/chat/challenge.proto\x12\x19org.signal.chat.challenge\x1a\x1dorg/signal/chat/require.proto\"\x93\x03\n" + + "\x1forg/signal/chat/challenge.proto\x12\x19org.signal.chat.challenge\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\x93\x03\n" + "\x16AnswerChallengeRequest\x12\x1a\n" + "\x05token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x05token\x12b\n" + "\x04push\x18\x02 \x01(\v2L.org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequestH\x00R\x04push\x12k\n" + @@ -269,9 +429,17 @@ const file_org_signal_chat_challenge_proto_rawDesc = "" + "\acaptcha\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\acaptchaB\t\n" + "\arequest\"3\n" + "\x17AnswerChallengeResponse\x12\x18\n" + - "\asuccess\x18\x01 \x01(\bR\asuccess2\x96\x01\n" + - "\tChallenge\x12\x82\x01\n" + - "\x17HandleChallengeResponse\x121.org.signal.chat.challenge.AnswerChallengeRequest\x1a2.org.signal.chat.challenge.AnswerChallengeResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" + "\asuccess\x18\x01 \x01(\bR\asuccess\"\x1d\n" + + "\x1bRequestPushChallengeRequest\"\xee\x01\n" + + "\x1cRequestPushChallengeResponse\x12H\n" + + "\x13sent_push_challenge\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x11sentPushChallenge\x12c\n" + + "\rno_push_token\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x11\xc2\xd5\"\rno_push_tokenH\x00R\vnoPushToken\x1a\x13\n" + + "\x11SentPushChallengeB\n" + + "\n" + + "\bresponse2\x99\x02\n" + + "\tChallenge\x12z\n" + + "\x0fAnswerChallenge\x121.org.signal.chat.challenge.AnswerChallengeRequest\x1a2.org.signal.chat.challenge.AnswerChallengeResponse\"\x00\x12\x89\x01\n" + + "\x14RequestPushChallenge\x126.org.signal.chat.challenge.RequestPushChallengeRequest\x1a7.org.signal.chat.challenge.RequestPushChallengeResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" var ( file_org_signal_chat_challenge_proto_rawDescOnce sync.Once @@ -285,23 +453,32 @@ func file_org_signal_chat_challenge_proto_rawDescGZIP() []byte { return file_org_signal_chat_challenge_proto_rawDescData } -var file_org_signal_chat_challenge_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_org_signal_chat_challenge_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_org_signal_chat_challenge_proto_goTypes = []any{ (*AnswerChallengeRequest)(nil), // 0: org.signal.chat.challenge.AnswerChallengeRequest (*AnswerChallengeResponse)(nil), // 1: org.signal.chat.challenge.AnswerChallengeResponse - (*AnswerChallengeRequest_AnswerPushChallengeRequest)(nil), // 2: org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest - (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest)(nil), // 3: org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest + (*RequestPushChallengeRequest)(nil), // 2: org.signal.chat.challenge.RequestPushChallengeRequest + (*RequestPushChallengeResponse)(nil), // 3: org.signal.chat.challenge.RequestPushChallengeResponse + (*AnswerChallengeRequest_AnswerPushChallengeRequest)(nil), // 4: org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest + (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest)(nil), // 5: org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest + (*RequestPushChallengeResponse_SentPushChallenge)(nil), // 6: org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge + (*emptypb.Empty)(nil), // 7: google.protobuf.Empty + (*errors.FailedPrecondition)(nil), // 8: org.signal.chat.errors.FailedPrecondition } var file_org_signal_chat_challenge_proto_depIdxs = []int32{ - 2, // 0: org.signal.chat.challenge.AnswerChallengeRequest.push:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest - 3, // 1: org.signal.chat.challenge.AnswerChallengeRequest.captcha:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest - 0, // 2: org.signal.chat.challenge.Challenge.HandleChallengeResponse:input_type -> org.signal.chat.challenge.AnswerChallengeRequest - 1, // 3: org.signal.chat.challenge.Challenge.HandleChallengeResponse:output_type -> org.signal.chat.challenge.AnswerChallengeResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 4, // 0: org.signal.chat.challenge.AnswerChallengeRequest.push:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest + 5, // 1: org.signal.chat.challenge.AnswerChallengeRequest.captcha:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest + 7, // 2: org.signal.chat.challenge.RequestPushChallengeResponse.sent_push_challenge:type_name -> google.protobuf.Empty + 8, // 3: org.signal.chat.challenge.RequestPushChallengeResponse.no_push_token:type_name -> org.signal.chat.errors.FailedPrecondition + 0, // 4: org.signal.chat.challenge.Challenge.AnswerChallenge:input_type -> org.signal.chat.challenge.AnswerChallengeRequest + 2, // 5: org.signal.chat.challenge.Challenge.RequestPushChallenge:input_type -> org.signal.chat.challenge.RequestPushChallengeRequest + 1, // 6: org.signal.chat.challenge.Challenge.AnswerChallenge:output_type -> org.signal.chat.challenge.AnswerChallengeResponse + 3, // 7: org.signal.chat.challenge.Challenge.RequestPushChallenge:output_type -> org.signal.chat.challenge.RequestPushChallengeResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_org_signal_chat_challenge_proto_init() } @@ -313,13 +490,17 @@ func file_org_signal_chat_challenge_proto_init() { (*AnswerChallengeRequest_Push)(nil), (*AnswerChallengeRequest_Captcha)(nil), } + file_org_signal_chat_challenge_proto_msgTypes[3].OneofWrappers = []any{ + (*RequestPushChallengeResponse_SentPushChallenge_)(nil), + (*RequestPushChallengeResponse_NoPushToken)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_challenge_proto_rawDesc), len(file_org_signal_chat_challenge_proto_rawDesc)), NumEnums: 0, - NumMessages: 4, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go index e242637..62003d7 100644 --- a/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go @@ -23,18 +23,45 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Challenge_HandleChallengeResponse_FullMethodName = "/org.signal.chat.challenge.Challenge/HandleChallengeResponse" + Challenge_AnswerChallenge_FullMethodName = "/org.signal.chat.challenge.Challenge/AnswerChallenge" + Challenge_RequestPushChallenge_FullMethodName = "/org.signal.chat.challenge.Challenge/RequestPushChallenge" ) // ChallengeClient is the client API for Challenge service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ChallengeClient interface { - // Some server endpoints (the "send message" endpoint, for example) may return - // a response indicating the client must complete a challenge before continuing. - // Clients may use this endpoint to provide proof of a completed challenge. - // If successful, the client may then continue their original operation. - HandleChallengeResponse(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) + // Submit proof of a challenge completion. + // + // Some server endpoints (the "send message" endpoint, for example) may return + // a response indicating the client must complete a challenge before continuing. + // Clients may use this endpoint to provide proof of a completed challenge. + // If successful, the client may then continue their original operation. + AnswerChallenge(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) + // Requests that a challenge value be sent to the authenticated account's + // primary device via push notification. Once received, callers may present + // the challenge value via the HandleChallengeResponse RPC. + // + // APNs challenge payloads will be formatted as follows: + // + // ``` + // { + // "aps": { + // "sound": "default", + // "alert": { + // "loc-key": "APN_Message" + // } + // }, + // "rateLimitChallenge": "{CHALLENGE_TOKEN}" + // } + // ``` + // + // FCM challenge payloads will be formatted as follows: + // + // ``` + // {"rateLimitChallenge": "{CHALLENGE_TOKEN}"} + // ``` + RequestPushChallenge(ctx context.Context, in *RequestPushChallengeRequest, opts ...grpc.CallOption) (*RequestPushChallengeResponse, error) } type challengeClient struct { @@ -45,10 +72,20 @@ func NewChallengeClient(cc grpc.ClientConnInterface) ChallengeClient { return &challengeClient{cc} } -func (c *challengeClient) HandleChallengeResponse(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) { +func (c *challengeClient) AnswerChallenge(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AnswerChallengeResponse) - err := c.cc.Invoke(ctx, Challenge_HandleChallengeResponse_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Challenge_AnswerChallenge_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *challengeClient) RequestPushChallenge(ctx context.Context, in *RequestPushChallengeRequest, opts ...grpc.CallOption) (*RequestPushChallengeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RequestPushChallengeResponse) + err := c.cc.Invoke(ctx, Challenge_RequestPushChallenge_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -59,11 +96,37 @@ func (c *challengeClient) HandleChallengeResponse(ctx context.Context, in *Answe // All implementations must embed UnimplementedChallengeServer // for forward compatibility. type ChallengeServer interface { - // Some server endpoints (the "send message" endpoint, for example) may return - // a response indicating the client must complete a challenge before continuing. - // Clients may use this endpoint to provide proof of a completed challenge. - // If successful, the client may then continue their original operation. - HandleChallengeResponse(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) + // Submit proof of a challenge completion. + // + // Some server endpoints (the "send message" endpoint, for example) may return + // a response indicating the client must complete a challenge before continuing. + // Clients may use this endpoint to provide proof of a completed challenge. + // If successful, the client may then continue their original operation. + AnswerChallenge(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) + // Requests that a challenge value be sent to the authenticated account's + // primary device via push notification. Once received, callers may present + // the challenge value via the HandleChallengeResponse RPC. + // + // APNs challenge payloads will be formatted as follows: + // + // ``` + // { + // "aps": { + // "sound": "default", + // "alert": { + // "loc-key": "APN_Message" + // } + // }, + // "rateLimitChallenge": "{CHALLENGE_TOKEN}" + // } + // ``` + // + // FCM challenge payloads will be formatted as follows: + // + // ``` + // {"rateLimitChallenge": "{CHALLENGE_TOKEN}"} + // ``` + RequestPushChallenge(context.Context, *RequestPushChallengeRequest) (*RequestPushChallengeResponse, error) mustEmbedUnimplementedChallengeServer() } @@ -74,8 +137,11 @@ type ChallengeServer interface { // pointer dereference when methods are called. type UnimplementedChallengeServer struct{} -func (UnimplementedChallengeServer) HandleChallengeResponse(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) { - return nil, status.Error(codes.Unimplemented, "method HandleChallengeResponse not implemented") +func (UnimplementedChallengeServer) AnswerChallenge(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AnswerChallenge not implemented") +} +func (UnimplementedChallengeServer) RequestPushChallenge(context.Context, *RequestPushChallengeRequest) (*RequestPushChallengeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RequestPushChallenge not implemented") } func (UnimplementedChallengeServer) mustEmbedUnimplementedChallengeServer() {} func (UnimplementedChallengeServer) testEmbeddedByValue() {} @@ -98,20 +164,38 @@ func RegisterChallengeServer(s grpc.ServiceRegistrar, srv ChallengeServer) { s.RegisterService(&Challenge_ServiceDesc, srv) } -func _Challenge_HandleChallengeResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Challenge_AnswerChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AnswerChallengeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ChallengeServer).HandleChallengeResponse(ctx, in) + return srv.(ChallengeServer).AnswerChallenge(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Challenge_HandleChallengeResponse_FullMethodName, + FullMethod: Challenge_AnswerChallenge_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChallengeServer).HandleChallengeResponse(ctx, req.(*AnswerChallengeRequest)) + return srv.(ChallengeServer).AnswerChallenge(ctx, req.(*AnswerChallengeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Challenge_RequestPushChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestPushChallengeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChallengeServer).RequestPushChallenge(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Challenge_RequestPushChallenge_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChallengeServer).RequestPushChallenge(ctx, req.(*RequestPushChallengeRequest)) } return interceptor(ctx, in, info, handler) } @@ -124,8 +208,12 @@ var Challenge_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*ChallengeServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "HandleChallengeResponse", - Handler: _Challenge_HandleChallengeResponse_Handler, + MethodName: "AnswerChallenge", + Handler: _Challenge_AnswerChallenge_Handler, + }, + { + MethodName: "RequestPushChallenge", + Handler: _Challenge_RequestPushChallenge_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go b/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go index 569347f..5b4b0fb 100644 --- a/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go +++ b/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go @@ -11,6 +11,7 @@ package credentials import ( + common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -497,10 +498,10 @@ type GetGroupCredentialsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // A collection of credentials allowing the holder to anonymously // authenticate themselves for group-related actions - GroupCredentials []*GetGroupCredentialsResponse_CredentialAndRedemptionTime `protobuf:"bytes,1,rep,name=group_credentials,json=groupCredentials,proto3" json:"group_credentials,omitempty"` + GroupCredentials []*common.ZkCredential `protobuf:"bytes,1,rep,name=group_credentials,json=groupCredentials,proto3" json:"group_credentials,omitempty"` // A collection of credentials allowing the holder to read, update, and delete // group call links - CallLinkAuthCredentials []*GetGroupCredentialsResponse_CredentialAndRedemptionTime `protobuf:"bytes,2,rep,name=call_link_auth_credentials,json=callLinkAuthCredentials,proto3" json:"call_link_auth_credentials,omitempty"` + CallLinkAuthCredentials []*common.ZkCredential `protobuf:"bytes,2,rep,name=call_link_auth_credentials,json=callLinkAuthCredentials,proto3" json:"call_link_auth_credentials,omitempty"` // The phone number identifier for which the included credentials were // generated. Empty if the account does not have a phone number. Pni []byte `protobuf:"bytes,3,opt,name=pni,proto3" json:"pni,omitempty"` @@ -538,14 +539,14 @@ func (*GetGroupCredentialsResponse) Descriptor() ([]byte, []int) { return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{7} } -func (x *GetGroupCredentialsResponse) GetGroupCredentials() []*GetGroupCredentialsResponse_CredentialAndRedemptionTime { +func (x *GetGroupCredentialsResponse) GetGroupCredentials() []*common.ZkCredential { if x != nil { return x.GroupCredentials } return nil } -func (x *GetGroupCredentialsResponse) GetCallLinkAuthCredentials() []*GetGroupCredentialsResponse_CredentialAndRedemptionTime { +func (x *GetGroupCredentialsResponse) GetCallLinkAuthCredentials() []*common.ZkCredential { if x != nil { return x.CallLinkAuthCredentials } @@ -559,7 +560,7 @@ func (x *GetGroupCredentialsResponse) GetPni() []byte { return nil } -type GetCreateCallLinkCredentialsRequest struct { +type GetCreateCallLinkCredentialRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // A zero-knowledge credential request CredentialRequest []byte `protobuf:"bytes,1,opt,name=credential_request,json=credentialRequest,proto3" json:"credential_request,omitempty"` @@ -567,20 +568,20 @@ type GetCreateCallLinkCredentialsRequest struct { sizeCache protoimpl.SizeCache } -func (x *GetCreateCallLinkCredentialsRequest) Reset() { - *x = GetCreateCallLinkCredentialsRequest{} +func (x *GetCreateCallLinkCredentialRequest) Reset() { + *x = GetCreateCallLinkCredentialRequest{} mi := &file_org_signal_chat_credentials_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetCreateCallLinkCredentialsRequest) String() string { +func (x *GetCreateCallLinkCredentialRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCreateCallLinkCredentialsRequest) ProtoMessage() {} +func (*GetCreateCallLinkCredentialRequest) ProtoMessage() {} -func (x *GetCreateCallLinkCredentialsRequest) ProtoReflect() protoreflect.Message { +func (x *GetCreateCallLinkCredentialRequest) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_credentials_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -592,44 +593,41 @@ func (x *GetCreateCallLinkCredentialsRequest) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use GetCreateCallLinkCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetCreateCallLinkCredentialsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetCreateCallLinkCredentialRequest.ProtoReflect.Descriptor instead. +func (*GetCreateCallLinkCredentialRequest) Descriptor() ([]byte, []int) { return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{8} } -func (x *GetCreateCallLinkCredentialsRequest) GetCredentialRequest() []byte { +func (x *GetCreateCallLinkCredentialRequest) GetCredentialRequest() []byte { if x != nil { return x.CredentialRequest } return nil } -type GetCreateCallLinkCredentialsResponse struct { +type GetCreateCallLinkCredentialResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // A zero-knowledge credential that may be redeemed at or up to one day after // the given redemption time - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - // The earliest time, in seconds since the epoch, at which the associated - // credential may be redeemed - RedemptionTimeSeconds uint64 `protobuf:"varint,2,opt,name=redemption_time_seconds,json=redemptionTimeSeconds,proto3" json:"redemption_time_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetCreateCallLinkCredentialsResponse) Reset() { - *x = GetCreateCallLinkCredentialsResponse{} +func (x *GetCreateCallLinkCredentialResponse) Reset() { + *x = GetCreateCallLinkCredentialResponse{} mi := &file_org_signal_chat_credentials_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetCreateCallLinkCredentialsResponse) String() string { +func (x *GetCreateCallLinkCredentialResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCreateCallLinkCredentialsResponse) ProtoMessage() {} +func (*GetCreateCallLinkCredentialResponse) ProtoMessage() {} -func (x *GetCreateCallLinkCredentialsResponse) ProtoReflect() protoreflect.Message { +func (x *GetCreateCallLinkCredentialResponse) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_credentials_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -641,84 +639,23 @@ func (x *GetCreateCallLinkCredentialsResponse) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use GetCreateCallLinkCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetCreateCallLinkCredentialsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetCreateCallLinkCredentialResponse.ProtoReflect.Descriptor instead. +func (*GetCreateCallLinkCredentialResponse) Descriptor() ([]byte, []int) { return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{9} } -func (x *GetCreateCallLinkCredentialsResponse) GetCredential() []byte { +func (x *GetCreateCallLinkCredentialResponse) GetCredential() []byte { if x != nil { return x.Credential } return nil } -func (x *GetCreateCallLinkCredentialsResponse) GetRedemptionTimeSeconds() uint64 { - if x != nil { - return x.RedemptionTimeSeconds - } - return 0 -} - -// A zero-knowledge credential that may be redeemed at or up to one day after -// the given redemption time -type GetGroupCredentialsResponse_CredentialAndRedemptionTime struct { - state protoimpl.MessageState `protogen:"open.v1"` - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - RedemptionTimeSeconds uint64 `protobuf:"varint,2,opt,name=redemption_time_seconds,json=redemptionTimeSeconds,proto3" json:"redemption_time_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) Reset() { - *x = GetGroupCredentialsResponse_CredentialAndRedemptionTime{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupCredentialsResponse_CredentialAndRedemptionTime) ProtoMessage() {} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGroupCredentialsResponse_CredentialAndRedemptionTime.ProtoReflect.Descriptor instead. -func (*GetGroupCredentialsResponse_CredentialAndRedemptionTime) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) GetCredential() []byte { - if x != nil { - return x.Credential - } - return nil -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) GetRedemptionTimeSeconds() uint64 { - if x != nil { - return x.RedemptionTimeSeconds - } - return 0 -} - var File_org_signal_chat_credentials_proto protoreflect.FileDescriptor const file_org_signal_chat_credentials_proto_rawDesc = "" + "\n" + - "!org/signal/chat/credentials.proto\x12\x1borg.signal.chat.credentials\x1a\x1dorg/signal/chat/require.proto\"\x82\x01\n" + + "!org/signal/chat/credentials.proto\x12\x1borg.signal.chat.credentials\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\"\x82\x01\n" + "$GetExternalServiceCredentialsRequest\x12Z\n" + "\x0fexternalService\x18\x01 \x01(\x0e20.org.signal.chat.credentials.ExternalServiceTypeR\x0fexternalService\"_\n" + "%GetExternalServiceCredentialsResponse\x12\x1a\n" + @@ -740,23 +677,17 @@ const file_org_signal_chat_credentials_proto_rawDesc = "" + "\x18certificate_without_e164\x18\x02 \x01(\fR\x16certificateWithoutE164\"\x8c\x01\n" + "\x1aGetGroupCredentialsRequest\x128\n" + "\x18redemption_start_seconds\x18\x01 \x01(\x04R\x16redemptionStartSeconds\x124\n" + - "\x16redemption_end_seconds\x18\x02 \x01(\x04R\x14redemptionEndSeconds\"\xbe\x03\n" + - "\x1bGetGroupCredentialsResponse\x12\x81\x01\n" + - "\x11group_credentials\x18\x01 \x03(\v2T.org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTimeR\x10groupCredentials\x12\x91\x01\n" + - "\x1acall_link_auth_credentials\x18\x02 \x03(\v2T.org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTimeR\x17callLinkAuthCredentials\x12\x10\n" + - "\x03pni\x18\x03 \x01(\fR\x03pni\x1au\n" + - "\x1bCredentialAndRedemptionTime\x12\x1e\n" + + "\x16redemption_end_seconds\x18\x02 \x01(\x04R\x14redemptionEndSeconds\"\xe5\x01\n" + + "\x1bGetGroupCredentialsResponse\x12Q\n" + + "\x11group_credentials\x18\x01 \x03(\v2$.org.signal.chat.common.ZkCredentialR\x10groupCredentials\x12a\n" + + "\x1acall_link_auth_credentials\x18\x02 \x03(\v2$.org.signal.chat.common.ZkCredentialR\x17callLinkAuthCredentials\x12\x10\n" + + "\x03pni\x18\x03 \x01(\fR\x03pni\"S\n" + + "\"GetCreateCallLinkCredentialRequest\x12-\n" + + "\x12credential_request\x18\x01 \x01(\fR\x11credentialRequest\"E\n" + + "#GetCreateCallLinkCredentialResponse\x12\x1e\n" + "\n" + "credential\x18\x01 \x01(\fR\n" + - "credential\x126\n" + - "\x17redemption_time_seconds\x18\x02 \x01(\x04R\x15redemptionTimeSeconds\"T\n" + - "#GetCreateCallLinkCredentialsRequest\x12-\n" + - "\x12credential_request\x18\x01 \x01(\fR\x11credentialRequest\"~\n" + - "$GetCreateCallLinkCredentialsResponse\x12\x1e\n" + - "\n" + - "credential\x18\x01 \x01(\fR\n" + - "credential\x126\n" + - "\x17redemption_time_seconds\x18\x02 \x01(\x04R\x15redemptionTimeSeconds*\xc7\x01\n" + + "credential*\xc7\x01\n" + "\x13ExternalServiceType\x12%\n" + "!EXTERNAL_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12#\n" + "\x1fEXTERNAL_SERVICE_TYPE_DIRECTORY\x10\x01\x12\"\n" + @@ -767,12 +698,12 @@ const file_org_signal_chat_credentials_proto_rawDesc = "" + "\x1dAUTH_CHECK_RESULT_UNSPECIFIED\x10\x00\x12\x1b\n" + "\x17AUTH_CHECK_RESULT_MATCH\x10\x01\x12\x1e\n" + "\x1aAUTH_CHECK_RESULT_NO_MATCH\x10\x02\x12\x1d\n" + - "\x19AUTH_CHECK_RESULT_INVALID\x10\x032\x89\x05\n" + + "\x19AUTH_CHECK_RESULT_INVALID\x10\x032\x86\x05\n" + "\vCredentials\x12\xa8\x01\n" + "\x1dGetExternalServiceCredentials\x12A.org.signal.chat.credentials.GetExternalServiceCredentialsRequest\x1aB.org.signal.chat.credentials.GetExternalServiceCredentialsResponse\"\x00\x12\x93\x01\n" + "\x16GetDeliveryCertificate\x12:.org.signal.chat.credentials.GetDeliveryCertificateRequest\x1a;.org.signal.chat.credentials.GetDeliveryCertificateResponse\"\x00\x12\x8a\x01\n" + - "\x13GetGroupCredentials\x127.org.signal.chat.credentials.GetGroupCredentialsRequest\x1a8.org.signal.chat.credentials.GetGroupCredentialsResponse\"\x00\x12\xa5\x01\n" + - "\x1cGetCreateCallLinkCredentials\x12@.org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest\x1aA.org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xa9\x01\n" + + "\x13GetGroupCredentials\x127.org.signal.chat.credentials.GetGroupCredentialsRequest\x1a8.org.signal.chat.credentials.GetGroupCredentialsResponse\"\x00\x12\xa2\x01\n" + + "\x1bGetCreateCallLinkCredential\x12?.org.signal.chat.credentials.GetCreateCallLinkCredentialRequest\x1a@.org.signal.chat.credentials.GetCreateCallLinkCredentialResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xa9\x01\n" + "\x14CredentialsAnonymous\x12\x8a\x01\n" + "\x13CheckSvrCredentials\x127.org.signal.chat.credentials.CheckSvrCredentialsRequest\x1a8.org.signal.chat.credentials.CheckSvrCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" @@ -789,7 +720,7 @@ func file_org_signal_chat_credentials_proto_rawDescGZIP() []byte { } var file_org_signal_chat_credentials_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_credentials_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_org_signal_chat_credentials_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_org_signal_chat_credentials_proto_goTypes = []any{ (ExternalServiceType)(0), // 0: org.signal.chat.credentials.ExternalServiceType (AuthCheckResult)(0), // 1: org.signal.chat.credentials.AuthCheckResult @@ -801,26 +732,26 @@ var file_org_signal_chat_credentials_proto_goTypes = []any{ (*GetDeliveryCertificateResponse)(nil), // 7: org.signal.chat.credentials.GetDeliveryCertificateResponse (*GetGroupCredentialsRequest)(nil), // 8: org.signal.chat.credentials.GetGroupCredentialsRequest (*GetGroupCredentialsResponse)(nil), // 9: org.signal.chat.credentials.GetGroupCredentialsResponse - (*GetCreateCallLinkCredentialsRequest)(nil), // 10: org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest - (*GetCreateCallLinkCredentialsResponse)(nil), // 11: org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse - nil, // 12: org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry - (*GetGroupCredentialsResponse_CredentialAndRedemptionTime)(nil), // 13: org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime + (*GetCreateCallLinkCredentialRequest)(nil), // 10: org.signal.chat.credentials.GetCreateCallLinkCredentialRequest + (*GetCreateCallLinkCredentialResponse)(nil), // 11: org.signal.chat.credentials.GetCreateCallLinkCredentialResponse + nil, // 12: org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry + (*common.ZkCredential)(nil), // 13: org.signal.chat.common.ZkCredential } var file_org_signal_chat_credentials_proto_depIdxs = []int32{ 0, // 0: org.signal.chat.credentials.GetExternalServiceCredentialsRequest.externalService:type_name -> org.signal.chat.credentials.ExternalServiceType 12, // 1: org.signal.chat.credentials.CheckSvrCredentialsResponse.matches:type_name -> org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry - 13, // 2: org.signal.chat.credentials.GetGroupCredentialsResponse.group_credentials:type_name -> org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime - 13, // 3: org.signal.chat.credentials.GetGroupCredentialsResponse.call_link_auth_credentials:type_name -> org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime + 13, // 2: org.signal.chat.credentials.GetGroupCredentialsResponse.group_credentials:type_name -> org.signal.chat.common.ZkCredential + 13, // 3: org.signal.chat.credentials.GetGroupCredentialsResponse.call_link_auth_credentials:type_name -> org.signal.chat.common.ZkCredential 1, // 4: org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry.value:type_name -> org.signal.chat.credentials.AuthCheckResult 2, // 5: org.signal.chat.credentials.Credentials.GetExternalServiceCredentials:input_type -> org.signal.chat.credentials.GetExternalServiceCredentialsRequest 6, // 6: org.signal.chat.credentials.Credentials.GetDeliveryCertificate:input_type -> org.signal.chat.credentials.GetDeliveryCertificateRequest 8, // 7: org.signal.chat.credentials.Credentials.GetGroupCredentials:input_type -> org.signal.chat.credentials.GetGroupCredentialsRequest - 10, // 8: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredentials:input_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest + 10, // 8: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredential:input_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialRequest 4, // 9: org.signal.chat.credentials.CredentialsAnonymous.CheckSvrCredentials:input_type -> org.signal.chat.credentials.CheckSvrCredentialsRequest 3, // 10: org.signal.chat.credentials.Credentials.GetExternalServiceCredentials:output_type -> org.signal.chat.credentials.GetExternalServiceCredentialsResponse 7, // 11: org.signal.chat.credentials.Credentials.GetDeliveryCertificate:output_type -> org.signal.chat.credentials.GetDeliveryCertificateResponse 9, // 12: org.signal.chat.credentials.Credentials.GetGroupCredentials:output_type -> org.signal.chat.credentials.GetGroupCredentialsResponse - 11, // 13: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredentials:output_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse + 11, // 13: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredential:output_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialResponse 5, // 14: org.signal.chat.credentials.CredentialsAnonymous.CheckSvrCredentials:output_type -> org.signal.chat.credentials.CheckSvrCredentialsResponse 10, // [10:15] is the sub-list for method output_type 5, // [5:10] is the sub-list for method input_type @@ -840,7 +771,7 @@ func file_org_signal_chat_credentials_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_credentials_proto_rawDesc), len(file_org_signal_chat_credentials_proto_rawDesc)), NumEnums: 2, - NumMessages: 12, + NumMessages: 11, NumExtensions: 0, NumServices: 2, }, diff --git a/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go index c7934c0..3eaac46 100644 --- a/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go @@ -26,7 +26,7 @@ const ( Credentials_GetExternalServiceCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetExternalServiceCredentials" Credentials_GetDeliveryCertificate_FullMethodName = "/org.signal.chat.credentials.Credentials/GetDeliveryCertificate" Credentials_GetGroupCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetGroupCredentials" - Credentials_GetCreateCallLinkCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetCreateCallLinkCredentials" + Credentials_GetCreateCallLinkCredential_FullMethodName = "/org.signal.chat.credentials.Credentials/GetCreateCallLinkCredential" ) // CredentialsClient is the client API for Credentials service. @@ -47,7 +47,7 @@ type CredentialsClient interface { // actions. GetGroupCredentials(ctx context.Context, in *GetGroupCredentialsRequest, opts ...grpc.CallOption) (*GetGroupCredentialsResponse, error) // Generates zero-knowledge credentials for creating call links. - GetCreateCallLinkCredentials(ctx context.Context, in *GetCreateCallLinkCredentialsRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialsResponse, error) + GetCreateCallLinkCredential(ctx context.Context, in *GetCreateCallLinkCredentialRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialResponse, error) } type credentialsClient struct { @@ -88,10 +88,10 @@ func (c *credentialsClient) GetGroupCredentials(ctx context.Context, in *GetGrou return out, nil } -func (c *credentialsClient) GetCreateCallLinkCredentials(ctx context.Context, in *GetCreateCallLinkCredentialsRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialsResponse, error) { +func (c *credentialsClient) GetCreateCallLinkCredential(ctx context.Context, in *GetCreateCallLinkCredentialRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCreateCallLinkCredentialsResponse) - err := c.cc.Invoke(ctx, Credentials_GetCreateCallLinkCredentials_FullMethodName, in, out, cOpts...) + out := new(GetCreateCallLinkCredentialResponse) + err := c.cc.Invoke(ctx, Credentials_GetCreateCallLinkCredential_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -116,7 +116,7 @@ type CredentialsServer interface { // actions. GetGroupCredentials(context.Context, *GetGroupCredentialsRequest) (*GetGroupCredentialsResponse, error) // Generates zero-knowledge credentials for creating call links. - GetCreateCallLinkCredentials(context.Context, *GetCreateCallLinkCredentialsRequest) (*GetCreateCallLinkCredentialsResponse, error) + GetCreateCallLinkCredential(context.Context, *GetCreateCallLinkCredentialRequest) (*GetCreateCallLinkCredentialResponse, error) mustEmbedUnimplementedCredentialsServer() } @@ -136,8 +136,8 @@ func (UnimplementedCredentialsServer) GetDeliveryCertificate(context.Context, *G func (UnimplementedCredentialsServer) GetGroupCredentials(context.Context, *GetGroupCredentialsRequest) (*GetGroupCredentialsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetGroupCredentials not implemented") } -func (UnimplementedCredentialsServer) GetCreateCallLinkCredentials(context.Context, *GetCreateCallLinkCredentialsRequest) (*GetCreateCallLinkCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetCreateCallLinkCredentials not implemented") +func (UnimplementedCredentialsServer) GetCreateCallLinkCredential(context.Context, *GetCreateCallLinkCredentialRequest) (*GetCreateCallLinkCredentialResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCreateCallLinkCredential not implemented") } func (UnimplementedCredentialsServer) mustEmbedUnimplementedCredentialsServer() {} func (UnimplementedCredentialsServer) testEmbeddedByValue() {} @@ -214,20 +214,20 @@ func _Credentials_GetGroupCredentials_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _Credentials_GetCreateCallLinkCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCreateCallLinkCredentialsRequest) +func _Credentials_GetCreateCallLinkCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCreateCallLinkCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(CredentialsServer).GetCreateCallLinkCredentials(ctx, in) + return srv.(CredentialsServer).GetCreateCallLinkCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Credentials_GetCreateCallLinkCredentials_FullMethodName, + FullMethod: Credentials_GetCreateCallLinkCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CredentialsServer).GetCreateCallLinkCredentials(ctx, req.(*GetCreateCallLinkCredentialsRequest)) + return srv.(CredentialsServer).GetCreateCallLinkCredential(ctx, req.(*GetCreateCallLinkCredentialRequest)) } return interceptor(ctx, in, info, handler) } @@ -252,8 +252,8 @@ var Credentials_ServiceDesc = grpc.ServiceDesc{ Handler: _Credentials_GetGroupCredentials_Handler, }, { - MethodName: "GetCreateCallLinkCredentials", - Handler: _Credentials_GetCreateCallLinkCredentials_Handler, + MethodName: "GetCreateCallLinkCredential", + Handler: _Credentials_GetCreateCallLinkCredential_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go b/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go index 2286bd3..a91bbe6 100644 --- a/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go +++ b/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go @@ -1599,6 +1599,105 @@ func (x *ChallengeRequired) GetRetryAfterSeconds() uint64 { return 0 } +type ReportMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service identifier of the party that sent the offending message + SourceServiceIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=source_service_identifier,json=sourceServiceIdentifier,proto3" json:"source_service_identifier,omitempty"` + // The GUID of the offending message + MessageGuid []byte `protobuf:"bytes,2,opt,name=message_guid,json=messageGuid,proto3" json:"message_guid,omitempty"` + // The spam-reporting token attached to the offending message + ReportSpamToken []byte `protobuf:"bytes,3,opt,name=report_spam_token,json=reportSpamToken,proto3" json:"report_spam_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReportMessageRequest) Reset() { + *x = ReportMessageRequest{} + mi := &file_org_signal_chat_messages_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReportMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportMessageRequest) ProtoMessage() {} + +func (x *ReportMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportMessageRequest.ProtoReflect.Descriptor instead. +func (*ReportMessageRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{18} +} + +func (x *ReportMessageRequest) GetSourceServiceIdentifier() *common.ServiceIdentifier { + if x != nil { + return x.SourceServiceIdentifier + } + return nil +} + +func (x *ReportMessageRequest) GetMessageGuid() []byte { + if x != nil { + return x.MessageGuid + } + return nil +} + +func (x *ReportMessageRequest) GetReportSpamToken() []byte { + if x != nil { + return x.ReportSpamToken + } + return nil +} + +type ReportMessageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReportMessageResponse) Reset() { + *x = ReportMessageResponse{} + mi := &file_org_signal_chat_messages_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReportMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportMessageResponse) ProtoMessage() {} + +func (x *ReportMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_messages_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportMessageResponse.ProtoReflect.Descriptor instead. +func (*ReportMessageResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{19} +} + type GetMessagesRequest_GetMessageOptions struct { state protoimpl.MessageState `protogen:"open.v1"` // If present and true, the server will not deliver any messages with the @@ -1611,7 +1710,7 @@ type GetMessagesRequest_GetMessageOptions struct { func (x *GetMessagesRequest_GetMessageOptions) Reset() { *x = GetMessagesRequest_GetMessageOptions{} - mi := &file_org_signal_chat_messages_proto_msgTypes[18] + mi := &file_org_signal_chat_messages_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1623,7 +1722,7 @@ func (x *GetMessagesRequest_GetMessageOptions) String() string { func (*GetMessagesRequest_GetMessageOptions) ProtoMessage() {} func (x *GetMessagesRequest_GetMessageOptions) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[18] + mi := &file_org_signal_chat_messages_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1662,7 +1761,7 @@ type IndividualRecipientMessageBundle_Message struct { func (x *IndividualRecipientMessageBundle_Message) Reset() { *x = IndividualRecipientMessageBundle_Message{} - mi := &file_org_signal_chat_messages_proto_msgTypes[19] + mi := &file_org_signal_chat_messages_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1674,7 +1773,7 @@ func (x *IndividualRecipientMessageBundle_Message) String() string { func (*IndividualRecipientMessageBundle_Message) ProtoMessage() {} func (x *IndividualRecipientMessageBundle_Message) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[19] + mi := &file_org_signal_chat_messages_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1811,17 +1910,23 @@ const file_org_signal_chat_messages_proto_rawDesc = "" + "\vUNSPECIFIED\x10\x00\x12\v\n" + "\aCAPTCHA\x10\x01\x12\x12\n" + "\x0ePUSH_CHALLENGE\x10\x02B\x16\n" + - "\x14_retry_after_seconds*z\n" + + "\x14_retry_after_seconds\"\xd3\x01\n" + + "\x14ReportMessageRequest\x12e\n" + + "\x19source_service_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x17sourceServiceIdentifier\x12(\n" + + "\fmessage_guid\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x10R\vmessageGuid\x12*\n" + + "\x11report_spam_token\x18\x03 \x01(\fR\x0freportSpamToken\"\x17\n" + + "\x15ReportMessageResponse*z\n" + "\x0fSendMessageType\x12\x0f\n" + "\vUNSPECIFIED\x10\x00\x12\x12\n" + "\x0eDOUBLE_RATCHET\x10\x01\x12\x12\n" + "\x0ePREKEY_MESSAGE\x10\x02\x12\x15\n" + "\x11PLAINTEXT_CONTENT\x10\x03\x12\x17\n" + - "\x13UNIDENTIFIED_SENDER\x10\x042\xa1\x03\n" + + "\x13UNIDENTIFIED_SENDER\x10\x042\x95\x04\n" + "\bMessages\x12\x92\x01\n" + "\vSendMessage\x12?.org.signal.chat.messages.SendAuthenticatedSenderMessageRequest\x1a@.org.signal.chat.messages.SendMessageAuthenticatedSenderResponse\"\x00\x12\x87\x01\n" + "\x0fSendSyncMessage\x120.org.signal.chat.messages.SendSyncMessageRequest\x1a@.org.signal.chat.messages.SendMessageAuthenticatedSenderResponse\"\x00\x12p\n" + - "\vGetMessages\x12,.org.signal.chat.messages.GetMessagesRequest\x1a-.org.signal.chat.messages.GetMessagesResponse\"\x00(\x010\x01\x1a\x04\xc8\xd5\"\x012\xc2\x04\n" + + "\vGetMessages\x12,.org.signal.chat.messages.GetMessagesRequest\x1a-.org.signal.chat.messages.GetMessagesResponse\"\x00(\x010\x01\x12r\n" + + "\rReportMessage\x12..org.signal.chat.messages.ReportMessageRequest\x1a/.org.signal.chat.messages.ReportMessageResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xc2\x04\n" + "\x11MessagesAnonymous\x12\x87\x01\n" + "\x1aSendSingleRecipientMessage\x128.org.signal.chat.messages.SendSealedSenderMessageRequest\x1a-.org.signal.chat.messages.SendMessageResponse\"\x00\x12\x96\x01\n" + "\x19SendMultiRecipientMessage\x12:.org.signal.chat.messages.SendMultiRecipientMessageRequest\x1a;.org.signal.chat.messages.SendMultiRecipientMessageResponse\"\x00\x12o\n" + @@ -1841,7 +1946,7 @@ func file_org_signal_chat_messages_proto_rawDescGZIP() []byte { } var file_org_signal_chat_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_org_signal_chat_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_org_signal_chat_messages_proto_goTypes = []any{ (SendMessageType)(0), // 0: org.signal.chat.messages.SendMessageType (ChallengeRequired_ChallengeType)(0), // 1: org.signal.chat.messages.ChallengeRequired.ChallengeType @@ -1863,67 +1968,72 @@ var file_org_signal_chat_messages_proto_goTypes = []any{ (*MismatchedDevices)(nil), // 17: org.signal.chat.messages.MismatchedDevices (*MultiRecipientMismatchedDevices)(nil), // 18: org.signal.chat.messages.MultiRecipientMismatchedDevices (*ChallengeRequired)(nil), // 19: org.signal.chat.messages.ChallengeRequired - (*GetMessagesRequest_GetMessageOptions)(nil), // 20: org.signal.chat.messages.GetMessagesRequest.GetMessageOptions - (*IndividualRecipientMessageBundle_Message)(nil), // 21: org.signal.chat.messages.IndividualRecipientMessageBundle.Message - nil, // 22: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry - (*emptypb.Empty)(nil), // 23: google.protobuf.Empty - (*signalpb.Envelope)(nil), // 24: signalservice.Envelope - (*common.ServiceIdentifier)(nil), // 25: org.signal.chat.common.ServiceIdentifier - (*errors.NotFound)(nil), // 26: org.signal.chat.errors.NotFound - (*errors.FailedUnidentifiedAuthorization)(nil), // 27: org.signal.chat.errors.FailedUnidentifiedAuthorization + (*ReportMessageRequest)(nil), // 20: org.signal.chat.messages.ReportMessageRequest + (*ReportMessageResponse)(nil), // 21: org.signal.chat.messages.ReportMessageResponse + (*GetMessagesRequest_GetMessageOptions)(nil), // 22: org.signal.chat.messages.GetMessagesRequest.GetMessageOptions + (*IndividualRecipientMessageBundle_Message)(nil), // 23: org.signal.chat.messages.IndividualRecipientMessageBundle.Message + nil, // 24: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry + (*emptypb.Empty)(nil), // 25: google.protobuf.Empty + (*signalpb.Envelope)(nil), // 26: signalservice.Envelope + (*common.ServiceIdentifier)(nil), // 27: org.signal.chat.common.ServiceIdentifier + (*errors.NotFound)(nil), // 28: org.signal.chat.errors.NotFound + (*errors.FailedUnidentifiedAuthorization)(nil), // 29: org.signal.chat.errors.FailedUnidentifiedAuthorization } var file_org_signal_chat_messages_proto_depIdxs = []int32{ - 20, // 0: org.signal.chat.messages.GetMessagesRequest.options:type_name -> org.signal.chat.messages.GetMessagesRequest.GetMessageOptions - 23, // 1: org.signal.chat.messages.GetMessagesStreamClosed.conflicting_stream:type_name -> google.protobuf.Empty - 24, // 2: org.signal.chat.messages.GetMessagesResponse.envelope:type_name -> signalservice.Envelope - 23, // 3: org.signal.chat.messages.GetMessagesResponse.queue_empty:type_name -> google.protobuf.Empty - 22, // 4: org.signal.chat.messages.IndividualRecipientMessageBundle.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry - 25, // 5: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier + 22, // 0: org.signal.chat.messages.GetMessagesRequest.options:type_name -> org.signal.chat.messages.GetMessagesRequest.GetMessageOptions + 25, // 1: org.signal.chat.messages.GetMessagesStreamClosed.conflicting_stream:type_name -> google.protobuf.Empty + 26, // 2: org.signal.chat.messages.GetMessagesResponse.envelope:type_name -> signalservice.Envelope + 25, // 3: org.signal.chat.messages.GetMessagesResponse.queue_empty:type_name -> google.protobuf.Empty + 24, // 4: org.signal.chat.messages.IndividualRecipientMessageBundle.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry + 27, // 5: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier 5, // 6: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 23, // 7: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.success:type_name -> google.protobuf.Empty + 25, // 7: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.success:type_name -> google.protobuf.Empty 17, // 8: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices 19, // 9: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.challenge_required:type_name -> org.signal.chat.messages.ChallengeRequired - 26, // 10: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound + 28, // 10: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound 5, // 11: org.signal.chat.messages.SendSyncMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 25, // 12: org.signal.chat.messages.SendSealedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier + 27, // 12: org.signal.chat.messages.SendSealedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier 5, // 13: org.signal.chat.messages.SendSealedSenderMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 23, // 14: org.signal.chat.messages.SendSealedSenderMessageRequest.unrestricted_access:type_name -> google.protobuf.Empty - 25, // 15: org.signal.chat.messages.SendStoryMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier + 25, // 14: org.signal.chat.messages.SendSealedSenderMessageRequest.unrestricted_access:type_name -> google.protobuf.Empty + 27, // 15: org.signal.chat.messages.SendStoryMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier 5, // 16: org.signal.chat.messages.SendStoryMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 23, // 17: org.signal.chat.messages.SendMessageResponse.success:type_name -> google.protobuf.Empty + 25, // 17: org.signal.chat.messages.SendMessageResponse.success:type_name -> google.protobuf.Empty 17, // 18: org.signal.chat.messages.SendMessageResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices - 27, // 19: org.signal.chat.messages.SendMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 26, // 20: org.signal.chat.messages.SendMessageResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound + 29, // 19: org.signal.chat.messages.SendMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 28, // 20: org.signal.chat.messages.SendMessageResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound 12, // 21: org.signal.chat.messages.SendMultiRecipientMessageRequest.message:type_name -> org.signal.chat.messages.MultiRecipientMessage 12, // 22: org.signal.chat.messages.SendMultiRecipientStoryRequest.message:type_name -> org.signal.chat.messages.MultiRecipientMessage - 25, // 23: org.signal.chat.messages.MultiRecipientSuccess.unresolved_recipients:type_name -> org.signal.chat.common.ServiceIdentifier + 27, // 23: org.signal.chat.messages.MultiRecipientSuccess.unresolved_recipients:type_name -> org.signal.chat.common.ServiceIdentifier 15, // 24: org.signal.chat.messages.SendMultiRecipientMessageResponse.success:type_name -> org.signal.chat.messages.MultiRecipientSuccess 18, // 25: org.signal.chat.messages.SendMultiRecipientMessageResponse.mismatched_devices:type_name -> org.signal.chat.messages.MultiRecipientMismatchedDevices - 27, // 26: org.signal.chat.messages.SendMultiRecipientMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 25, // 27: org.signal.chat.messages.MismatchedDevices.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 29, // 26: org.signal.chat.messages.SendMultiRecipientMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 27, // 27: org.signal.chat.messages.MismatchedDevices.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier 17, // 28: org.signal.chat.messages.MultiRecipientMismatchedDevices.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices 1, // 29: org.signal.chat.messages.ChallengeRequired.challenge_options:type_name -> org.signal.chat.messages.ChallengeRequired.ChallengeType - 0, // 30: org.signal.chat.messages.IndividualRecipientMessageBundle.Message.type:type_name -> org.signal.chat.messages.SendMessageType - 21, // 31: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry.value:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.Message - 6, // 32: org.signal.chat.messages.Messages.SendMessage:input_type -> org.signal.chat.messages.SendAuthenticatedSenderMessageRequest - 8, // 33: org.signal.chat.messages.Messages.SendSyncMessage:input_type -> org.signal.chat.messages.SendSyncMessageRequest - 2, // 34: org.signal.chat.messages.Messages.GetMessages:input_type -> org.signal.chat.messages.GetMessagesRequest - 9, // 35: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:input_type -> org.signal.chat.messages.SendSealedSenderMessageRequest - 13, // 36: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:input_type -> org.signal.chat.messages.SendMultiRecipientMessageRequest - 10, // 37: org.signal.chat.messages.MessagesAnonymous.SendStory:input_type -> org.signal.chat.messages.SendStoryMessageRequest - 14, // 38: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:input_type -> org.signal.chat.messages.SendMultiRecipientStoryRequest - 7, // 39: org.signal.chat.messages.Messages.SendMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse - 7, // 40: org.signal.chat.messages.Messages.SendSyncMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse - 4, // 41: org.signal.chat.messages.Messages.GetMessages:output_type -> org.signal.chat.messages.GetMessagesResponse - 11, // 42: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:output_type -> org.signal.chat.messages.SendMessageResponse - 16, // 43: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse - 11, // 44: org.signal.chat.messages.MessagesAnonymous.SendStory:output_type -> org.signal.chat.messages.SendMessageResponse - 16, // 45: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse - 39, // [39:46] is the sub-list for method output_type - 32, // [32:39] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name + 27, // 30: org.signal.chat.messages.ReportMessageRequest.source_service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 0, // 31: org.signal.chat.messages.IndividualRecipientMessageBundle.Message.type:type_name -> org.signal.chat.messages.SendMessageType + 23, // 32: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry.value:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.Message + 6, // 33: org.signal.chat.messages.Messages.SendMessage:input_type -> org.signal.chat.messages.SendAuthenticatedSenderMessageRequest + 8, // 34: org.signal.chat.messages.Messages.SendSyncMessage:input_type -> org.signal.chat.messages.SendSyncMessageRequest + 2, // 35: org.signal.chat.messages.Messages.GetMessages:input_type -> org.signal.chat.messages.GetMessagesRequest + 20, // 36: org.signal.chat.messages.Messages.ReportMessage:input_type -> org.signal.chat.messages.ReportMessageRequest + 9, // 37: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:input_type -> org.signal.chat.messages.SendSealedSenderMessageRequest + 13, // 38: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:input_type -> org.signal.chat.messages.SendMultiRecipientMessageRequest + 10, // 39: org.signal.chat.messages.MessagesAnonymous.SendStory:input_type -> org.signal.chat.messages.SendStoryMessageRequest + 14, // 40: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:input_type -> org.signal.chat.messages.SendMultiRecipientStoryRequest + 7, // 41: org.signal.chat.messages.Messages.SendMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse + 7, // 42: org.signal.chat.messages.Messages.SendSyncMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse + 4, // 43: org.signal.chat.messages.Messages.GetMessages:output_type -> org.signal.chat.messages.GetMessagesResponse + 21, // 44: org.signal.chat.messages.Messages.ReportMessage:output_type -> org.signal.chat.messages.ReportMessageResponse + 11, // 45: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:output_type -> org.signal.chat.messages.SendMessageResponse + 16, // 46: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse + 11, // 47: org.signal.chat.messages.MessagesAnonymous.SendStory:output_type -> org.signal.chat.messages.SendMessageResponse + 16, // 48: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse + 41, // [41:49] is the sub-list for method output_type + 33, // [33:41] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name } func init() { file_org_signal_chat_messages_proto_init() } @@ -1971,7 +2081,7 @@ func file_org_signal_chat_messages_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_messages_proto_rawDesc), len(file_org_signal_chat_messages_proto_rawDesc)), NumEnums: 2, - NumMessages: 21, + NumMessages: 23, NumExtensions: 0, NumServices: 2, }, diff --git a/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go index d9b0a6d..2545ef2 100644 --- a/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go @@ -26,6 +26,7 @@ const ( Messages_SendMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendMessage" Messages_SendSyncMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendSyncMessage" Messages_GetMessages_FullMethodName = "/org.signal.chat.messages.Messages/GetMessages" + Messages_ReportMessage_FullMethodName = "/org.signal.chat.messages.Messages/ReportMessage" ) // MessagesClient is the client API for Messages service. @@ -58,6 +59,8 @@ type MessagesClient interface { // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be // present in the error details. GetMessages(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse], error) + // Reports a message as spam. + ReportMessage(ctx context.Context, in *ReportMessageRequest, opts ...grpc.CallOption) (*ReportMessageResponse, error) } type messagesClient struct { @@ -101,6 +104,16 @@ func (c *messagesClient) GetMessages(ctx context.Context, opts ...grpc.CallOptio // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type Messages_GetMessagesClient = grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse] +func (c *messagesClient) ReportMessage(ctx context.Context, in *ReportMessageRequest, opts ...grpc.CallOption) (*ReportMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReportMessageResponse) + err := c.cc.Invoke(ctx, Messages_ReportMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // MessagesServer is the server API for Messages service. // All implementations must embed UnimplementedMessagesServer // for forward compatibility. @@ -131,6 +144,8 @@ type MessagesServer interface { // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be // present in the error details. GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error + // Reports a message as spam. + ReportMessage(context.Context, *ReportMessageRequest) (*ReportMessageResponse, error) mustEmbedUnimplementedMessagesServer() } @@ -150,6 +165,9 @@ func (UnimplementedMessagesServer) SendSyncMessage(context.Context, *SendSyncMes func (UnimplementedMessagesServer) GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error { return status.Error(codes.Unimplemented, "method GetMessages not implemented") } +func (UnimplementedMessagesServer) ReportMessage(context.Context, *ReportMessageRequest) (*ReportMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ReportMessage not implemented") +} func (UnimplementedMessagesServer) mustEmbedUnimplementedMessagesServer() {} func (UnimplementedMessagesServer) testEmbeddedByValue() {} @@ -214,6 +232,24 @@ func _Messages_GetMessages_Handler(srv interface{}, stream grpc.ServerStream) er // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type Messages_GetMessagesServer = grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse] +func _Messages_ReportMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesServer).ReportMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Messages_ReportMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesServer).ReportMessage(ctx, req.(*ReportMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Messages_ServiceDesc is the grpc.ServiceDesc for Messages service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -229,6 +265,10 @@ var Messages_ServiceDesc = grpc.ServiceDesc{ MethodName: "SendSyncMessage", Handler: _Messages_SendSyncMessage_Handler, }, + { + MethodName: "ReportMessage", + Handler: _Messages_ReportMessage_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go index e80afa8..bbbf7ef 100644 --- a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go @@ -41,7 +41,14 @@ type OneTimeDonationsClient interface { // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials CreateBoost(ctx context.Context, in *CreateBoostRequest, opts ...grpc.CallOption) (*CreateBoostResponse, error) // Create a PayPal one-time payment. - // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token + // + // Once the payment is complete, call ConfirmPayPalBoost with the payment ID + // and token. + // + // The PayPal approval page presented to the user may be localized. Callers + // should set their language preferences via an "Accept-Language" header on + // the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 CreatePayPalBoost(ctx context.Context, in *CreatePayPalBoostRequest, opts ...grpc.CallOption) (*CreatePayPalBoostResponse, error) // Confirm a PayPal one-time payment ConfirmPayPalBoost(ctx context.Context, in *ConfirmPayPalBoostRequest, opts ...grpc.CallOption) (*ConfirmPayPalBoostResponse, error) @@ -111,7 +118,14 @@ type OneTimeDonationsServer interface { // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials CreateBoost(context.Context, *CreateBoostRequest) (*CreateBoostResponse, error) // Create a PayPal one-time payment. - // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token + // + // Once the payment is complete, call ConfirmPayPalBoost with the payment ID + // and token. + // + // The PayPal approval page presented to the user may be localized. Callers + // should set their language preferences via an "Accept-Language" header on + // the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 CreatePayPalBoost(context.Context, *CreatePayPalBoostRequest) (*CreatePayPalBoostResponse, error) // Confirm a PayPal one-time payment ConfirmPayPalBoost(context.Context, *ConfirmPayPalBoostRequest) (*ConfirmPayPalBoostResponse, error) diff --git a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go index bd1b669..0760fe5 100644 --- a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go +++ b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go @@ -453,6 +453,8 @@ type LoginConfiguration struct { Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` // The play billing productID associated with a Signal Login purchase PlayProductId string `protobuf:"bytes,2,opt,name=play_product_id,json=playProductId,proto3" json:"play_product_id,omitempty"` + // The play billing optionID to use to purchase a Signal Login + PlayOptionId string `protobuf:"bytes,4,opt,name=play_option_id,json=playOptionId,proto3" json:"play_option_id,omitempty"` // The App Store productID associated with a Signal Login purchase AppStoreProductId string `protobuf:"bytes,3,opt,name=app_store_product_id,json=appStoreProductId,proto3" json:"app_store_product_id,omitempty"` unknownFields protoimpl.UnknownFields @@ -503,6 +505,13 @@ func (x *LoginConfiguration) GetPlayProductId() string { return "" } +func (x *LoginConfiguration) GetPlayOptionId() string { + if x != nil { + return x.PlayOptionId + } + return "" +} + func (x *LoginConfiguration) GetAppStoreProductId() string { if x != nil { return x.AppStoreProductId @@ -561,10 +570,11 @@ const file_org_signal_chat_product_configuration_proto_rawDesc = "" + "\x14free_tier_media_days\x18\x02 \x01(\x04R\x11freeTierMediaDays\x1am\n" + "\vLevelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x04R\x03key\x12H\n" + - "\x05value\x18\x02 \x01(\v22.org.signal.chat.purchase.BackupLevelConfigurationR\x05value:\x028\x01\"\x83\x01\n" + + "\x05value\x18\x02 \x01(\v22.org.signal.chat.purchase.BackupLevelConfigurationR\x05value:\x028\x01\"\xa9\x01\n" + "\x12LoginConfiguration\x12\x14\n" + "\x05level\x18\x01 \x01(\x04R\x05level\x12&\n" + - "\x0fplay_product_id\x18\x02 \x01(\tR\rplayProductId\x12/\n" + + "\x0fplay_product_id\x18\x02 \x01(\tR\rplayProductId\x12$\n" + + "\x0eplay_option_id\x18\x04 \x01(\tR\fplayOptionId\x12/\n" + "\x14app_store_product_id\x18\x03 \x01(\tR\x11appStoreProductId2\x99\x01\n" + "\x14ProductConfiguration\x12{\n" + "\x10GetConfiguration\x121.org.signal.chat.purchase.GetConfigurationRequest\x1a2.org.signal.chat.purchase.GetConfigurationResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go index 2c27314..ac22050 100644 --- a/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go +++ b/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go @@ -206,6 +206,105 @@ func (x *SetProfileV1Request) GetPhoneNumberSharing() []byte { return nil } +type SetV1AvatarRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The profile version. Required. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // The profile key commitment. Required if this is a new profile version. + Commitment []byte `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetV1AvatarRequest) Reset() { + *x = SetV1AvatarRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetV1AvatarRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetV1AvatarRequest) ProtoMessage() {} + +func (x *SetV1AvatarRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetV1AvatarRequest.ProtoReflect.Descriptor instead. +func (*SetV1AvatarRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{1} +} + +func (x *SetV1AvatarRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *SetV1AvatarRequest) GetCommitment() []byte { + if x != nil { + return x.Commitment + } + return nil +} + +type SetV1AvatarResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // the policy and credential used by clients to upload an avatar to the CDN + Form *common.S3UploadForm `protobuf:"bytes,1,opt,name=form,proto3" json:"form,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetV1AvatarResponse) Reset() { + *x = SetV1AvatarResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetV1AvatarResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetV1AvatarResponse) ProtoMessage() {} + +func (x *SetV1AvatarResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetV1AvatarResponse.ProtoReflect.Descriptor instead. +func (*SetV1AvatarResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{2} +} + +func (x *SetV1AvatarResponse) GetForm() *common.S3UploadForm { + if x != nil { + return x.Form + } + return nil +} + type SetProfileRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // The profile version. Required. @@ -242,7 +341,7 @@ type SetProfileRequest struct { func (x *SetProfileRequest) Reset() { *x = SetProfileRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[1] + mi := &file_org_signal_chat_profile_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -254,7 +353,7 @@ func (x *SetProfileRequest) String() string { func (*SetProfileRequest) ProtoMessage() {} func (x *SetProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[1] + mi := &file_org_signal_chat_profile_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -267,7 +366,7 @@ func (x *SetProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetProfileRequest.ProtoReflect.Descriptor instead. func (*SetProfileRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{1} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{3} } func (x *SetProfileRequest) GetVersion() []byte { @@ -336,7 +435,7 @@ type PaymentsForbiddenInRegion struct { func (x *PaymentsForbiddenInRegion) Reset() { *x = PaymentsForbiddenInRegion{} - mi := &file_org_signal_chat_profile_proto_msgTypes[2] + mi := &file_org_signal_chat_profile_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -348,7 +447,7 @@ func (x *PaymentsForbiddenInRegion) String() string { func (*PaymentsForbiddenInRegion) ProtoMessage() {} func (x *PaymentsForbiddenInRegion) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[2] + mi := &file_org_signal_chat_profile_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -361,7 +460,7 @@ func (x *PaymentsForbiddenInRegion) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentsForbiddenInRegion.ProtoReflect.Descriptor instead. func (*PaymentsForbiddenInRegion) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{2} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{4} } // Indicates that the account does not have the Profiles v2 capability, which @@ -374,7 +473,7 @@ type ProfilesV2CapabilityRequired struct { func (x *ProfilesV2CapabilityRequired) Reset() { *x = ProfilesV2CapabilityRequired{} - mi := &file_org_signal_chat_profile_proto_msgTypes[3] + mi := &file_org_signal_chat_profile_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -386,7 +485,7 @@ func (x *ProfilesV2CapabilityRequired) String() string { func (*ProfilesV2CapabilityRequired) ProtoMessage() {} func (x *ProfilesV2CapabilityRequired) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[3] + mi := &file_org_signal_chat_profile_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -399,7 +498,7 @@ func (x *ProfilesV2CapabilityRequired) ProtoReflect() protoreflect.Message { // Deprecated: Use ProfilesV2CapabilityRequired.ProtoReflect.Descriptor instead. func (*ProfilesV2CapabilityRequired) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{3} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{5} } type SetProfileResult struct { @@ -416,7 +515,7 @@ type SetProfileResult struct { func (x *SetProfileResult) Reset() { *x = SetProfileResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[4] + mi := &file_org_signal_chat_profile_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -428,7 +527,7 @@ func (x *SetProfileResult) String() string { func (*SetProfileResult) ProtoMessage() {} func (x *SetProfileResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[4] + mi := &file_org_signal_chat_profile_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -441,7 +540,7 @@ func (x *SetProfileResult) ProtoReflect() protoreflect.Message { // Deprecated: Use SetProfileResult.ProtoReflect.Descriptor instead. func (*SetProfileResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{4} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{6} } func (x *SetProfileResult) GetV1AvatarUploadForm() *common.S3UploadForm { @@ -467,7 +566,7 @@ type SetProfileResponse struct { func (x *SetProfileResponse) Reset() { *x = SetProfileResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[5] + mi := &file_org_signal_chat_profile_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -479,7 +578,7 @@ func (x *SetProfileResponse) String() string { func (*SetProfileResponse) ProtoMessage() {} func (x *SetProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[5] + mi := &file_org_signal_chat_profile_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -492,7 +591,7 @@ func (x *SetProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetProfileResponse.ProtoReflect.Descriptor instead. func (*SetProfileResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{5} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{7} } func (x *SetProfileResponse) GetResponse() isSetProfileResponse_Response { @@ -606,7 +705,7 @@ type GetProfileRequest struct { func (x *GetProfileRequest) Reset() { *x = GetProfileRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[6] + mi := &file_org_signal_chat_profile_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -618,7 +717,7 @@ func (x *GetProfileRequest) String() string { func (*GetProfileRequest) ProtoMessage() {} func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[6] + mi := &file_org_signal_chat_profile_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -631,7 +730,7 @@ func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead. func (*GetProfileRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{6} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{8} } func (x *GetProfileRequest) GetAccountIdentifier() *common.ServiceIdentifier { @@ -670,7 +769,7 @@ type GetProfileAnonymousRequest struct { func (x *GetProfileAnonymousRequest) Reset() { *x = GetProfileAnonymousRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[7] + mi := &file_org_signal_chat_profile_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -682,7 +781,7 @@ func (x *GetProfileAnonymousRequest) String() string { func (*GetProfileAnonymousRequest) ProtoMessage() {} func (x *GetProfileAnonymousRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[7] + mi := &file_org_signal_chat_profile_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -695,7 +794,7 @@ func (x *GetProfileAnonymousRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProfileAnonymousRequest.ProtoReflect.Descriptor instead. func (*GetProfileAnonymousRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{7} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{9} } func (x *GetProfileAnonymousRequest) GetRequest() *GetProfileRequest { @@ -767,7 +866,7 @@ type AccountInfo struct { func (x *AccountInfo) Reset() { *x = AccountInfo{} - mi := &file_org_signal_chat_profile_proto_msgTypes[8] + mi := &file_org_signal_chat_profile_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -779,7 +878,7 @@ func (x *AccountInfo) String() string { func (*AccountInfo) ProtoMessage() {} func (x *AccountInfo) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[8] + mi := &file_org_signal_chat_profile_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -792,7 +891,7 @@ func (x *AccountInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. func (*AccountInfo) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{8} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{10} } func (x *AccountInfo) GetIdentityKey() []byte { @@ -866,7 +965,7 @@ type ProfileResult struct { func (x *ProfileResult) Reset() { *x = ProfileResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[9] + mi := &file_org_signal_chat_profile_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -878,7 +977,7 @@ func (x *ProfileResult) String() string { func (*ProfileResult) ProtoMessage() {} func (x *ProfileResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[9] + mi := &file_org_signal_chat_profile_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -891,7 +990,7 @@ func (x *ProfileResult) ProtoReflect() protoreflect.Message { // Deprecated: Use ProfileResult.ProtoReflect.Descriptor instead. func (*ProfileResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{9} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{11} } func (x *ProfileResult) GetData() []byte { @@ -944,7 +1043,7 @@ type LegacyProfileResult struct { func (x *LegacyProfileResult) Reset() { *x = LegacyProfileResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[10] + mi := &file_org_signal_chat_profile_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -956,7 +1055,7 @@ func (x *LegacyProfileResult) String() string { func (*LegacyProfileResult) ProtoMessage() {} func (x *LegacyProfileResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[10] + mi := &file_org_signal_chat_profile_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -969,7 +1068,7 @@ func (x *LegacyProfileResult) ProtoReflect() protoreflect.Message { // Deprecated: Use LegacyProfileResult.ProtoReflect.Descriptor instead. func (*LegacyProfileResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{10} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{12} } func (x *LegacyProfileResult) GetName() []byte { @@ -1036,7 +1135,7 @@ type GetProfileResponse struct { func (x *GetProfileResponse) Reset() { *x = GetProfileResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[11] + mi := &file_org_signal_chat_profile_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1048,7 +1147,7 @@ func (x *GetProfileResponse) String() string { func (*GetProfileResponse) ProtoMessage() {} func (x *GetProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[11] + mi := &file_org_signal_chat_profile_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1061,7 +1160,7 @@ func (x *GetProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead. func (*GetProfileResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{11} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{13} } func (x *GetProfileResponse) GetResponse() isGetProfileResponse_Response { @@ -1158,7 +1257,7 @@ type GetProfileAnonymousResponse struct { func (x *GetProfileAnonymousResponse) Reset() { *x = GetProfileAnonymousResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[12] + mi := &file_org_signal_chat_profile_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1170,7 +1269,7 @@ func (x *GetProfileAnonymousResponse) String() string { func (*GetProfileAnonymousResponse) ProtoMessage() {} func (x *GetProfileAnonymousResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[12] + mi := &file_org_signal_chat_profile_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1183,7 +1282,7 @@ func (x *GetProfileAnonymousResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProfileAnonymousResponse.ProtoReflect.Descriptor instead. func (*GetProfileAnonymousResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{12} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{14} } func (x *GetProfileAnonymousResponse) GetResponse() isGetProfileAnonymousResponse_Response { @@ -1296,7 +1395,7 @@ type GetExpiringProfileKeyCredentialRequest struct { func (x *GetExpiringProfileKeyCredentialRequest) Reset() { *x = GetExpiringProfileKeyCredentialRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[13] + mi := &file_org_signal_chat_profile_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1308,7 +1407,7 @@ func (x *GetExpiringProfileKeyCredentialRequest) String() string { func (*GetExpiringProfileKeyCredentialRequest) ProtoMessage() {} func (x *GetExpiringProfileKeyCredentialRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[13] + mi := &file_org_signal_chat_profile_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1321,7 +1420,7 @@ func (x *GetExpiringProfileKeyCredentialRequest) ProtoReflect() protoreflect.Mes // Deprecated: Use GetExpiringProfileKeyCredentialRequest.ProtoReflect.Descriptor instead. func (*GetExpiringProfileKeyCredentialRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{13} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{15} } func (x *GetExpiringProfileKeyCredentialRequest) GetAccountIdentifier() *common.ServiceIdentifier { @@ -1364,7 +1463,7 @@ type GetExpiringProfileKeyCredentialAnonymousRequest struct { func (x *GetExpiringProfileKeyCredentialAnonymousRequest) Reset() { *x = GetExpiringProfileKeyCredentialAnonymousRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[14] + mi := &file_org_signal_chat_profile_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1376,7 +1475,7 @@ func (x *GetExpiringProfileKeyCredentialAnonymousRequest) String() string { func (*GetExpiringProfileKeyCredentialAnonymousRequest) ProtoMessage() {} func (x *GetExpiringProfileKeyCredentialAnonymousRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[14] + mi := &file_org_signal_chat_profile_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1389,7 +1488,7 @@ func (x *GetExpiringProfileKeyCredentialAnonymousRequest) ProtoReflect() protore // Deprecated: Use GetExpiringProfileKeyCredentialAnonymousRequest.ProtoReflect.Descriptor instead. func (*GetExpiringProfileKeyCredentialAnonymousRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{14} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{16} } func (x *GetExpiringProfileKeyCredentialAnonymousRequest) GetRequest() *GetExpiringProfileKeyCredentialRequest { @@ -1417,7 +1516,7 @@ type GetExpiringProfileKeyCredentialResult struct { func (x *GetExpiringProfileKeyCredentialResult) Reset() { *x = GetExpiringProfileKeyCredentialResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[15] + mi := &file_org_signal_chat_profile_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1429,7 +1528,7 @@ func (x *GetExpiringProfileKeyCredentialResult) String() string { func (*GetExpiringProfileKeyCredentialResult) ProtoMessage() {} func (x *GetExpiringProfileKeyCredentialResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[15] + mi := &file_org_signal_chat_profile_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1442,7 +1541,7 @@ func (x *GetExpiringProfileKeyCredentialResult) ProtoReflect() protoreflect.Mess // Deprecated: Use GetExpiringProfileKeyCredentialResult.ProtoReflect.Descriptor instead. func (*GetExpiringProfileKeyCredentialResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{15} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{17} } func (x *GetExpiringProfileKeyCredentialResult) GetProfileKeyCredential() []byte { @@ -1466,7 +1565,7 @@ type GetExpiringProfileKeyCredentialAnonymousResponse struct { func (x *GetExpiringProfileKeyCredentialAnonymousResponse) Reset() { *x = GetExpiringProfileKeyCredentialAnonymousResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[16] + mi := &file_org_signal_chat_profile_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1478,7 +1577,7 @@ func (x *GetExpiringProfileKeyCredentialAnonymousResponse) String() string { func (*GetExpiringProfileKeyCredentialAnonymousResponse) ProtoMessage() {} func (x *GetExpiringProfileKeyCredentialAnonymousResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[16] + mi := &file_org_signal_chat_profile_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1491,7 +1590,7 @@ func (x *GetExpiringProfileKeyCredentialAnonymousResponse) ProtoReflect() protor // Deprecated: Use GetExpiringProfileKeyCredentialAnonymousResponse.ProtoReflect.Descriptor instead. func (*GetExpiringProfileKeyCredentialAnonymousResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{16} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{18} } func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetResponse() isGetExpiringProfileKeyCredentialAnonymousResponse_Response { @@ -1562,7 +1661,7 @@ type GetAvatarCredentialsRequest struct { func (x *GetAvatarCredentialsRequest) Reset() { *x = GetAvatarCredentialsRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[17] + mi := &file_org_signal_chat_profile_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1574,7 +1673,7 @@ func (x *GetAvatarCredentialsRequest) String() string { func (*GetAvatarCredentialsRequest) ProtoMessage() {} func (x *GetAvatarCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[17] + mi := &file_org_signal_chat_profile_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1587,7 +1686,7 @@ func (x *GetAvatarCredentialsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAvatarCredentialsRequest.ProtoReflect.Descriptor instead. func (*GetAvatarCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{17} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{19} } func (x *GetAvatarCredentialsRequest) GetAvatarCredentialsRequest() []byte { @@ -1610,7 +1709,7 @@ type GetAvatarCredentialsResponse struct { func (x *GetAvatarCredentialsResponse) Reset() { *x = GetAvatarCredentialsResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[18] + mi := &file_org_signal_chat_profile_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1622,7 +1721,7 @@ func (x *GetAvatarCredentialsResponse) String() string { func (*GetAvatarCredentialsResponse) ProtoMessage() {} func (x *GetAvatarCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[18] + mi := &file_org_signal_chat_profile_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1635,7 +1734,7 @@ func (x *GetAvatarCredentialsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAvatarCredentialsResponse.ProtoReflect.Descriptor instead. func (*GetAvatarCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{18} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{20} } func (x *GetAvatarCredentialsResponse) GetResponse() isGetAvatarCredentialsResponse_Response { @@ -1693,7 +1792,7 @@ type GetAvatarUploadFormRequest struct { func (x *GetAvatarUploadFormRequest) Reset() { *x = GetAvatarUploadFormRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[19] + mi := &file_org_signal_chat_profile_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1705,7 +1804,7 @@ func (x *GetAvatarUploadFormRequest) String() string { func (*GetAvatarUploadFormRequest) ProtoMessage() {} func (x *GetAvatarUploadFormRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[19] + mi := &file_org_signal_chat_profile_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1718,7 +1817,7 @@ func (x *GetAvatarUploadFormRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAvatarUploadFormRequest.ProtoReflect.Descriptor instead. func (*GetAvatarUploadFormRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{19} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{21} } func (x *GetAvatarUploadFormRequest) GetAvatarCredentialsPresentation() []byte { @@ -1748,7 +1847,7 @@ type GetAvatarUploadFormResponse struct { func (x *GetAvatarUploadFormResponse) Reset() { *x = GetAvatarUploadFormResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[20] + mi := &file_org_signal_chat_profile_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1760,7 +1859,7 @@ func (x *GetAvatarUploadFormResponse) String() string { func (*GetAvatarUploadFormResponse) ProtoMessage() {} func (x *GetAvatarUploadFormResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[20] + mi := &file_org_signal_chat_profile_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1773,7 +1872,7 @@ func (x *GetAvatarUploadFormResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAvatarUploadFormResponse.ProtoReflect.Descriptor instead. func (*GetAvatarUploadFormResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{20} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{22} } func (x *GetAvatarUploadFormResponse) GetResponse() isGetAvatarUploadFormResponse_Response { @@ -1806,6 +1905,7 @@ type isGetAvatarUploadFormResponse_Response interface { } type GetAvatarUploadFormResponse_AvatarUploadForm struct { + // the policy and credential used by clients to upload an avatar to the CDN AvatarUploadForm *common.S3UploadForm `protobuf:"bytes,1,opt,name=avatar_upload_form,json=avatarUploadForm,proto3,oneof"` } @@ -1827,7 +1927,7 @@ type ExtendAvatarTTLRequest struct { func (x *ExtendAvatarTTLRequest) Reset() { *x = ExtendAvatarTTLRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[21] + mi := &file_org_signal_chat_profile_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1839,7 +1939,7 @@ func (x *ExtendAvatarTTLRequest) String() string { func (*ExtendAvatarTTLRequest) ProtoMessage() {} func (x *ExtendAvatarTTLRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[21] + mi := &file_org_signal_chat_profile_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1852,7 +1952,7 @@ func (x *ExtendAvatarTTLRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtendAvatarTTLRequest.ProtoReflect.Descriptor instead. func (*ExtendAvatarTTLRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{21} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{23} } func (x *ExtendAvatarTTLRequest) GetAvatarCredentialsPresentation() []byte { @@ -1876,7 +1976,7 @@ type ExtendAvatarTTLResponse struct { func (x *ExtendAvatarTTLResponse) Reset() { *x = ExtendAvatarTTLResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[22] + mi := &file_org_signal_chat_profile_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1888,7 +1988,7 @@ func (x *ExtendAvatarTTLResponse) String() string { func (*ExtendAvatarTTLResponse) ProtoMessage() {} func (x *ExtendAvatarTTLResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[22] + mi := &file_org_signal_chat_profile_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1901,7 +2001,7 @@ func (x *ExtendAvatarTTLResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtendAvatarTTLResponse.ProtoReflect.Descriptor instead. func (*ExtendAvatarTTLResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{22} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{24} } func (x *ExtendAvatarTTLResponse) GetResponse() isExtendAvatarTTLResponse_Response { @@ -1971,7 +2071,7 @@ type DeleteAvatarRequest struct { func (x *DeleteAvatarRequest) Reset() { *x = DeleteAvatarRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[23] + mi := &file_org_signal_chat_profile_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1983,7 +2083,7 @@ func (x *DeleteAvatarRequest) String() string { func (*DeleteAvatarRequest) ProtoMessage() {} func (x *DeleteAvatarRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[23] + mi := &file_org_signal_chat_profile_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1996,7 +2096,7 @@ func (x *DeleteAvatarRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAvatarRequest.ProtoReflect.Descriptor instead. func (*DeleteAvatarRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{23} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{25} } func (x *DeleteAvatarRequest) GetAvatarCredentialsPresentation() []byte { @@ -2019,7 +2119,7 @@ type DeleteAvatarResponse struct { func (x *DeleteAvatarResponse) Reset() { *x = DeleteAvatarResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[24] + mi := &file_org_signal_chat_profile_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2031,7 +2131,7 @@ func (x *DeleteAvatarResponse) String() string { func (*DeleteAvatarResponse) ProtoMessage() {} func (x *DeleteAvatarResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[24] + mi := &file_org_signal_chat_profile_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2044,7 +2144,7 @@ func (x *DeleteAvatarResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAvatarResponse.ProtoReflect.Descriptor instead. func (*DeleteAvatarResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{24} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{26} } func (x *DeleteAvatarResponse) GetResponse() isDeleteAvatarResponse_Response { @@ -2103,7 +2203,14 @@ const file_org_signal_chat_profile_proto_rawDesc = "" + "\fAvatarChange\x12\x1b\n" + "\x17AVATAR_CHANGE_UNCHANGED\x10\x00\x12\x17\n" + "\x13AVATAR_CHANGE_CLEAR\x10\x01\x12\x18\n" + - "\x14AVATAR_CHANGE_UPDATE\x10\x02\"\xa5\x03\n" + + "\x14AVATAR_CHANGE_UPDATE\x10\x02\"]\n" + + "\x12SetV1AvatarRequest\x12\x1f\n" + + "\aversion\x18\x01 \x01(\tB\x05\xa2\x97\"\x01@R\aversion\x12&\n" + + "\n" + + "commitment\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\x00aR\n" + + "commitment\"O\n" + + "\x13SetV1AvatarResponse\x128\n" + + "\x04form\x18\x01 \x01(\v2$.org.signal.chat.common.S3UploadFormR\x04form\"\xa5\x03\n" + "\x11SetProfileRequest\x12\x1f\n" + "\aversion\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\aversion\x12\x1f\n" + "\x04data\x18\x02 \x01(\fB\v\x88\x97\"\x01\x9a\x97\"\x03\x10\xa9\aR\x04data\x12C\n" + @@ -2224,13 +2331,14 @@ const file_org_signal_chat_profile_proto_rawDesc = "" + "\bresponse*[\n" + "\x0eCredentialType\x12\x1f\n" + "\x1bCREDENTIAL_TYPE_UNSPECIFIED\x10\x00\x12(\n" + - "$CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY\x10\x012\xe9\x02\n" + + "$CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY\x10\x012\xd5\x03\n" + "\aProfile\x12g\n" + "\n" + "SetProfile\x12*.org.signal.chat.profile.SetProfileRequest\x1a+.org.signal.chat.profile.SetProfileResponse\"\x00\x12g\n" + "\n" + "GetProfile\x12*.org.signal.chat.profile.GetProfileRequest\x1a+.org.signal.chat.profile.GetProfileResponse\"\x00\x12\x85\x01\n" + - "\x14GetAvatarCredentials\x124.org.signal.chat.profile.GetAvatarCredentialsRequest\x1a5.org.signal.chat.profile.GetAvatarCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xba\x05\n" + + "\x14GetAvatarCredentials\x124.org.signal.chat.profile.GetAvatarCredentialsRequest\x1a5.org.signal.chat.profile.GetAvatarCredentialsResponse\"\x00\x12j\n" + + "\vSetV1Avatar\x12+.org.signal.chat.profile.SetV1AvatarRequest\x1a,.org.signal.chat.profile.SetV1AvatarResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xba\x05\n" + "\x10ProfileAnonymous\x12y\n" + "\n" + "GetProfile\x123.org.signal.chat.profile.GetProfileAnonymousRequest\x1a4.org.signal.chat.profile.GetProfileAnonymousResponse\"\x00\x12\xb8\x01\n" + @@ -2252,97 +2360,102 @@ func file_org_signal_chat_profile_proto_rawDescGZIP() []byte { } var file_org_signal_chat_profile_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_org_signal_chat_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_org_signal_chat_profile_proto_goTypes = []any{ (CredentialType)(0), // 0: org.signal.chat.profile.CredentialType (SetProfileV1Request_AvatarChange)(0), // 1: org.signal.chat.profile.SetProfileV1Request.AvatarChange (*SetProfileV1Request)(nil), // 2: org.signal.chat.profile.SetProfileV1Request - (*SetProfileRequest)(nil), // 3: org.signal.chat.profile.SetProfileRequest - (*PaymentsForbiddenInRegion)(nil), // 4: org.signal.chat.profile.PaymentsForbiddenInRegion - (*ProfilesV2CapabilityRequired)(nil), // 5: org.signal.chat.profile.ProfilesV2CapabilityRequired - (*SetProfileResult)(nil), // 6: org.signal.chat.profile.SetProfileResult - (*SetProfileResponse)(nil), // 7: org.signal.chat.profile.SetProfileResponse - (*GetProfileRequest)(nil), // 8: org.signal.chat.profile.GetProfileRequest - (*GetProfileAnonymousRequest)(nil), // 9: org.signal.chat.profile.GetProfileAnonymousRequest - (*AccountInfo)(nil), // 10: org.signal.chat.profile.AccountInfo - (*ProfileResult)(nil), // 11: org.signal.chat.profile.ProfileResult - (*LegacyProfileResult)(nil), // 12: org.signal.chat.profile.LegacyProfileResult - (*GetProfileResponse)(nil), // 13: org.signal.chat.profile.GetProfileResponse - (*GetProfileAnonymousResponse)(nil), // 14: org.signal.chat.profile.GetProfileAnonymousResponse - (*GetExpiringProfileKeyCredentialRequest)(nil), // 15: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest - (*GetExpiringProfileKeyCredentialAnonymousRequest)(nil), // 16: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest - (*GetExpiringProfileKeyCredentialResult)(nil), // 17: org.signal.chat.profile.GetExpiringProfileKeyCredentialResult - (*GetExpiringProfileKeyCredentialAnonymousResponse)(nil), // 18: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse - (*GetAvatarCredentialsRequest)(nil), // 19: org.signal.chat.profile.GetAvatarCredentialsRequest - (*GetAvatarCredentialsResponse)(nil), // 20: org.signal.chat.profile.GetAvatarCredentialsResponse - (*GetAvatarUploadFormRequest)(nil), // 21: org.signal.chat.profile.GetAvatarUploadFormRequest - (*GetAvatarUploadFormResponse)(nil), // 22: org.signal.chat.profile.GetAvatarUploadFormResponse - (*ExtendAvatarTTLRequest)(nil), // 23: org.signal.chat.profile.ExtendAvatarTTLRequest - (*ExtendAvatarTTLResponse)(nil), // 24: org.signal.chat.profile.ExtendAvatarTTLResponse - (*DeleteAvatarRequest)(nil), // 25: org.signal.chat.profile.DeleteAvatarRequest - (*DeleteAvatarResponse)(nil), // 26: org.signal.chat.profile.DeleteAvatarResponse - (*common.S3UploadForm)(nil), // 27: org.signal.chat.common.S3UploadForm - (*errors.FailedPrecondition)(nil), // 28: org.signal.chat.errors.FailedPrecondition - (*common.ServiceIdentifier)(nil), // 29: org.signal.chat.common.ServiceIdentifier - (*errors.NotFound)(nil), // 30: org.signal.chat.errors.NotFound - (*errors.FailedUnidentifiedAuthorization)(nil), // 31: org.signal.chat.errors.FailedUnidentifiedAuthorization - (*errors.FailedZkAuthentication)(nil), // 32: org.signal.chat.errors.FailedZkAuthentication - (*emptypb.Empty)(nil), // 33: google.protobuf.Empty + (*SetV1AvatarRequest)(nil), // 3: org.signal.chat.profile.SetV1AvatarRequest + (*SetV1AvatarResponse)(nil), // 4: org.signal.chat.profile.SetV1AvatarResponse + (*SetProfileRequest)(nil), // 5: org.signal.chat.profile.SetProfileRequest + (*PaymentsForbiddenInRegion)(nil), // 6: org.signal.chat.profile.PaymentsForbiddenInRegion + (*ProfilesV2CapabilityRequired)(nil), // 7: org.signal.chat.profile.ProfilesV2CapabilityRequired + (*SetProfileResult)(nil), // 8: org.signal.chat.profile.SetProfileResult + (*SetProfileResponse)(nil), // 9: org.signal.chat.profile.SetProfileResponse + (*GetProfileRequest)(nil), // 10: org.signal.chat.profile.GetProfileRequest + (*GetProfileAnonymousRequest)(nil), // 11: org.signal.chat.profile.GetProfileAnonymousRequest + (*AccountInfo)(nil), // 12: org.signal.chat.profile.AccountInfo + (*ProfileResult)(nil), // 13: org.signal.chat.profile.ProfileResult + (*LegacyProfileResult)(nil), // 14: org.signal.chat.profile.LegacyProfileResult + (*GetProfileResponse)(nil), // 15: org.signal.chat.profile.GetProfileResponse + (*GetProfileAnonymousResponse)(nil), // 16: org.signal.chat.profile.GetProfileAnonymousResponse + (*GetExpiringProfileKeyCredentialRequest)(nil), // 17: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest + (*GetExpiringProfileKeyCredentialAnonymousRequest)(nil), // 18: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest + (*GetExpiringProfileKeyCredentialResult)(nil), // 19: org.signal.chat.profile.GetExpiringProfileKeyCredentialResult + (*GetExpiringProfileKeyCredentialAnonymousResponse)(nil), // 20: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse + (*GetAvatarCredentialsRequest)(nil), // 21: org.signal.chat.profile.GetAvatarCredentialsRequest + (*GetAvatarCredentialsResponse)(nil), // 22: org.signal.chat.profile.GetAvatarCredentialsResponse + (*GetAvatarUploadFormRequest)(nil), // 23: org.signal.chat.profile.GetAvatarUploadFormRequest + (*GetAvatarUploadFormResponse)(nil), // 24: org.signal.chat.profile.GetAvatarUploadFormResponse + (*ExtendAvatarTTLRequest)(nil), // 25: org.signal.chat.profile.ExtendAvatarTTLRequest + (*ExtendAvatarTTLResponse)(nil), // 26: org.signal.chat.profile.ExtendAvatarTTLResponse + (*DeleteAvatarRequest)(nil), // 27: org.signal.chat.profile.DeleteAvatarRequest + (*DeleteAvatarResponse)(nil), // 28: org.signal.chat.profile.DeleteAvatarResponse + (*common.S3UploadForm)(nil), // 29: org.signal.chat.common.S3UploadForm + (*errors.FailedPrecondition)(nil), // 30: org.signal.chat.errors.FailedPrecondition + (*common.ServiceIdentifier)(nil), // 31: org.signal.chat.common.ServiceIdentifier + (*errors.NotFound)(nil), // 32: org.signal.chat.errors.NotFound + (*errors.FailedUnidentifiedAuthorization)(nil), // 33: org.signal.chat.errors.FailedUnidentifiedAuthorization + (*errors.FailedZkAuthentication)(nil), // 34: org.signal.chat.errors.FailedZkAuthentication + (*emptypb.Empty)(nil), // 35: google.protobuf.Empty } var file_org_signal_chat_profile_proto_depIdxs = []int32{ 1, // 0: org.signal.chat.profile.SetProfileV1Request.avatar_change:type_name -> org.signal.chat.profile.SetProfileV1Request.AvatarChange - 2, // 1: org.signal.chat.profile.SetProfileRequest.v1Request:type_name -> org.signal.chat.profile.SetProfileV1Request - 27, // 2: org.signal.chat.profile.SetProfileResult.v1_avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm - 6, // 3: org.signal.chat.profile.SetProfileResponse.result:type_name -> org.signal.chat.profile.SetProfileResult - 28, // 4: org.signal.chat.profile.SetProfileResponse.expected_data_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 4, // 5: org.signal.chat.profile.SetProfileResponse.payments_forbidden_in_region:type_name -> org.signal.chat.profile.PaymentsForbiddenInRegion - 28, // 6: org.signal.chat.profile.SetProfileResponse.expected_version_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 5, // 7: org.signal.chat.profile.SetProfileResponse.profiles_v2_capability_required:type_name -> org.signal.chat.profile.ProfilesV2CapabilityRequired - 29, // 8: org.signal.chat.profile.GetProfileRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 8, // 9: org.signal.chat.profile.GetProfileAnonymousRequest.request:type_name -> org.signal.chat.profile.GetProfileRequest - 10, // 10: org.signal.chat.profile.ProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo - 10, // 11: org.signal.chat.profile.LegacyProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo - 11, // 12: org.signal.chat.profile.GetProfileResponse.profile:type_name -> org.signal.chat.profile.ProfileResult - 30, // 13: org.signal.chat.profile.GetProfileResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 12, // 14: org.signal.chat.profile.GetProfileResponse.legacy_profile:type_name -> org.signal.chat.profile.LegacyProfileResult - 11, // 15: org.signal.chat.profile.GetProfileAnonymousResponse.profile:type_name -> org.signal.chat.profile.ProfileResult - 30, // 16: org.signal.chat.profile.GetProfileAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 31, // 17: org.signal.chat.profile.GetProfileAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 12, // 18: org.signal.chat.profile.GetProfileAnonymousResponse.profile_v1:type_name -> org.signal.chat.profile.LegacyProfileResult - 29, // 19: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 0, // 20: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.credential_type:type_name -> org.signal.chat.profile.CredentialType - 15, // 21: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest.request:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest - 17, // 22: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.result:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialResult - 30, // 23: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 31, // 24: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 28, // 25: org.signal.chat.profile.GetAvatarCredentialsResponse.missing_zk_credential_key:type_name -> org.signal.chat.errors.FailedPrecondition - 27, // 26: org.signal.chat.profile.GetAvatarUploadFormResponse.avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm - 32, // 27: org.signal.chat.profile.GetAvatarUploadFormResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 32, // 28: org.signal.chat.profile.ExtendAvatarTTLResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 30, // 29: org.signal.chat.profile.ExtendAvatarTTLResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 33, // 30: org.signal.chat.profile.DeleteAvatarResponse.success:type_name -> google.protobuf.Empty - 32, // 31: org.signal.chat.profile.DeleteAvatarResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 3, // 32: org.signal.chat.profile.Profile.SetProfile:input_type -> org.signal.chat.profile.SetProfileRequest - 8, // 33: org.signal.chat.profile.Profile.GetProfile:input_type -> org.signal.chat.profile.GetProfileRequest - 19, // 34: org.signal.chat.profile.Profile.GetAvatarCredentials:input_type -> org.signal.chat.profile.GetAvatarCredentialsRequest - 9, // 35: org.signal.chat.profile.ProfileAnonymous.GetProfile:input_type -> org.signal.chat.profile.GetProfileAnonymousRequest - 16, // 36: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:input_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest - 21, // 37: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:input_type -> org.signal.chat.profile.GetAvatarUploadFormRequest - 23, // 38: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:input_type -> org.signal.chat.profile.ExtendAvatarTTLRequest - 25, // 39: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:input_type -> org.signal.chat.profile.DeleteAvatarRequest - 7, // 40: org.signal.chat.profile.Profile.SetProfile:output_type -> org.signal.chat.profile.SetProfileResponse - 13, // 41: org.signal.chat.profile.Profile.GetProfile:output_type -> org.signal.chat.profile.GetProfileResponse - 20, // 42: org.signal.chat.profile.Profile.GetAvatarCredentials:output_type -> org.signal.chat.profile.GetAvatarCredentialsResponse - 14, // 43: org.signal.chat.profile.ProfileAnonymous.GetProfile:output_type -> org.signal.chat.profile.GetProfileAnonymousResponse - 18, // 44: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:output_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse - 22, // 45: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:output_type -> org.signal.chat.profile.GetAvatarUploadFormResponse - 24, // 46: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:output_type -> org.signal.chat.profile.ExtendAvatarTTLResponse - 26, // 47: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:output_type -> org.signal.chat.profile.DeleteAvatarResponse - 40, // [40:48] is the sub-list for method output_type - 32, // [32:40] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name + 29, // 1: org.signal.chat.profile.SetV1AvatarResponse.form:type_name -> org.signal.chat.common.S3UploadForm + 2, // 2: org.signal.chat.profile.SetProfileRequest.v1Request:type_name -> org.signal.chat.profile.SetProfileV1Request + 29, // 3: org.signal.chat.profile.SetProfileResult.v1_avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm + 8, // 4: org.signal.chat.profile.SetProfileResponse.result:type_name -> org.signal.chat.profile.SetProfileResult + 30, // 5: org.signal.chat.profile.SetProfileResponse.expected_data_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 6, // 6: org.signal.chat.profile.SetProfileResponse.payments_forbidden_in_region:type_name -> org.signal.chat.profile.PaymentsForbiddenInRegion + 30, // 7: org.signal.chat.profile.SetProfileResponse.expected_version_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 7, // 8: org.signal.chat.profile.SetProfileResponse.profiles_v2_capability_required:type_name -> org.signal.chat.profile.ProfilesV2CapabilityRequired + 31, // 9: org.signal.chat.profile.GetProfileRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 10, // 10: org.signal.chat.profile.GetProfileAnonymousRequest.request:type_name -> org.signal.chat.profile.GetProfileRequest + 12, // 11: org.signal.chat.profile.ProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo + 12, // 12: org.signal.chat.profile.LegacyProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo + 13, // 13: org.signal.chat.profile.GetProfileResponse.profile:type_name -> org.signal.chat.profile.ProfileResult + 32, // 14: org.signal.chat.profile.GetProfileResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 14, // 15: org.signal.chat.profile.GetProfileResponse.legacy_profile:type_name -> org.signal.chat.profile.LegacyProfileResult + 13, // 16: org.signal.chat.profile.GetProfileAnonymousResponse.profile:type_name -> org.signal.chat.profile.ProfileResult + 32, // 17: org.signal.chat.profile.GetProfileAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 33, // 18: org.signal.chat.profile.GetProfileAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 14, // 19: org.signal.chat.profile.GetProfileAnonymousResponse.profile_v1:type_name -> org.signal.chat.profile.LegacyProfileResult + 31, // 20: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 0, // 21: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.credential_type:type_name -> org.signal.chat.profile.CredentialType + 17, // 22: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest.request:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest + 19, // 23: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.result:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialResult + 32, // 24: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 33, // 25: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 30, // 26: org.signal.chat.profile.GetAvatarCredentialsResponse.missing_zk_credential_key:type_name -> org.signal.chat.errors.FailedPrecondition + 29, // 27: org.signal.chat.profile.GetAvatarUploadFormResponse.avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm + 34, // 28: org.signal.chat.profile.GetAvatarUploadFormResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 34, // 29: org.signal.chat.profile.ExtendAvatarTTLResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 32, // 30: org.signal.chat.profile.ExtendAvatarTTLResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 35, // 31: org.signal.chat.profile.DeleteAvatarResponse.success:type_name -> google.protobuf.Empty + 34, // 32: org.signal.chat.profile.DeleteAvatarResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 5, // 33: org.signal.chat.profile.Profile.SetProfile:input_type -> org.signal.chat.profile.SetProfileRequest + 10, // 34: org.signal.chat.profile.Profile.GetProfile:input_type -> org.signal.chat.profile.GetProfileRequest + 21, // 35: org.signal.chat.profile.Profile.GetAvatarCredentials:input_type -> org.signal.chat.profile.GetAvatarCredentialsRequest + 3, // 36: org.signal.chat.profile.Profile.SetV1Avatar:input_type -> org.signal.chat.profile.SetV1AvatarRequest + 11, // 37: org.signal.chat.profile.ProfileAnonymous.GetProfile:input_type -> org.signal.chat.profile.GetProfileAnonymousRequest + 18, // 38: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:input_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest + 23, // 39: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:input_type -> org.signal.chat.profile.GetAvatarUploadFormRequest + 25, // 40: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:input_type -> org.signal.chat.profile.ExtendAvatarTTLRequest + 27, // 41: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:input_type -> org.signal.chat.profile.DeleteAvatarRequest + 9, // 42: org.signal.chat.profile.Profile.SetProfile:output_type -> org.signal.chat.profile.SetProfileResponse + 15, // 43: org.signal.chat.profile.Profile.GetProfile:output_type -> org.signal.chat.profile.GetProfileResponse + 22, // 44: org.signal.chat.profile.Profile.GetAvatarCredentials:output_type -> org.signal.chat.profile.GetAvatarCredentialsResponse + 4, // 45: org.signal.chat.profile.Profile.SetV1Avatar:output_type -> org.signal.chat.profile.SetV1AvatarResponse + 16, // 46: org.signal.chat.profile.ProfileAnonymous.GetProfile:output_type -> org.signal.chat.profile.GetProfileAnonymousResponse + 20, // 47: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:output_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse + 24, // 48: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:output_type -> org.signal.chat.profile.GetAvatarUploadFormResponse + 26, // 49: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:output_type -> org.signal.chat.profile.ExtendAvatarTTLResponse + 28, // 50: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:output_type -> org.signal.chat.profile.DeleteAvatarResponse + 42, // [42:51] is the sub-list for method output_type + 33, // [33:42] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name } func init() { file_org_signal_chat_profile_proto_init() } @@ -2350,50 +2463,50 @@ func file_org_signal_chat_profile_proto_init() { if File_org_signal_chat_profile_proto != nil { return } - file_org_signal_chat_profile_proto_msgTypes[4].OneofWrappers = []any{} - file_org_signal_chat_profile_proto_msgTypes[5].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[6].OneofWrappers = []any{} + file_org_signal_chat_profile_proto_msgTypes[7].OneofWrappers = []any{ (*SetProfileResponse_Result)(nil), (*SetProfileResponse_ExpectedDataWriteConflict)(nil), (*SetProfileResponse_PaymentsForbiddenInRegion)(nil), (*SetProfileResponse_ExpectedVersionWriteConflict)(nil), (*SetProfileResponse_ProfilesV2CapabilityRequired)(nil), } - file_org_signal_chat_profile_proto_msgTypes[7].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[9].OneofWrappers = []any{ (*GetProfileAnonymousRequest_UnidentifiedAccessKey)(nil), (*GetProfileAnonymousRequest_GroupSendToken)(nil), } - file_org_signal_chat_profile_proto_msgTypes[11].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[13].OneofWrappers = []any{ (*GetProfileResponse_Profile)(nil), (*GetProfileResponse_EtagMatched)(nil), (*GetProfileResponse_NotFound)(nil), (*GetProfileResponse_LegacyProfile)(nil), } - file_org_signal_chat_profile_proto_msgTypes[12].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[14].OneofWrappers = []any{ (*GetProfileAnonymousResponse_Profile)(nil), (*GetProfileAnonymousResponse_EtagMatched)(nil), (*GetProfileAnonymousResponse_NotFound)(nil), (*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization)(nil), (*GetProfileAnonymousResponse_ProfileV1)(nil), } - file_org_signal_chat_profile_proto_msgTypes[16].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[18].OneofWrappers = []any{ (*GetExpiringProfileKeyCredentialAnonymousResponse_Result)(nil), (*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound)(nil), (*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization)(nil), } - file_org_signal_chat_profile_proto_msgTypes[18].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[20].OneofWrappers = []any{ (*GetAvatarCredentialsResponse_AvatarCredentials)(nil), (*GetAvatarCredentialsResponse_MissingZkCredentialKey)(nil), } - file_org_signal_chat_profile_proto_msgTypes[20].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[22].OneofWrappers = []any{ (*GetAvatarUploadFormResponse_AvatarUploadForm)(nil), (*GetAvatarUploadFormResponse_InvalidCredentialsPresentation)(nil), } - file_org_signal_chat_profile_proto_msgTypes[22].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[24].OneofWrappers = []any{ (*ExtendAvatarTTLResponse_Path)(nil), (*ExtendAvatarTTLResponse_InvalidCredentialsPresentation)(nil), (*ExtendAvatarTTLResponse_NotFound)(nil), } - file_org_signal_chat_profile_proto_msgTypes[24].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[26].OneofWrappers = []any{ (*DeleteAvatarResponse_Success)(nil), (*DeleteAvatarResponse_InvalidCredentialsPresentation)(nil), } @@ -2403,7 +2516,7 @@ func file_org_signal_chat_profile_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_profile_proto_rawDesc), len(file_org_signal_chat_profile_proto_rawDesc)), NumEnums: 2, - NumMessages: 25, + NumMessages: 27, NumExtensions: 0, NumServices: 2, }, diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go index f7be155..01e8c6f 100644 --- a/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go @@ -26,6 +26,7 @@ const ( Profile_SetProfile_FullMethodName = "/org.signal.chat.profile.Profile/SetProfile" Profile_GetProfile_FullMethodName = "/org.signal.chat.profile.Profile/GetProfile" Profile_GetAvatarCredentials_FullMethodName = "/org.signal.chat.profile.Profile/GetAvatarCredentials" + Profile_SetV1Avatar_FullMethodName = "/org.signal.chat.profile.Profile/SetV1Avatar" ) // ProfileClient is the client API for Profile service. @@ -43,6 +44,16 @@ type ProfileClient interface { // // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC GetAvatarCredentials(ctx context.Context, in *GetAvatarCredentialsRequest, opts ...grpc.CallOption) (*GetAvatarCredentialsResponse, error) + // Returns credentials used by clients to upload a v1 avatar, deleting any current avatar. + // + // This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads: + // 1. SetV1Avatar + // 2. Upload to CDN + // 3. SetProfile with v1 `AVATAR_CHANGE_UNCHANGED` and the v1 avatar in the v2 profile body + // + // Clients that do this will be required to upload current avatars using `ProfilesAnonymous.GetAvatarUploadFormRequest` + // once v1 Profile APIs are no longer supported. + SetV1Avatar(ctx context.Context, in *SetV1AvatarRequest, opts ...grpc.CallOption) (*SetV1AvatarResponse, error) } type profileClient struct { @@ -83,6 +94,16 @@ func (c *profileClient) GetAvatarCredentials(ctx context.Context, in *GetAvatarC return out, nil } +func (c *profileClient) SetV1Avatar(ctx context.Context, in *SetV1AvatarRequest, opts ...grpc.CallOption) (*SetV1AvatarResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetV1AvatarResponse) + err := c.cc.Invoke(ctx, Profile_SetV1Avatar_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ProfileServer is the server API for Profile service. // All implementations must embed UnimplementedProfileServer // for forward compatibility. @@ -98,6 +119,16 @@ type ProfileServer interface { // // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) + // Returns credentials used by clients to upload a v1 avatar, deleting any current avatar. + // + // This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads: + // 1. SetV1Avatar + // 2. Upload to CDN + // 3. SetProfile with v1 `AVATAR_CHANGE_UNCHANGED` and the v1 avatar in the v2 profile body + // + // Clients that do this will be required to upload current avatars using `ProfilesAnonymous.GetAvatarUploadFormRequest` + // once v1 Profile APIs are no longer supported. + SetV1Avatar(context.Context, *SetV1AvatarRequest) (*SetV1AvatarResponse, error) mustEmbedUnimplementedProfileServer() } @@ -117,6 +148,9 @@ func (UnimplementedProfileServer) GetProfile(context.Context, *GetProfileRequest func (UnimplementedProfileServer) GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAvatarCredentials not implemented") } +func (UnimplementedProfileServer) SetV1Avatar(context.Context, *SetV1AvatarRequest) (*SetV1AvatarResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetV1Avatar not implemented") +} func (UnimplementedProfileServer) mustEmbedUnimplementedProfileServer() {} func (UnimplementedProfileServer) testEmbeddedByValue() {} @@ -192,6 +226,24 @@ func _Profile_GetAvatarCredentials_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Profile_SetV1Avatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetV1AvatarRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileServer).SetV1Avatar(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Profile_SetV1Avatar_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileServer).SetV1Avatar(ctx, req.(*SetV1AvatarRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Profile_ServiceDesc is the grpc.ServiceDesc for Profile service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -211,6 +263,10 @@ var Profile_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetAvatarCredentials", Handler: _Profile_GetAvatarCredentials_Handler, }, + { + MethodName: "SetV1Avatar", + Handler: _Profile_SetV1Avatar_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "org/signal/chat/profile.proto", diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go index f39f345..e08d9a9 100644 --- a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go +++ b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go @@ -260,8 +260,9 @@ func (BankTransferType) EnumDescriptor() ([]byte, []int) { } type UpdateSubscriberRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriber_id,json=subscriberId,proto3" json:"subscriber_id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // New subscriber-ids must be a randomly-generated 32 byte byte-string. + SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriber_id,json=subscriberId,proto3" json:"subscriber_id,omitempty"` // A libsignal DonationPermit from rpc Donations.CreateDonationPermit. // Not required if the subscriber already exists. DonationPermit []byte `protobuf:"bytes,2,opt,name=donation_permit,json=donationPermit,proto3" json:"donation_permit,omitempty"` @@ -318,7 +319,6 @@ type UpdateSubscriberResponse struct { // Types that are valid to be assigned to Response: // // *UpdateSubscriberResponse_Success - // *UpdateSubscriberResponse_SubscriberIdMismatch // *UpdateSubscriberResponse_PermitRejected Response isUpdateSubscriberResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields @@ -371,15 +371,6 @@ func (x *UpdateSubscriberResponse) GetSuccess() *emptypb.Empty { return nil } -func (x *UpdateSubscriberResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*UpdateSubscriberResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - func (x *UpdateSubscriberResponse) GetPermitRejected() *errors.FailedZkAuthentication { if x != nil { if x, ok := x.Response.(*UpdateSubscriberResponse_PermitRejected); ok { @@ -397,20 +388,13 @@ type UpdateSubscriberResponse_Success struct { Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` } -type UpdateSubscriberResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,2,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - type UpdateSubscriberResponse_PermitRejected struct { // The donation permit was expired or already spent - PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,3,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` + PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` } func (*UpdateSubscriberResponse_Success) isUpdateSubscriberResponse_Response() {} -func (*UpdateSubscriberResponse_SubscriberIdMismatch) isUpdateSubscriberResponse_Response() {} - func (*UpdateSubscriberResponse_PermitRejected) isUpdateSubscriberResponse_Response() {} type DeleteSubscriberRequest struct { @@ -542,6 +526,7 @@ type DeleteSubscriberResponse_Success struct { } type DeleteSubscriberResponse_SubscriberNotFound struct { + // The subscriber did not exist SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } @@ -625,7 +610,6 @@ type CreatePaymentMethodResponse struct { // // *CreatePaymentMethodResponse_Result // *CreatePaymentMethodResponse_SubscriberNotFound - // *CreatePaymentMethodResponse_SubscriberIdMismatch // *CreatePaymentMethodResponse_SubscriptionProcessorConflict // *CreatePaymentMethodResponse_PermitRejected Response isCreatePaymentMethodResponse_Response `protobuf_oneof:"response"` @@ -688,15 +672,6 @@ func (x *CreatePaymentMethodResponse) GetSubscriberNotFound() *errors.NotFound { return nil } -func (x *CreatePaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - func (x *CreatePaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { if x != nil { if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriptionProcessorConflict); ok { @@ -724,30 +699,25 @@ type CreatePaymentMethodResponse_Result struct { } type CreatePaymentMethodResponse_SubscriberNotFound struct { + // The subscriber did not exist SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type CreatePaymentMethodResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - type CreatePaymentMethodResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` + // New payment processor does not match existing processor associated with + // the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` } type CreatePaymentMethodResponse_PermitRejected struct { // The donation permit was expired or already spent - PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,5,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` + PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,4,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` } func (*CreatePaymentMethodResponse_Result) isCreatePaymentMethodResponse_Response() {} func (*CreatePaymentMethodResponse_SubscriberNotFound) isCreatePaymentMethodResponse_Response() {} -func (*CreatePaymentMethodResponse_SubscriberIdMismatch) isCreatePaymentMethodResponse_Response() {} - func (*CreatePaymentMethodResponse_SubscriptionProcessorConflict) isCreatePaymentMethodResponse_Response() { } @@ -821,7 +791,6 @@ type CreatePayPalPaymentMethodResponse struct { // // *CreatePayPalPaymentMethodResponse_Result // *CreatePayPalPaymentMethodResponse_SubscriberNotFound - // *CreatePayPalPaymentMethodResponse_SubscriberIdMismatch // *CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict Response isCreatePayPalPaymentMethodResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields @@ -883,15 +852,6 @@ func (x *CreatePayPalPaymentMethodResponse) GetSubscriberNotFound() *errors.NotF return nil } -func (x *CreatePayPalPaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - func (x *CreatePayPalPaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { if x != nil { if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict); ok { @@ -910,17 +870,14 @@ type CreatePayPalPaymentMethodResponse_Result struct { } type CreatePayPalPaymentMethodResponse_SubscriberNotFound struct { + // The subscriber did not exist SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type CreatePayPalPaymentMethodResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - type CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` + // New payment processor does not match existing processor associated with + // the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` } func (*CreatePayPalPaymentMethodResponse_Result) isCreatePayPalPaymentMethodResponse_Response() {} @@ -928,9 +885,6 @@ func (*CreatePayPalPaymentMethodResponse_Result) isCreatePayPalPaymentMethodResp func (*CreatePayPalPaymentMethodResponse_SubscriberNotFound) isCreatePayPalPaymentMethodResponse_Response() { } -func (*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch) isCreatePayPalPaymentMethodResponse_Response() { -} - func (*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict) isCreatePayPalPaymentMethodResponse_Response() { } @@ -1046,9 +1000,7 @@ type SetDefaultPaymentMethodResponse struct { // // *SetDefaultPaymentMethodResponse_Success // *SetDefaultPaymentMethodResponse_SubscriberNotFound - // *SetDefaultPaymentMethodResponse_SubscriberIdMismatch // *SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp - // *SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict Response isSetDefaultPaymentMethodResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1109,15 +1061,6 @@ func (x *SetDefaultPaymentMethodResponse) GetSubscriberNotFound() *errors.NotFou return nil } -func (x *SetDefaultPaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - func (x *SetDefaultPaymentMethodResponse) GetPaymentMethodNotSetUp() *errors.FailedPrecondition { if x != nil { if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp); ok { @@ -1127,15 +1070,6 @@ func (x *SetDefaultPaymentMethodResponse) GetPaymentMethodNotSetUp() *errors.Fai return nil } -func (x *SetDefaultPaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict); ok { - return x.SubscriptionProcessorConflict - } - } - return nil -} - type isSetDefaultPaymentMethodResponse_Response interface { isSetDefaultPaymentMethodResponse_Response() } @@ -1145,21 +1079,14 @@ type SetDefaultPaymentMethodResponse_Success struct { } type SetDefaultPaymentMethodResponse_SubscriberNotFound struct { + // The subscriber did not exist, or the referenced setup intent was not found SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type SetDefaultPaymentMethodResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - type SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp struct { - PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` -} - -type SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict struct { - // Payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` + // No payment method has been created for the subscriber, or the provided + // payment method has not finished being set up with the processor + PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` } func (*SetDefaultPaymentMethodResponse_Success) isSetDefaultPaymentMethodResponse_Response() {} @@ -1167,15 +1094,9 @@ func (*SetDefaultPaymentMethodResponse_Success) isSetDefaultPaymentMethodRespons func (*SetDefaultPaymentMethodResponse_SubscriberNotFound) isSetDefaultPaymentMethodResponse_Response() { } -func (*SetDefaultPaymentMethodResponse_SubscriberIdMismatch) isSetDefaultPaymentMethodResponse_Response() { -} - func (*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp) isSetDefaultPaymentMethodResponse_Response() { } -func (*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict) isSetDefaultPaymentMethodResponse_Response() { -} - type SetSubscriptionLevelRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` @@ -1400,7 +1321,6 @@ type SetSubscriptionLevelResponse struct { // // *SetSubscriptionLevelResponse_Success // *SetSubscriptionLevelResponse_SubscriberNotFound - // *SetSubscriptionLevelResponse_SubscriberIdMismatch // *SetSubscriptionLevelResponse_SubscriptionProcessorConflict // *SetSubscriptionLevelResponse_PaymentMethodNotSetUp // *SetSubscriptionLevelResponse_UnsupportedOperation @@ -1470,15 +1390,6 @@ func (x *SetSubscriptionLevelResponse) GetSubscriberNotFound() *errors.NotFound return nil } -func (x *SetSubscriptionLevelResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - func (x *SetSubscriptionLevelResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { if x != nil { if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriptionProcessorConflict); ok { @@ -1569,64 +1480,60 @@ type SetSubscriptionLevelResponse_Success struct { } type SetSubscriptionLevelResponse_SubscriberNotFound struct { + // The subscriber did not exist SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type SetSubscriptionLevelResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - type SetSubscriptionLevelResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` + // New payment processor does not match existing processor associated with + // the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` } type SetSubscriptionLevelResponse_PaymentMethodNotSetUp struct { - PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` + // No payment method has been created for the subscriber + PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` } type SetSubscriptionLevelResponse_UnsupportedOperation struct { // The payment processor does not support this operation - UnsupportedOperation *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=unsupported_operation,json=unsupportedOperation,proto3,oneof"` + UnsupportedOperation *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=unsupported_operation,json=unsupportedOperation,proto3,oneof"` } type SetSubscriptionLevelResponse_UnsupportedLevel struct { // The requested level was invalid - UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` + UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` } type SetSubscriptionLevelResponse_UnsupportedCurrency struct { // The requested currency was invalid - UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,8,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` + UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` } type SetSubscriptionLevelResponse_PaymentRequiresAction struct { // The card could not be charged - PaymentRequiresAction *errors.FailedPrecondition `protobuf:"bytes,9,opt,name=payment_requires_action,json=paymentRequiresAction,proto3,oneof"` + PaymentRequiresAction *errors.FailedPrecondition `protobuf:"bytes,8,opt,name=payment_requires_action,json=paymentRequiresAction,proto3,oneof"` } type SetSubscriptionLevelResponse_InvalidLevelTransition struct { // Cannot transition from existing level to the requested level - InvalidLevelTransition *errors.FailedPrecondition `protobuf:"bytes,10,opt,name=invalid_level_transition,json=invalidLevelTransition,proto3,oneof"` + InvalidLevelTransition *errors.FailedPrecondition `protobuf:"bytes,9,opt,name=invalid_level_transition,json=invalidLevelTransition,proto3,oneof"` } type SetSubscriptionLevelResponse_InvalidIdempotencyKey struct { // The idempotency key was invalid or re-used with a modified request - InvalidIdempotencyKey *errors.FailedPrecondition `protobuf:"bytes,11,opt,name=invalid_idempotency_key,json=invalidIdempotencyKey,proto3,oneof"` + InvalidIdempotencyKey *errors.FailedPrecondition `protobuf:"bytes,10,opt,name=invalid_idempotency_key,json=invalidIdempotencyKey,proto3,oneof"` } type SetSubscriptionLevelResponse_ChargeFailure struct { // The payment failed; see charge failure details - ChargeFailure *ChargeFailure `protobuf:"bytes,12,opt,name=charge_failure,json=chargeFailure,proto3,oneof"` + ChargeFailure *ChargeFailure `protobuf:"bytes,11,opt,name=charge_failure,json=chargeFailure,proto3,oneof"` } func (*SetSubscriptionLevelResponse_Success) isSetSubscriptionLevelResponse_Response() {} func (*SetSubscriptionLevelResponse_SubscriberNotFound) isSetSubscriptionLevelResponse_Response() {} -func (*SetSubscriptionLevelResponse_SubscriberIdMismatch) isSetSubscriptionLevelResponse_Response() {} - func (*SetSubscriptionLevelResponse_SubscriptionProcessorConflict) isSetSubscriptionLevelResponse_Response() { } @@ -1746,7 +1653,6 @@ type SetIapSubscriptionResponse struct { // // *SetIapSubscriptionResponse_Success // *SetIapSubscriptionResponse_SubscriberNotFound - // *SetIapSubscriptionResponse_SubscriberIdMismatch // *SetIapSubscriptionResponse_SubscriptionProcessorConflict // *SetIapSubscriptionResponse_PaymentRequired // *SetIapSubscriptionResponse_InvalidTransaction @@ -1810,15 +1716,6 @@ func (x *SetIapSubscriptionResponse) GetSubscriberNotFound() *errors.NotFound { return nil } -func (x *SetIapSubscriptionResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - func (x *SetIapSubscriptionResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { if x != nil { if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriptionProcessorConflict); ok { @@ -1855,33 +1752,32 @@ type SetIapSubscriptionResponse_Success struct { } type SetIapSubscriptionResponse_SubscriberNotFound struct { + // The subscriber did not exist or the provided purchase identifier does not exist SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type SetIapSubscriptionResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - type SetIapSubscriptionResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` + // New payment processor does not match existing processor associated with + // the subscription + SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` } type SetIapSubscriptionResponse_PaymentRequired struct { - PaymentRequired *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=payment_required,json=paymentRequired,proto3,oneof"` + // The subscription is not in a purchase state that grants the user an + // entitlement + PaymentRequired *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=payment_required,json=paymentRequired,proto3,oneof"` } type SetIapSubscriptionResponse_InvalidTransaction struct { - InvalidTransaction *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=invalid_transaction,json=invalidTransaction,proto3,oneof"` + // The provided purchase identifier is malformed or the identified + // transaction is not supported for use at this endpoint + InvalidTransaction *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=invalid_transaction,json=invalidTransaction,proto3,oneof"` } func (*SetIapSubscriptionResponse_Success) isSetIapSubscriptionResponse_Response() {} func (*SetIapSubscriptionResponse_SubscriberNotFound) isSetIapSubscriptionResponse_Response() {} -func (*SetIapSubscriptionResponse_SubscriberIdMismatch) isSetIapSubscriptionResponse_Response() {} - func (*SetIapSubscriptionResponse_SubscriptionProcessorConflict) isSetIapSubscriptionResponse_Response() { } @@ -1947,7 +1843,6 @@ type GetReceiptCredentialsResponse struct { // // *GetReceiptCredentialsResponse_Success // *GetReceiptCredentialsResponse_SubscriberNotFound - // *GetReceiptCredentialsResponse_SubscriberIdMismatch // *GetReceiptCredentialsResponse_NoPaidInvoice // *GetReceiptCredentialsResponse_PaymentRequired // *GetReceiptCredentialsResponse_AlreadyRedeemed @@ -2011,15 +1906,6 @@ func (x *GetReceiptCredentialsResponse) GetSubscriberNotFound() *errors.NotFound return nil } -func (x *GetReceiptCredentialsResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - func (x *GetReceiptCredentialsResponse) GetNoPaidInvoice() *errors.FailedPrecondition { if x != nil { if x, ok := x.Response.(*GetReceiptCredentialsResponse_NoPaidInvoice); ok { @@ -2056,36 +1942,29 @@ type GetReceiptCredentialsResponse_Success struct { } type GetReceiptCredentialsResponse_SubscriberNotFound struct { + // The subscriber did not exist or it did not have an associated subscription SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type GetReceiptCredentialsResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - type GetReceiptCredentialsResponse_NoPaidInvoice struct { // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state - NoPaidInvoice *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=no_paid_invoice,json=noPaidInvoice,proto3,oneof"` + NoPaidInvoice *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=no_paid_invoice,json=noPaidInvoice,proto3,oneof"` } type GetReceiptCredentialsResponse_PaymentRequired struct { // Invoice is in any state other than 'draft', 'open', or 'paid'; Charge failure details may be present - PaymentRequired *PaymentRequired `protobuf:"bytes,5,opt,name=payment_required,json=paymentRequired,proto3,oneof"` + PaymentRequired *PaymentRequired `protobuf:"bytes,4,opt,name=payment_required,json=paymentRequired,proto3,oneof"` } type GetReceiptCredentialsResponse_AlreadyRedeemed struct { // Latest paid receipt on subscription was already redeemed for a receipt credential but with a different GetReceiptCredentialRequest - AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"` + AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"` } func (*GetReceiptCredentialsResponse_Success) isGetReceiptCredentialsResponse_Response() {} func (*GetReceiptCredentialsResponse_SubscriberNotFound) isGetReceiptCredentialsResponse_Response() {} -func (*GetReceiptCredentialsResponse_SubscriberIdMismatch) isGetReceiptCredentialsResponse_Response() { -} - func (*GetReceiptCredentialsResponse_NoPaidInvoice) isGetReceiptCredentialsResponse_Response() {} func (*GetReceiptCredentialsResponse_PaymentRequired) isGetReceiptCredentialsResponse_Response() {} @@ -2143,7 +2022,6 @@ type GetSubscriptionInformationResponse struct { // *GetSubscriptionInformationResponse_Success // *GetSubscriptionInformationResponse_NoSubscription // *GetSubscriptionInformationResponse_SubscriberNotFound - // *GetSubscriptionInformationResponse_SubscriberIdMismatch Response isGetSubscriptionInformationResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2213,15 +2091,6 @@ func (x *GetSubscriptionInformationResponse) GetSubscriberNotFound() *errors.Not return nil } -func (x *GetSubscriptionInformationResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetSubscriptionInformationResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - type isGetSubscriptionInformationResponse_Response interface { isGetSubscriptionInformationResponse_Response() } @@ -2231,18 +2100,15 @@ type GetSubscriptionInformationResponse_Success struct { } type GetSubscriptionInformationResponse_NoSubscription struct { + // The subscriber exists but has no subscription with a payment processor NoSubscription *emptypb.Empty `protobuf:"bytes,2,opt,name=no_subscription,json=noSubscription,proto3,oneof"` } type GetSubscriptionInformationResponse_SubscriberNotFound struct { + // The subscriber did not exist SubscriberNotFound *errors.NotFound `protobuf:"bytes,3,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type GetSubscriptionInformationResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,4,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - func (*GetSubscriptionInformationResponse_Success) isGetSubscriptionInformationResponse_Response() {} func (*GetSubscriptionInformationResponse_NoSubscription) isGetSubscriptionInformationResponse_Response() { @@ -2251,9 +2117,6 @@ func (*GetSubscriptionInformationResponse_NoSubscription) isGetSubscriptionInfor func (*GetSubscriptionInformationResponse_SubscriberNotFound) isGetSubscriptionInformationResponse_Response() { } -func (*GetSubscriptionInformationResponse_SubscriberIdMismatch) isGetSubscriptionInformationResponse_Response() { -} - type GetBankMandateRequest struct { state protoimpl.MessageState `protogen:"open.v1"` BankTransferType BankTransferType `protobuf:"varint,1,opt,name=bank_transfer_type,json=bankTransferType,proto3,enum=org.signal.chat.purchase.BankTransferType" json:"bank_transfer_type,omitempty"` @@ -2951,11 +2814,10 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "#org/signal/chat/subscriptions.proto\x12\x18org.signal.chat.purchase\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"n\n" + "\x17UpdateSubscriberRequest\x12*\n" + "\rsubscriber_id\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12'\n" + - "\x0fdonation_permit\x18\x02 \x01(\fR\x0edonationPermit\"\xd8\x02\n" + + "\x0fdonation_permit\x18\x02 \x01(\fR\x0edonationPermit\"\xca\x01\n" + "\x18UpdateSubscriberResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x02 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12n\n" + - "\x0fpermit_rejected\x18\x03 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejectedB\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12n\n" + + "\x0fpermit_rejected\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejectedB\n" + "\n" + "\bresponse\"D\n" + "\x17DeleteSubscriberRequest\x12)\n" + @@ -2969,13 +2831,12 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "\x1aCreatePaymentMethodRequest\x12*\n" + "\rsubscriber_id\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12T\n" + "\x0epayment_method\x18\x02 \x01(\x0e2'.org.signal.chat.purchase.PaymentMethodB\x04\x90\x97\"\x01R\rpaymentMethod\x12-\n" + - "\x0fdonation_permit\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\x0edonationPermit\"\xb5\x06\n" + + "\x0fdonation_permit\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\x0edonationPermit\"\xa7\x05\n" + "\x1bCreatePaymentMethodResponse\x12i\n" + "\x06result\x18\x01 \x01(\v2O.org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResultH\x00R\x06result\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12n\n" + - "\x0fpermit_rejected\x18\x05 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejected\x1a\x94\x01\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12n\n" + + "\x0fpermit_rejected\x18\x04 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejected\x1a\x94\x01\n" + "\x19CreatePaymentMethodResult\x12\"\n" + "\fclientSecret\x18\x01 \x01(\tR\fclientSecret\x12S\n" + "\x0fpaymentProvider\x18\x02 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderR\x0fpaymentProviderB\n" + @@ -2984,12 +2845,11 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + " CreatePayPalPaymentMethodRequest\x12)\n" + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12\x1c\n" + "\treturnUrl\x18\x02 \x01(\tR\treturnUrl\x12\x1c\n" + - "\tcancelUrl\x18\x03 \x01(\tR\tcancelUrl\"\x9b\x05\n" + + "\tcancelUrl\x18\x03 \x01(\tR\tcancelUrl\"\x8d\x04\n" + "!CreatePayPalPaymentMethodResponse\x12u\n" + "\x06result\x18\x01 \x01(\v2[.org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResultH\x00R\x06result\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x1aY\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x1aY\n" + "\x1fCreatePayPalPaymentMethodResult\x12 \n" + "\vapprovalUrl\x18\x01 \x01(\tR\vapprovalUrl\x12\x14\n" + "\x05token\x18\x02 \x01(\tR\x05tokenB\n" + @@ -3006,13 +2866,11 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "\x12paymentMethodToken\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x12paymentMethodToken\x1a?\n" + "\x11SepaPaymentMethod\x12*\n" + "\rsetupIntentId\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\rsetupIntentIdB\t\n" + - "\arequest\"\x83\x05\n" + + "\arequest\"\xd9\x02\n" + "\x1fSetDefaultPaymentMethodResponse\x122\n" + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x85\x01\n" + - "\x19payment_method_not_set_up\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUp\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflictB\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x85\x01\n" + + "\x19payment_method_not_set_up\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUpB\n" + "\n" + "\bresponse\"\xa2\x01\n" + "\x1bSetSubscriptionLevelRequest\x12)\n" + @@ -3032,21 +2890,20 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "\r_outcome_type\"y\n" + "\x0fPaymentRequired\x12S\n" + "\x0echarge_failure\x18\x01 \x01(\v2'.org.signal.chat.purchase.ChargeFailureH\x00R\rchargeFailure\x88\x01\x01B\x11\n" + - "\x0f_charge_failure\"\xcf\f\n" + + "\x0f_charge_failure\"\xc1\v\n" + "\x1cSetSubscriptionLevelResponse\x12m\n" + "\asuccess\x18\x01 \x01(\v2Q.org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResultH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12\x85\x01\n" + - "\x19payment_method_not_set_up\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUp\x12|\n" + - "\x15unsupported_operation\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x19\xc2\xd5\"\x15unsupported_operationH\x00R\x14unsupportedOperation\x12p\n" + - "\x11unsupported_level\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12y\n" + - "\x14unsupported_currency\x18\b \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12\x81\x01\n" + - "\x17payment_requires_action\x18\t \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17payment_requires_actionH\x00R\x15paymentRequiresAction\x12\x84\x01\n" + - "\x18invalid_level_transition\x18\n" + - " \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18invalid_level_transitionH\x00R\x16invalidLevelTransition\x12\x81\x01\n" + - "\x17invalid_idempotency_key\x18\v \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17invalid_idempotency_keyH\x00R\x15invalidIdempotencyKey\x12d\n" + - "\x0echarge_failure\x18\f \x01(\v2'.org.signal.chat.purchase.ChargeFailureB\x12\xc2\xd5\"\x0echarge_failureH\x00R\rchargeFailure\x1a2\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12\x85\x01\n" + + "\x19payment_method_not_set_up\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUp\x12|\n" + + "\x15unsupported_operation\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x19\xc2\xd5\"\x15unsupported_operationH\x00R\x14unsupportedOperation\x12p\n" + + "\x11unsupported_level\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12y\n" + + "\x14unsupported_currency\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12\x81\x01\n" + + "\x17payment_requires_action\x18\b \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17payment_requires_actionH\x00R\x15paymentRequiresAction\x12\x84\x01\n" + + "\x18invalid_level_transition\x18\t \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18invalid_level_transitionH\x00R\x16invalidLevelTransition\x12\x81\x01\n" + + "\x17invalid_idempotency_key\x18\n" + + " \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17invalid_idempotency_keyH\x00R\x15invalidIdempotencyKey\x12d\n" + + "\x0echarge_failure\x18\v \x01(\v2'.org.signal.chat.purchase.ChargeFailureB\x12\xc2\xd5\"\x0echarge_failureH\x00R\rchargeFailure\x1a2\n" + "\x1aSetSubscriptionLevelResult\x12\x14\n" + "\x05level\x18\x01 \x01(\x04R\x05levelB\n" + "\n" + @@ -3059,39 +2916,36 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "\x17original_transaction_id\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x15originalTransactionId\x1aB\n" + "\x13PlayBillingPurchase\x12+\n" + "\x0epurchase_token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\rpurchaseTokenB\t\n" + - "\arequest\"\xc6\x06\n" + + "\arequest\"\xb8\x05\n" + "\x1aSetIapSubscriptionResponse\x12i\n" + "\asuccess\x18\x01 \x01(\v2M.org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResultH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12m\n" + - "\x10payment_required\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12v\n" + - "\x13invalid_transaction\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x17\xc2\xd5\"\x13invalid_transactionH\x00R\x12invalidTransaction\x1a0\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x99\x01\n" + + "\x1fsubscription_processor_conflict\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12m\n" + + "\x10payment_required\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12v\n" + + "\x13invalid_transaction\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x17\xc2\xd5\"\x13invalid_transactionH\x00R\x12invalidTransaction\x1a0\n" + "\x18SetIapSubscriptionResult\x12\x14\n" + "\x05level\x18\x01 \x01(\x04R\x05levelB\n" + "\n" + "\bresponse\"\x8c\x01\n" + "\x1cGetReceiptCredentialsRequest\x12)\n" + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12A\n" + - "\x18receiptCredentialRequest\x18\x02 \x01(\fB\x05\xa2\x97\"\x01aR\x18receiptCredentialRequest\"\xbf\x06\n" + + "\x18receiptCredentialRequest\x18\x02 \x01(\fB\x05\xa2\x97\"\x01aR\x18receiptCredentialRequest\"\xb1\x05\n" + "\x1dGetReceiptCredentialsResponse\x12o\n" + "\asuccess\x18\x01 \x01(\v2S.org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResultH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12i\n" + - "\x0fno_paid_invoice\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0fno_paid_invoiceH\x00R\rnoPaidInvoice\x12l\n" + - "\x10payment_required\x18\x05 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12m\n" + - "\x10already_redeemed\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemed\x1a[\n" + + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12i\n" + + "\x0fno_paid_invoice\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0fno_paid_invoiceH\x00R\rnoPaidInvoice\x12l\n" + + "\x10payment_required\x18\x04 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12m\n" + + "\x10already_redeemed\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemed\x1a[\n" + "\x1bGetReceiptCredentialsResult\x12<\n" + "\x19receiptCredentialResponse\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + "\n" + "\bresponse\"N\n" + "!GetSubscriptionInformationRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\"\xf5\b\n" + + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\"\xe7\a\n" + "\"GetSubscriptionInformationResponse\x12e\n" + "\asuccess\x18\x01 \x01(\v2I.org.signal.chat.purchase.GetSubscriptionInformationResponse.SubscriptionH\x00R\asuccess\x12A\n" + "\x0fno_subscription\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x0enoSubscription\x12n\n" + - "\x14subscriber_not_found\x18\x03 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x04 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x1a\x9a\x05\n" + + "\x14subscriber_not_found\x18\x03 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x1a\x9a\x05\n" + "\fSubscription\x12\x14\n" + "\x05level\x18\x01 \x01(\x04R\x05level\x125\n" + "\x14billing_cycle_anchor\x18\x02 \x01(\x04H\x00R\x12billingCycleAnchor\x88\x01\x01\x121\n" + @@ -3204,99 +3058,89 @@ var file_org_signal_chat_subscriptions_proto_goTypes = []any{ (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult)(nil), // 35: org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult (*GetSubscriptionInformationResponse_Subscription)(nil), // 36: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription (*emptypb.Empty)(nil), // 37: google.protobuf.Empty - (*errors.FailedUnidentifiedAuthorization)(nil), // 38: org.signal.chat.errors.FailedUnidentifiedAuthorization - (*errors.FailedZkAuthentication)(nil), // 39: org.signal.chat.errors.FailedZkAuthentication - (*errors.NotFound)(nil), // 40: org.signal.chat.errors.NotFound - (*errors.FailedPrecondition)(nil), // 41: org.signal.chat.errors.FailedPrecondition + (*errors.FailedZkAuthentication)(nil), // 38: org.signal.chat.errors.FailedZkAuthentication + (*errors.NotFound)(nil), // 39: org.signal.chat.errors.NotFound + (*errors.FailedPrecondition)(nil), // 40: org.signal.chat.errors.FailedPrecondition } var file_org_signal_chat_subscriptions_proto_depIdxs = []int32{ 37, // 0: org.signal.chat.purchase.UpdateSubscriberResponse.success:type_name -> google.protobuf.Empty - 38, // 1: org.signal.chat.purchase.UpdateSubscriberResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 39, // 2: org.signal.chat.purchase.UpdateSubscriberResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication - 37, // 3: org.signal.chat.purchase.DeleteSubscriberResponse.success:type_name -> google.protobuf.Empty - 40, // 4: org.signal.chat.purchase.DeleteSubscriberResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 41, // 5: org.signal.chat.purchase.DeleteSubscriberResponse.cannot_cancel_subscription:type_name -> org.signal.chat.errors.FailedPrecondition - 1, // 6: org.signal.chat.purchase.CreatePaymentMethodRequest.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod - 26, // 7: org.signal.chat.purchase.CreatePaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult - 40, // 8: org.signal.chat.purchase.CreatePaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 9: org.signal.chat.purchase.CreatePaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 10: org.signal.chat.purchase.CreatePaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 39, // 11: org.signal.chat.purchase.CreatePaymentMethodResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication - 27, // 12: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResult - 40, // 13: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 14: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 15: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 28, // 16: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.stripe:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethod - 29, // 17: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.braintree:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethod - 30, // 18: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.sepa:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethod - 37, // 19: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.success:type_name -> google.protobuf.Empty - 40, // 20: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 21: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 22: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 23: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 0, // 24: org.signal.chat.purchase.ChargeFailure.processor:type_name -> org.signal.chat.purchase.PaymentProvider - 15, // 25: org.signal.chat.purchase.PaymentRequired.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 31, // 26: org.signal.chat.purchase.SetSubscriptionLevelResponse.success:type_name -> org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResult - 40, // 27: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 28: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 29: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 30: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 31: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_operation:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 32: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 33: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 34: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_requires_action:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 35: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_level_transition:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 36: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_idempotency_key:type_name -> org.signal.chat.errors.FailedPrecondition - 15, // 37: org.signal.chat.purchase.SetSubscriptionLevelResponse.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 32, // 38: org.signal.chat.purchase.SetIapSubscriptionRequest.app_store:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchase - 33, // 39: org.signal.chat.purchase.SetIapSubscriptionRequest.play_billing:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchase - 34, // 40: org.signal.chat.purchase.SetIapSubscriptionResponse.success:type_name -> org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResult - 40, // 41: org.signal.chat.purchase.SetIapSubscriptionResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 42: org.signal.chat.purchase.SetIapSubscriptionResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 43: org.signal.chat.purchase.SetIapSubscriptionResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 44: org.signal.chat.purchase.SetIapSubscriptionResponse.payment_required:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 45: org.signal.chat.purchase.SetIapSubscriptionResponse.invalid_transaction:type_name -> org.signal.chat.errors.FailedPrecondition - 35, // 46: org.signal.chat.purchase.GetReceiptCredentialsResponse.success:type_name -> org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult - 40, // 47: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 48: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 49: org.signal.chat.purchase.GetReceiptCredentialsResponse.no_paid_invoice:type_name -> org.signal.chat.errors.FailedPrecondition - 16, // 50: org.signal.chat.purchase.GetReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired - 41, // 51: org.signal.chat.purchase.GetReceiptCredentialsResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition - 36, // 52: org.signal.chat.purchase.GetSubscriptionInformationResponse.success:type_name -> org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription - 37, // 53: org.signal.chat.purchase.GetSubscriptionInformationResponse.no_subscription:type_name -> google.protobuf.Empty - 40, // 54: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 55: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 3, // 56: org.signal.chat.purchase.GetBankMandateRequest.bank_transfer_type:type_name -> org.signal.chat.purchase.BankTransferType - 0, // 57: org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult.paymentProvider:type_name -> org.signal.chat.purchase.PaymentProvider - 2, // 58: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.status:type_name -> org.signal.chat.purchase.SubscriptionStatus - 0, // 59: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.processor:type_name -> org.signal.chat.purchase.PaymentProvider - 1, // 60: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod - 15, // 61: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 4, // 62: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:input_type -> org.signal.chat.purchase.UpdateSubscriberRequest - 6, // 63: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:input_type -> org.signal.chat.purchase.DeleteSubscriberRequest - 8, // 64: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:input_type -> org.signal.chat.purchase.CreatePaymentMethodRequest - 10, // 65: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:input_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodRequest - 12, // 66: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:input_type -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest - 14, // 67: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:input_type -> org.signal.chat.purchase.SetSubscriptionLevelRequest - 22, // 68: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:input_type -> org.signal.chat.purchase.GetSubscriptionInformationRequest - 20, // 69: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:input_type -> org.signal.chat.purchase.GetReceiptCredentialsRequest - 18, // 70: org.signal.chat.purchase.Subscriptions.SetIapSubscription:input_type -> org.signal.chat.purchase.SetIapSubscriptionRequest - 24, // 71: org.signal.chat.purchase.Subscriptions.GetBankMandate:input_type -> org.signal.chat.purchase.GetBankMandateRequest - 5, // 72: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:output_type -> org.signal.chat.purchase.UpdateSubscriberResponse - 7, // 73: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:output_type -> org.signal.chat.purchase.DeleteSubscriberResponse - 9, // 74: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:output_type -> org.signal.chat.purchase.CreatePaymentMethodResponse - 11, // 75: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:output_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse - 13, // 76: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:output_type -> org.signal.chat.purchase.SetDefaultPaymentMethodResponse - 17, // 77: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:output_type -> org.signal.chat.purchase.SetSubscriptionLevelResponse - 23, // 78: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:output_type -> org.signal.chat.purchase.GetSubscriptionInformationResponse - 21, // 79: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:output_type -> org.signal.chat.purchase.GetReceiptCredentialsResponse - 19, // 80: org.signal.chat.purchase.Subscriptions.SetIapSubscription:output_type -> org.signal.chat.purchase.SetIapSubscriptionResponse - 25, // 81: org.signal.chat.purchase.Subscriptions.GetBankMandate:output_type -> org.signal.chat.purchase.GetBankMandateResponse - 72, // [72:82] is the sub-list for method output_type - 62, // [62:72] is the sub-list for method input_type - 62, // [62:62] is the sub-list for extension type_name - 62, // [62:62] is the sub-list for extension extendee - 0, // [0:62] is the sub-list for field type_name + 38, // 1: org.signal.chat.purchase.UpdateSubscriberResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication + 37, // 2: org.signal.chat.purchase.DeleteSubscriberResponse.success:type_name -> google.protobuf.Empty + 39, // 3: org.signal.chat.purchase.DeleteSubscriberResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 4: org.signal.chat.purchase.DeleteSubscriberResponse.cannot_cancel_subscription:type_name -> org.signal.chat.errors.FailedPrecondition + 1, // 5: org.signal.chat.purchase.CreatePaymentMethodRequest.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod + 26, // 6: org.signal.chat.purchase.CreatePaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult + 39, // 7: org.signal.chat.purchase.CreatePaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 8: org.signal.chat.purchase.CreatePaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 38, // 9: org.signal.chat.purchase.CreatePaymentMethodResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication + 27, // 10: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResult + 39, // 11: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 12: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 28, // 13: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.stripe:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethod + 29, // 14: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.braintree:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethod + 30, // 15: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.sepa:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethod + 37, // 16: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.success:type_name -> google.protobuf.Empty + 39, // 17: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 18: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition + 0, // 19: org.signal.chat.purchase.ChargeFailure.processor:type_name -> org.signal.chat.purchase.PaymentProvider + 15, // 20: org.signal.chat.purchase.PaymentRequired.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure + 31, // 21: org.signal.chat.purchase.SetSubscriptionLevelResponse.success:type_name -> org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResult + 39, // 22: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 23: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 24: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 25: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_operation:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 26: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 27: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 28: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_requires_action:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 29: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_level_transition:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 30: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_idempotency_key:type_name -> org.signal.chat.errors.FailedPrecondition + 15, // 31: org.signal.chat.purchase.SetSubscriptionLevelResponse.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure + 32, // 32: org.signal.chat.purchase.SetIapSubscriptionRequest.app_store:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchase + 33, // 33: org.signal.chat.purchase.SetIapSubscriptionRequest.play_billing:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchase + 34, // 34: org.signal.chat.purchase.SetIapSubscriptionResponse.success:type_name -> org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResult + 39, // 35: org.signal.chat.purchase.SetIapSubscriptionResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 36: org.signal.chat.purchase.SetIapSubscriptionResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 37: org.signal.chat.purchase.SetIapSubscriptionResponse.payment_required:type_name -> org.signal.chat.errors.FailedPrecondition + 40, // 38: org.signal.chat.purchase.SetIapSubscriptionResponse.invalid_transaction:type_name -> org.signal.chat.errors.FailedPrecondition + 35, // 39: org.signal.chat.purchase.GetReceiptCredentialsResponse.success:type_name -> org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult + 39, // 40: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 41: org.signal.chat.purchase.GetReceiptCredentialsResponse.no_paid_invoice:type_name -> org.signal.chat.errors.FailedPrecondition + 16, // 42: org.signal.chat.purchase.GetReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired + 40, // 43: org.signal.chat.purchase.GetReceiptCredentialsResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition + 36, // 44: org.signal.chat.purchase.GetSubscriptionInformationResponse.success:type_name -> org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription + 37, // 45: org.signal.chat.purchase.GetSubscriptionInformationResponse.no_subscription:type_name -> google.protobuf.Empty + 39, // 46: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 3, // 47: org.signal.chat.purchase.GetBankMandateRequest.bank_transfer_type:type_name -> org.signal.chat.purchase.BankTransferType + 0, // 48: org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult.paymentProvider:type_name -> org.signal.chat.purchase.PaymentProvider + 2, // 49: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.status:type_name -> org.signal.chat.purchase.SubscriptionStatus + 0, // 50: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.processor:type_name -> org.signal.chat.purchase.PaymentProvider + 1, // 51: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod + 15, // 52: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure + 4, // 53: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:input_type -> org.signal.chat.purchase.UpdateSubscriberRequest + 6, // 54: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:input_type -> org.signal.chat.purchase.DeleteSubscriberRequest + 8, // 55: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:input_type -> org.signal.chat.purchase.CreatePaymentMethodRequest + 10, // 56: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:input_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodRequest + 12, // 57: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:input_type -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest + 14, // 58: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:input_type -> org.signal.chat.purchase.SetSubscriptionLevelRequest + 22, // 59: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:input_type -> org.signal.chat.purchase.GetSubscriptionInformationRequest + 20, // 60: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:input_type -> org.signal.chat.purchase.GetReceiptCredentialsRequest + 18, // 61: org.signal.chat.purchase.Subscriptions.SetIapSubscription:input_type -> org.signal.chat.purchase.SetIapSubscriptionRequest + 24, // 62: org.signal.chat.purchase.Subscriptions.GetBankMandate:input_type -> org.signal.chat.purchase.GetBankMandateRequest + 5, // 63: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:output_type -> org.signal.chat.purchase.UpdateSubscriberResponse + 7, // 64: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:output_type -> org.signal.chat.purchase.DeleteSubscriberResponse + 9, // 65: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:output_type -> org.signal.chat.purchase.CreatePaymentMethodResponse + 11, // 66: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:output_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse + 13, // 67: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:output_type -> org.signal.chat.purchase.SetDefaultPaymentMethodResponse + 17, // 68: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:output_type -> org.signal.chat.purchase.SetSubscriptionLevelResponse + 23, // 69: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:output_type -> org.signal.chat.purchase.GetSubscriptionInformationResponse + 21, // 70: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:output_type -> org.signal.chat.purchase.GetReceiptCredentialsResponse + 19, // 71: org.signal.chat.purchase.Subscriptions.SetIapSubscription:output_type -> org.signal.chat.purchase.SetIapSubscriptionResponse + 25, // 72: org.signal.chat.purchase.Subscriptions.GetBankMandate:output_type -> org.signal.chat.purchase.GetBankMandateResponse + 63, // [63:73] is the sub-list for method output_type + 53, // [53:63] is the sub-list for method input_type + 53, // [53:53] is the sub-list for extension type_name + 53, // [53:53] is the sub-list for extension extendee + 0, // [0:53] is the sub-list for field type_name } func init() { file_org_signal_chat_subscriptions_proto_init() } @@ -3306,7 +3150,6 @@ func file_org_signal_chat_subscriptions_proto_init() { } file_org_signal_chat_subscriptions_proto_msgTypes[1].OneofWrappers = []any{ (*UpdateSubscriberResponse_Success)(nil), - (*UpdateSubscriberResponse_SubscriberIdMismatch)(nil), (*UpdateSubscriberResponse_PermitRejected)(nil), } file_org_signal_chat_subscriptions_proto_msgTypes[3].OneofWrappers = []any{ @@ -3317,14 +3160,12 @@ func file_org_signal_chat_subscriptions_proto_init() { file_org_signal_chat_subscriptions_proto_msgTypes[5].OneofWrappers = []any{ (*CreatePaymentMethodResponse_Result)(nil), (*CreatePaymentMethodResponse_SubscriberNotFound)(nil), - (*CreatePaymentMethodResponse_SubscriberIdMismatch)(nil), (*CreatePaymentMethodResponse_SubscriptionProcessorConflict)(nil), (*CreatePaymentMethodResponse_PermitRejected)(nil), } file_org_signal_chat_subscriptions_proto_msgTypes[7].OneofWrappers = []any{ (*CreatePayPalPaymentMethodResponse_Result)(nil), (*CreatePayPalPaymentMethodResponse_SubscriberNotFound)(nil), - (*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch)(nil), (*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict)(nil), } file_org_signal_chat_subscriptions_proto_msgTypes[8].OneofWrappers = []any{ @@ -3335,16 +3176,13 @@ func file_org_signal_chat_subscriptions_proto_init() { file_org_signal_chat_subscriptions_proto_msgTypes[9].OneofWrappers = []any{ (*SetDefaultPaymentMethodResponse_Success)(nil), (*SetDefaultPaymentMethodResponse_SubscriberNotFound)(nil), - (*SetDefaultPaymentMethodResponse_SubscriberIdMismatch)(nil), (*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp)(nil), - (*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict)(nil), } file_org_signal_chat_subscriptions_proto_msgTypes[11].OneofWrappers = []any{} file_org_signal_chat_subscriptions_proto_msgTypes[12].OneofWrappers = []any{} file_org_signal_chat_subscriptions_proto_msgTypes[13].OneofWrappers = []any{ (*SetSubscriptionLevelResponse_Success)(nil), (*SetSubscriptionLevelResponse_SubscriberNotFound)(nil), - (*SetSubscriptionLevelResponse_SubscriberIdMismatch)(nil), (*SetSubscriptionLevelResponse_SubscriptionProcessorConflict)(nil), (*SetSubscriptionLevelResponse_PaymentMethodNotSetUp)(nil), (*SetSubscriptionLevelResponse_UnsupportedOperation)(nil), @@ -3362,7 +3200,6 @@ func file_org_signal_chat_subscriptions_proto_init() { file_org_signal_chat_subscriptions_proto_msgTypes[15].OneofWrappers = []any{ (*SetIapSubscriptionResponse_Success)(nil), (*SetIapSubscriptionResponse_SubscriberNotFound)(nil), - (*SetIapSubscriptionResponse_SubscriberIdMismatch)(nil), (*SetIapSubscriptionResponse_SubscriptionProcessorConflict)(nil), (*SetIapSubscriptionResponse_PaymentRequired)(nil), (*SetIapSubscriptionResponse_InvalidTransaction)(nil), @@ -3370,7 +3207,6 @@ func file_org_signal_chat_subscriptions_proto_init() { file_org_signal_chat_subscriptions_proto_msgTypes[17].OneofWrappers = []any{ (*GetReceiptCredentialsResponse_Success)(nil), (*GetReceiptCredentialsResponse_SubscriberNotFound)(nil), - (*GetReceiptCredentialsResponse_SubscriberIdMismatch)(nil), (*GetReceiptCredentialsResponse_NoPaidInvoice)(nil), (*GetReceiptCredentialsResponse_PaymentRequired)(nil), (*GetReceiptCredentialsResponse_AlreadyRedeemed)(nil), @@ -3379,7 +3215,6 @@ func file_org_signal_chat_subscriptions_proto_init() { (*GetSubscriptionInformationResponse_Success)(nil), (*GetSubscriptionInformationResponse_NoSubscription)(nil), (*GetSubscriptionInformationResponse_SubscriberNotFound)(nil), - (*GetSubscriptionInformationResponse_SubscriberIdMismatch)(nil), } file_org_signal_chat_subscriptions_proto_msgTypes[32].OneofWrappers = []any{} type x struct{} diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go index 5153be8..9b2c3b9 100644 --- a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go @@ -43,6 +43,8 @@ const ( // // Configuration for subscription levels can be found in ProductConfiguration. type SubscriptionsClient interface { + // Creates a subscriber record if it does not exist, otherwise refreshes its last access time. + // // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended // period of time will result in the subscription being canceled. @@ -55,6 +57,10 @@ type SubscriptionsClient interface { // Returns a client secret that can be used to set up a new payment method with the payment processor. CreatePaymentMethod(ctx context.Context, in *CreatePaymentMethodRequest, opts ...grpc.CallOption) (*CreatePaymentMethodResponse, error) // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. + // + // The presented billing agreement may be localized. Callers should set their + // language preferences via an "Accept-Language" header on the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 CreatePayPalPaymentMethod(ctx context.Context, in *CreatePayPalPaymentMethodRequest, opts ...grpc.CallOption) (*CreatePayPalPaymentMethodResponse, error) // Sets the default payment method for a subscriber. SetDefaultPaymentMethod(ctx context.Context, in *SetDefaultPaymentMethodRequest, opts ...grpc.CallOption) (*SetDefaultPaymentMethodResponse, error) @@ -114,7 +120,11 @@ type SubscriptionsClient interface { // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription // associated with the old purchaseToken will be cancelled. SetIapSubscription(ctx context.Context, in *SetIapSubscriptionRequest, opts ...grpc.CallOption) (*SetIapSubscriptionResponse, error) - // Returns a localized bank mandate for the specified bank transfer type + // Returns a localized bank mandate for the specified bank transfer type. + // + // Callers should set their language preferences via an "Accept-Language" + // header on the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 GetBankMandate(ctx context.Context, in *GetBankMandateRequest, opts ...grpc.CallOption) (*GetBankMandateResponse, error) } @@ -234,6 +244,8 @@ func (c *subscriptionsClient) GetBankMandate(ctx context.Context, in *GetBankMan // // Configuration for subscription levels can be found in ProductConfiguration. type SubscriptionsServer interface { + // Creates a subscriber record if it does not exist, otherwise refreshes its last access time. + // // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended // period of time will result in the subscription being canceled. @@ -246,6 +258,10 @@ type SubscriptionsServer interface { // Returns a client secret that can be used to set up a new payment method with the payment processor. CreatePaymentMethod(context.Context, *CreatePaymentMethodRequest) (*CreatePaymentMethodResponse, error) // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. + // + // The presented billing agreement may be localized. Callers should set their + // language preferences via an "Accept-Language" header on the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 CreatePayPalPaymentMethod(context.Context, *CreatePayPalPaymentMethodRequest) (*CreatePayPalPaymentMethodResponse, error) // Sets the default payment method for a subscriber. SetDefaultPaymentMethod(context.Context, *SetDefaultPaymentMethodRequest) (*SetDefaultPaymentMethodResponse, error) @@ -305,7 +321,11 @@ type SubscriptionsServer interface { // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription // associated with the old purchaseToken will be cancelled. SetIapSubscription(context.Context, *SetIapSubscriptionRequest) (*SetIapSubscriptionResponse, error) - // Returns a localized bank mandate for the specified bank transfer type + // Returns a localized bank mandate for the specified bank transfer type. + // + // Callers should set their language preferences via an "Accept-Language" + // header on the request: + // https://datatracker.ietf.org/doc/html/rfc3282#section-3 GetBankMandate(context.Context, *GetBankMandateRequest) (*GetBankMandateResponse, error) mustEmbedUnimplementedSubscriptionsServer() } diff --git a/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go b/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go index b8ee02f..1acd9fb 100644 --- a/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go @@ -3488,9 +3488,14 @@ type AttachmentPointer struct { Caption *string `protobuf:"bytes,11,opt,name=caption" json:"caption,omitempty"` BlurHash *string `protobuf:"bytes,12,opt,name=blurHash" json:"blurHash,omitempty"` UploadTimestamp *uint64 `protobuf:"varint,13,opt,name=uploadTimestamp" json:"uploadTimestamp,omitempty"` - CdnNumber *uint32 `protobuf:"varint,14,opt,name=cdnNumber" json:"cdnNumber,omitempty"` // Next ID: 21 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + CdnNumber *uint32 `protobuf:"varint,14,opt,name=cdnNumber" json:"cdnNumber,omitempty"` + // Waveform for audio attachments. Each byte represents a "bar" in the + // waveform, with 0 as silence 255 as loudest. At most 100 bytes/bars. + AudioWaveform []byte `protobuf:"bytes,21,opt,name=audioWaveform" json:"audioWaveform,omitempty"` + // Duration of an audio attachment, in seconds. + AudioDurationSeconds *float32 `protobuf:"fixed32,22,opt,name=audioDurationSeconds" json:"audioDurationSeconds,omitempty"` // Next ID: 23 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AttachmentPointer) Reset() { @@ -3660,6 +3665,20 @@ func (x *AttachmentPointer) GetCdnNumber() uint32 { return 0 } +func (x *AttachmentPointer) GetAudioWaveform() []byte { + if x != nil { + return x.AudioWaveform + } + return nil +} + +func (x *AttachmentPointer) GetAudioDurationSeconds() float32 { + if x != nil && x.AudioDurationSeconds != nil { + return *x.AudioDurationSeconds + } + return 0 +} + type isAttachmentPointer_AttachmentIdentifier interface { isAttachmentPointer_AttachmentIdentifier() } @@ -4903,6 +4922,9 @@ type DataMessage_Contact struct { Address []*DataMessage_Contact_PostalAddress `protobuf:"bytes,5,rep,name=address" json:"address,omitempty"` Avatar *DataMessage_Contact_Avatar `protobuf:"bytes,6,opt,name=avatar" json:"avatar,omitempty"` Organization *string `protobuf:"bytes,7,opt,name=organization" json:"organization,omitempty"` + AciBinary []byte `protobuf:"bytes,8,opt,name=aciBinary" json:"aciBinary,omitempty"` // 16-byte UUID + Nickname *DataMessage_Contact_SignalNickname `protobuf:"bytes,9,opt,name=nickname" json:"nickname,omitempty"` + Note *string `protobuf:"bytes,10,opt,name=note" json:"note,omitempty"` // Next ID: 11 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -4979,6 +5001,27 @@ func (x *DataMessage_Contact) GetOrganization() string { return "" } +func (x *DataMessage_Contact) GetAciBinary() []byte { + if x != nil { + return x.AciBinary + } + return nil +} + +func (x *DataMessage_Contact) GetNickname() *DataMessage_Contact_SignalNickname { + if x != nil { + return x.Nickname + } + return nil +} + +func (x *DataMessage_Contact) GetNote() string { + if x != nil && x.Note != nil { + return *x.Note + } + return "" +} + type DataMessage_Sticker struct { state protoimpl.MessageState `protogen:"open.v1"` PackId []byte `protobuf:"bytes,1,opt,name=packId" json:"packId,omitempty"` @@ -6395,6 +6438,58 @@ func (x *DataMessage_Contact_Avatar) GetIsProfile() bool { return false } +type DataMessage_Contact_SignalNickname struct { + state protoimpl.MessageState `protogen:"open.v1"` + Given *string `protobuf:"bytes,1,opt,name=given" json:"given,omitempty"` + Family *string `protobuf:"bytes,2,opt,name=family" json:"family,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataMessage_Contact_SignalNickname) Reset() { + *x = DataMessage_Contact_SignalNickname{} + mi := &file_signalpb_SignalService_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataMessage_Contact_SignalNickname) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataMessage_Contact_SignalNickname) ProtoMessage() {} + +func (x *DataMessage_Contact_SignalNickname) ProtoReflect() protoreflect.Message { + mi := &file_signalpb_SignalService_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataMessage_Contact_SignalNickname.ProtoReflect.Descriptor instead. +func (*DataMessage_Contact_SignalNickname) Descriptor() ([]byte, []int) { + return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 5} +} + +func (x *DataMessage_Contact_SignalNickname) GetGiven() string { + if x != nil && x.Given != nil { + return *x.Given + } + return "" +} + +func (x *DataMessage_Contact_SignalNickname) GetFamily() string { + if x != nil && x.Family != nil { + return *x.Family + } + return "" +} + type TextAttachment_Gradient struct { state protoimpl.MessageState `protogen:"open.v1"` StartColor *uint32 `protobuf:"varint,1,opt,name=startColor" json:"startColor,omitempty"` // deprecated: this field will be removed in a future release. @@ -6408,7 +6503,7 @@ type TextAttachment_Gradient struct { func (x *TextAttachment_Gradient) Reset() { *x = TextAttachment_Gradient{} - mi := &file_signalpb_SignalService_proto_msgTypes[54] + mi := &file_signalpb_SignalService_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6420,7 +6515,7 @@ func (x *TextAttachment_Gradient) String() string { func (*TextAttachment_Gradient) ProtoMessage() {} func (x *TextAttachment_Gradient) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[54] + mi := &file_signalpb_SignalService_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6495,7 +6590,7 @@ const ( func (x *SyncMessage_Sent) Reset() { *x = SyncMessage_Sent{} - mi := &file_signalpb_SignalService_proto_msgTypes[55] + mi := &file_signalpb_SignalService_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6507,7 +6602,7 @@ func (x *SyncMessage_Sent) String() string { func (*SyncMessage_Sent) ProtoMessage() {} func (x *SyncMessage_Sent) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[55] + mi := &file_signalpb_SignalService_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6615,7 +6710,7 @@ const ( func (x *SyncMessage_Contacts) Reset() { *x = SyncMessage_Contacts{} - mi := &file_signalpb_SignalService_proto_msgTypes[56] + mi := &file_signalpb_SignalService_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6627,7 +6722,7 @@ func (x *SyncMessage_Contacts) String() string { func (*SyncMessage_Contacts) ProtoMessage() {} func (x *SyncMessage_Contacts) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[56] + mi := &file_signalpb_SignalService_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6672,7 +6767,7 @@ type SyncMessage_Blocked struct { func (x *SyncMessage_Blocked) Reset() { *x = SyncMessage_Blocked{} - mi := &file_signalpb_SignalService_proto_msgTypes[57] + mi := &file_signalpb_SignalService_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6684,7 +6779,7 @@ func (x *SyncMessage_Blocked) String() string { func (*SyncMessage_Blocked) ProtoMessage() {} func (x *SyncMessage_Blocked) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[57] + mi := &file_signalpb_SignalService_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6758,7 +6853,7 @@ type SyncMessage_Request struct { func (x *SyncMessage_Request) Reset() { *x = SyncMessage_Request{} - mi := &file_signalpb_SignalService_proto_msgTypes[58] + mi := &file_signalpb_SignalService_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6770,7 +6865,7 @@ func (x *SyncMessage_Request) String() string { func (*SyncMessage_Request) ProtoMessage() {} func (x *SyncMessage_Request) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[58] + mi := &file_signalpb_SignalService_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6804,7 +6899,7 @@ type SyncMessage_Read struct { func (x *SyncMessage_Read) Reset() { *x = SyncMessage_Read{} - mi := &file_signalpb_SignalService_proto_msgTypes[59] + mi := &file_signalpb_SignalService_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6816,7 +6911,7 @@ func (x *SyncMessage_Read) String() string { func (*SyncMessage_Read) ProtoMessage() {} func (x *SyncMessage_Read) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[59] + mi := &file_signalpb_SignalService_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6864,7 +6959,7 @@ type SyncMessage_Viewed struct { func (x *SyncMessage_Viewed) Reset() { *x = SyncMessage_Viewed{} - mi := &file_signalpb_SignalService_proto_msgTypes[60] + mi := &file_signalpb_SignalService_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6876,7 +6971,7 @@ func (x *SyncMessage_Viewed) String() string { func (*SyncMessage_Viewed) ProtoMessage() {} func (x *SyncMessage_Viewed) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[60] + mi := &file_signalpb_SignalService_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6925,7 +7020,7 @@ type SyncMessage_Configuration struct { func (x *SyncMessage_Configuration) Reset() { *x = SyncMessage_Configuration{} - mi := &file_signalpb_SignalService_proto_msgTypes[61] + mi := &file_signalpb_SignalService_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6937,7 +7032,7 @@ func (x *SyncMessage_Configuration) String() string { func (*SyncMessage_Configuration) ProtoMessage() {} func (x *SyncMessage_Configuration) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[61] + mi := &file_signalpb_SignalService_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6992,7 +7087,7 @@ type SyncMessage_StickerPackOperation struct { func (x *SyncMessage_StickerPackOperation) Reset() { *x = SyncMessage_StickerPackOperation{} - mi := &file_signalpb_SignalService_proto_msgTypes[62] + mi := &file_signalpb_SignalService_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7004,7 +7099,7 @@ func (x *SyncMessage_StickerPackOperation) String() string { func (*SyncMessage_StickerPackOperation) ProtoMessage() {} func (x *SyncMessage_StickerPackOperation) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[62] + mi := &file_signalpb_SignalService_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7052,7 +7147,7 @@ type SyncMessage_ViewOnceOpen struct { func (x *SyncMessage_ViewOnceOpen) Reset() { *x = SyncMessage_ViewOnceOpen{} - mi := &file_signalpb_SignalService_proto_msgTypes[63] + mi := &file_signalpb_SignalService_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7064,7 +7159,7 @@ func (x *SyncMessage_ViewOnceOpen) String() string { func (*SyncMessage_ViewOnceOpen) ProtoMessage() {} func (x *SyncMessage_ViewOnceOpen) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[63] + mi := &file_signalpb_SignalService_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7110,7 +7205,7 @@ type SyncMessage_FetchLatest struct { func (x *SyncMessage_FetchLatest) Reset() { *x = SyncMessage_FetchLatest{} - mi := &file_signalpb_SignalService_proto_msgTypes[64] + mi := &file_signalpb_SignalService_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7122,7 +7217,7 @@ func (x *SyncMessage_FetchLatest) String() string { func (*SyncMessage_FetchLatest) ProtoMessage() {} func (x *SyncMessage_FetchLatest) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[64] + mi := &file_signalpb_SignalService_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7155,7 +7250,7 @@ type SyncMessage_Keys struct { func (x *SyncMessage_Keys) Reset() { *x = SyncMessage_Keys{} - mi := &file_signalpb_SignalService_proto_msgTypes[65] + mi := &file_signalpb_SignalService_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7167,7 +7262,7 @@ func (x *SyncMessage_Keys) String() string { func (*SyncMessage_Keys) ProtoMessage() {} func (x *SyncMessage_Keys) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[65] + mi := &file_signalpb_SignalService_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7207,7 +7302,7 @@ type SyncMessage_PniIdentity struct { func (x *SyncMessage_PniIdentity) Reset() { *x = SyncMessage_PniIdentity{} - mi := &file_signalpb_SignalService_proto_msgTypes[66] + mi := &file_signalpb_SignalService_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7219,7 +7314,7 @@ func (x *SyncMessage_PniIdentity) String() string { func (*SyncMessage_PniIdentity) ProtoMessage() {} func (x *SyncMessage_PniIdentity) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[66] + mi := &file_signalpb_SignalService_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7261,7 +7356,7 @@ type SyncMessage_MessageRequestResponse struct { func (x *SyncMessage_MessageRequestResponse) Reset() { *x = SyncMessage_MessageRequestResponse{} - mi := &file_signalpb_SignalService_proto_msgTypes[67] + mi := &file_signalpb_SignalService_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7273,7 +7368,7 @@ func (x *SyncMessage_MessageRequestResponse) String() string { func (*SyncMessage_MessageRequestResponse) ProtoMessage() {} func (x *SyncMessage_MessageRequestResponse) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[67] + mi := &file_signalpb_SignalService_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7331,7 +7426,7 @@ type SyncMessage_OutgoingPayment struct { func (x *SyncMessage_OutgoingPayment) Reset() { *x = SyncMessage_OutgoingPayment{} - mi := &file_signalpb_SignalService_proto_msgTypes[68] + mi := &file_signalpb_SignalService_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7343,7 +7438,7 @@ func (x *SyncMessage_OutgoingPayment) String() string { func (*SyncMessage_OutgoingPayment) ProtoMessage() {} func (x *SyncMessage_OutgoingPayment) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[68] + mi := &file_signalpb_SignalService_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7413,7 +7508,7 @@ type SyncMessage_PniChangeNumber struct { func (x *SyncMessage_PniChangeNumber) Reset() { *x = SyncMessage_PniChangeNumber{} - mi := &file_signalpb_SignalService_proto_msgTypes[69] + mi := &file_signalpb_SignalService_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7425,7 +7520,7 @@ func (x *SyncMessage_PniChangeNumber) String() string { func (*SyncMessage_PniChangeNumber) ProtoMessage() {} func (x *SyncMessage_PniChangeNumber) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[69] + mi := &file_signalpb_SignalService_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7495,7 +7590,7 @@ type SyncMessage_CallEvent struct { func (x *SyncMessage_CallEvent) Reset() { *x = SyncMessage_CallEvent{} - mi := &file_signalpb_SignalService_proto_msgTypes[70] + mi := &file_signalpb_SignalService_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7507,7 +7602,7 @@ func (x *SyncMessage_CallEvent) String() string { func (*SyncMessage_CallEvent) ProtoMessage() {} func (x *SyncMessage_CallEvent) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[70] + mi := &file_signalpb_SignalService_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7576,7 +7671,7 @@ type SyncMessage_CallLinkUpdate struct { func (x *SyncMessage_CallLinkUpdate) Reset() { *x = SyncMessage_CallLinkUpdate{} - mi := &file_signalpb_SignalService_proto_msgTypes[71] + mi := &file_signalpb_SignalService_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7588,7 +7683,7 @@ func (x *SyncMessage_CallLinkUpdate) String() string { func (*SyncMessage_CallLinkUpdate) ProtoMessage() {} func (x *SyncMessage_CallLinkUpdate) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[71] + mi := &file_signalpb_SignalService_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7642,7 +7737,7 @@ type SyncMessage_CallLogEvent struct { func (x *SyncMessage_CallLogEvent) Reset() { *x = SyncMessage_CallLogEvent{} - mi := &file_signalpb_SignalService_proto_msgTypes[72] + mi := &file_signalpb_SignalService_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7654,7 +7749,7 @@ func (x *SyncMessage_CallLogEvent) String() string { func (*SyncMessage_CallLogEvent) ProtoMessage() {} func (x *SyncMessage_CallLogEvent) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[72] + mi := &file_signalpb_SignalService_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7710,7 +7805,7 @@ type SyncMessage_DeleteForMe struct { func (x *SyncMessage_DeleteForMe) Reset() { *x = SyncMessage_DeleteForMe{} - mi := &file_signalpb_SignalService_proto_msgTypes[73] + mi := &file_signalpb_SignalService_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7722,7 +7817,7 @@ func (x *SyncMessage_DeleteForMe) String() string { func (*SyncMessage_DeleteForMe) ProtoMessage() {} func (x *SyncMessage_DeleteForMe) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[73] + mi := &file_signalpb_SignalService_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7775,7 +7870,7 @@ type SyncMessage_DeviceNameChange struct { func (x *SyncMessage_DeviceNameChange) Reset() { *x = SyncMessage_DeviceNameChange{} - mi := &file_signalpb_SignalService_proto_msgTypes[74] + mi := &file_signalpb_SignalService_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7787,7 +7882,7 @@ func (x *SyncMessage_DeviceNameChange) String() string { func (*SyncMessage_DeviceNameChange) ProtoMessage() {} func (x *SyncMessage_DeviceNameChange) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[74] + mi := &file_signalpb_SignalService_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7820,7 +7915,7 @@ type SyncMessage_AttachmentBackfillRequest struct { func (x *SyncMessage_AttachmentBackfillRequest) Reset() { *x = SyncMessage_AttachmentBackfillRequest{} - mi := &file_signalpb_SignalService_proto_msgTypes[75] + mi := &file_signalpb_SignalService_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7832,7 +7927,7 @@ func (x *SyncMessage_AttachmentBackfillRequest) String() string { func (*SyncMessage_AttachmentBackfillRequest) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillRequest) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[75] + mi := &file_signalpb_SignalService_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7877,7 +7972,7 @@ type SyncMessage_AttachmentBackfillResponse struct { func (x *SyncMessage_AttachmentBackfillResponse) Reset() { *x = SyncMessage_AttachmentBackfillResponse{} - mi := &file_signalpb_SignalService_proto_msgTypes[76] + mi := &file_signalpb_SignalService_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7889,7 +7984,7 @@ func (x *SyncMessage_AttachmentBackfillResponse) String() string { func (*SyncMessage_AttachmentBackfillResponse) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[76] + mi := &file_signalpb_SignalService_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7970,7 +8065,7 @@ type SyncMessage_UsernameChange struct { func (x *SyncMessage_UsernameChange) Reset() { *x = SyncMessage_UsernameChange{} - mi := &file_signalpb_SignalService_proto_msgTypes[77] + mi := &file_signalpb_SignalService_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7982,7 +8077,7 @@ func (x *SyncMessage_UsernameChange) String() string { func (*SyncMessage_UsernameChange) ProtoMessage() {} func (x *SyncMessage_UsernameChange) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[77] + mi := &file_signalpb_SignalService_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8010,7 +8105,7 @@ type SyncMessage_Sent_UnidentifiedDeliveryStatus struct { func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) Reset() { *x = SyncMessage_Sent_UnidentifiedDeliveryStatus{} - mi := &file_signalpb_SignalService_proto_msgTypes[78] + mi := &file_signalpb_SignalService_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8022,7 +8117,7 @@ func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) String() string { func (*SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoMessage() {} func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[78] + mi := &file_signalpb_SignalService_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8078,7 +8173,7 @@ type SyncMessage_Sent_StoryMessageRecipient struct { func (x *SyncMessage_Sent_StoryMessageRecipient) Reset() { *x = SyncMessage_Sent_StoryMessageRecipient{} - mi := &file_signalpb_SignalService_proto_msgTypes[79] + mi := &file_signalpb_SignalService_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8090,7 +8185,7 @@ func (x *SyncMessage_Sent_StoryMessageRecipient) String() string { func (*SyncMessage_Sent_StoryMessageRecipient) ProtoMessage() {} func (x *SyncMessage_Sent_StoryMessageRecipient) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[79] + mi := &file_signalpb_SignalService_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8144,7 +8239,7 @@ type SyncMessage_Blocked_BlockedE164 struct { func (x *SyncMessage_Blocked_BlockedE164) Reset() { *x = SyncMessage_Blocked_BlockedE164{} - mi := &file_signalpb_SignalService_proto_msgTypes[80] + mi := &file_signalpb_SignalService_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8156,7 +8251,7 @@ func (x *SyncMessage_Blocked_BlockedE164) String() string { func (*SyncMessage_Blocked_BlockedE164) ProtoMessage() {} func (x *SyncMessage_Blocked_BlockedE164) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[80] + mi := &file_signalpb_SignalService_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8196,7 +8291,7 @@ type SyncMessage_Blocked_BlockedAci struct { func (x *SyncMessage_Blocked_BlockedAci) Reset() { *x = SyncMessage_Blocked_BlockedAci{} - mi := &file_signalpb_SignalService_proto_msgTypes[81] + mi := &file_signalpb_SignalService_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8208,7 +8303,7 @@ func (x *SyncMessage_Blocked_BlockedAci) String() string { func (*SyncMessage_Blocked_BlockedAci) ProtoMessage() {} func (x *SyncMessage_Blocked_BlockedAci) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[81] + mi := &file_signalpb_SignalService_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8248,7 +8343,7 @@ type SyncMessage_Blocked_BlockedGroup struct { func (x *SyncMessage_Blocked_BlockedGroup) Reset() { *x = SyncMessage_Blocked_BlockedGroup{} - mi := &file_signalpb_SignalService_proto_msgTypes[82] + mi := &file_signalpb_SignalService_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8260,7 +8355,7 @@ func (x *SyncMessage_Blocked_BlockedGroup) String() string { func (*SyncMessage_Blocked_BlockedGroup) ProtoMessage() {} func (x *SyncMessage_Blocked_BlockedGroup) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[82] + mi := &file_signalpb_SignalService_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8306,7 +8401,7 @@ type SyncMessage_OutgoingPayment_MobileCoin struct { func (x *SyncMessage_OutgoingPayment_MobileCoin) Reset() { *x = SyncMessage_OutgoingPayment_MobileCoin{} - mi := &file_signalpb_SignalService_proto_msgTypes[83] + mi := &file_signalpb_SignalService_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8318,7 +8413,7 @@ func (x *SyncMessage_OutgoingPayment_MobileCoin) String() string { func (*SyncMessage_OutgoingPayment_MobileCoin) ProtoMessage() {} func (x *SyncMessage_OutgoingPayment_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[83] + mi := &file_signalpb_SignalService_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8400,7 +8495,7 @@ type SyncMessage_DeleteForMe_MessageDeletes struct { func (x *SyncMessage_DeleteForMe_MessageDeletes) Reset() { *x = SyncMessage_DeleteForMe_MessageDeletes{} - mi := &file_signalpb_SignalService_proto_msgTypes[84] + mi := &file_signalpb_SignalService_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8412,7 +8507,7 @@ func (x *SyncMessage_DeleteForMe_MessageDeletes) String() string { func (*SyncMessage_DeleteForMe_MessageDeletes) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_MessageDeletes) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[84] + mi := &file_signalpb_SignalService_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8458,7 +8553,7 @@ type SyncMessage_DeleteForMe_AttachmentDelete struct { func (x *SyncMessage_DeleteForMe_AttachmentDelete) Reset() { *x = SyncMessage_DeleteForMe_AttachmentDelete{} - mi := &file_signalpb_SignalService_proto_msgTypes[85] + mi := &file_signalpb_SignalService_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8470,7 +8565,7 @@ func (x *SyncMessage_DeleteForMe_AttachmentDelete) String() string { func (*SyncMessage_DeleteForMe_AttachmentDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_AttachmentDelete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[85] + mi := &file_signalpb_SignalService_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8533,7 +8628,7 @@ type SyncMessage_DeleteForMe_ConversationDelete struct { func (x *SyncMessage_DeleteForMe_ConversationDelete) Reset() { *x = SyncMessage_DeleteForMe_ConversationDelete{} - mi := &file_signalpb_SignalService_proto_msgTypes[86] + mi := &file_signalpb_SignalService_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8545,7 +8640,7 @@ func (x *SyncMessage_DeleteForMe_ConversationDelete) String() string { func (*SyncMessage_DeleteForMe_ConversationDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_ConversationDelete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[86] + mi := &file_signalpb_SignalService_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8598,7 +8693,7 @@ type SyncMessage_DeleteForMe_LocalOnlyConversationDelete struct { func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) Reset() { *x = SyncMessage_DeleteForMe_LocalOnlyConversationDelete{} - mi := &file_signalpb_SignalService_proto_msgTypes[87] + mi := &file_signalpb_SignalService_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8610,7 +8705,7 @@ func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) String() string { func (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[87] + mi := &file_signalpb_SignalService_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8646,7 +8741,7 @@ type SyncMessage_AttachmentBackfillResponse_AttachmentData struct { func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) Reset() { *x = SyncMessage_AttachmentBackfillResponse_AttachmentData{} - mi := &file_signalpb_SignalService_proto_msgTypes[88] + mi := &file_signalpb_SignalService_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8658,7 +8753,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) String() string func (*SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[88] + mi := &file_signalpb_SignalService_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8727,7 +8822,7 @@ type SyncMessage_AttachmentBackfillResponse_AttachmentDataList struct { func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) Reset() { *x = SyncMessage_AttachmentBackfillResponse_AttachmentDataList{} - mi := &file_signalpb_SignalService_proto_msgTypes[89] + mi := &file_signalpb_SignalService_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8739,7 +8834,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) String() str func (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[89] + mi := &file_signalpb_SignalService_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8779,7 +8874,7 @@ type ContactDetails_Avatar struct { func (x *ContactDetails_Avatar) Reset() { *x = ContactDetails_Avatar{} - mi := &file_signalpb_SignalService_proto_msgTypes[90] + mi := &file_signalpb_SignalService_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8791,7 +8886,7 @@ func (x *ContactDetails_Avatar) String() string { func (*ContactDetails_Avatar) ProtoMessage() {} func (x *ContactDetails_Avatar) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[90] + mi := &file_signalpb_SignalService_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8831,7 +8926,7 @@ type PaymentAddress_MobileCoin struct { func (x *PaymentAddress_MobileCoin) Reset() { *x = PaymentAddress_MobileCoin{} - mi := &file_signalpb_SignalService_proto_msgTypes[91] + mi := &file_signalpb_SignalService_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8843,7 +8938,7 @@ func (x *PaymentAddress_MobileCoin) String() string { func (*PaymentAddress_MobileCoin) ProtoMessage() {} func (x *PaymentAddress_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[91] + mi := &file_signalpb_SignalService_proto_msgTypes[92] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8961,7 +9056,7 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\aurgency\x18\x02 \x01(\x0e2).signalservice.CallMessage.Opaque.UrgencyR\aurgency\"0\n" + "\aUrgency\x12\r\n" + "\tDROPPABLE\x10\x00\x12\x16\n" + - "\x12HANDLE_IMMEDIATELY\x10\x01J\x04\b\x04\x10\x05J\x04\b\x06\x10\aJ\x04\b\b\x10\t\"\x80.\n" + + "\x12HANDLE_IMMEDIATELY\x10\x01J\x04\b\x04\x10\x05J\x04\b\x06\x10\aJ\x04\b\b\x10\t\"\xc7/\n" + "\vDataMessage\x12\x12\n" + "\x04body\x18\x01 \x01(\tR\x04body\x12B\n" + "\vattachments\x18\x02 \x03(\v2 .signalservice.AttachmentPointerR\vattachments\x127\n" + @@ -9049,15 +9144,18 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\x06NORMAL\x10\x00\x12\x0e\n" + "\n" + "GIFT_BADGE\x10\x01\x12\b\n" + - "\x04POLL\x10\x02J\x04\b\x02\x10\x03\x1a\xbf\n" + - "\n" + + "\x04POLL\x10\x02J\x04\b\x02\x10\x03\x1a\x86\f\n" + "\aContact\x12;\n" + "\x04name\x18\x01 \x01(\v2'.signalservice.DataMessage.Contact.NameR\x04name\x12@\n" + "\x06number\x18\x03 \x03(\v2(.signalservice.DataMessage.Contact.PhoneR\x06number\x12>\n" + "\x05email\x18\x04 \x03(\v2(.signalservice.DataMessage.Contact.EmailR\x05email\x12J\n" + "\aaddress\x18\x05 \x03(\v20.signalservice.DataMessage.Contact.PostalAddressR\aaddress\x12A\n" + "\x06avatar\x18\x06 \x01(\v2).signalservice.DataMessage.Contact.AvatarR\x06avatar\x12\"\n" + - "\forganization\x18\a \x01(\tR\forganization\x1a\xb6\x01\n" + + "\forganization\x18\a \x01(\tR\forganization\x12\x1c\n" + + "\taciBinary\x18\b \x01(\fR\taciBinary\x12M\n" + + "\bnickname\x18\t \x01(\v21.signalservice.DataMessage.Contact.SignalNicknameR\bnickname\x12\x12\n" + + "\x04note\x18\n" + + " \x01(\tR\x04note\x1a\xb6\x01\n" + "\x04Name\x12\x1c\n" + "\tgivenName\x18\x01 \x01(\tR\tgivenName\x12\x1e\n" + "\n" + @@ -9108,7 +9206,10 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\x06CUSTOM\x10\x03\x1a`\n" + "\x06Avatar\x128\n" + "\x06avatar\x18\x01 \x01(\v2 .signalservice.AttachmentPointerR\x06avatar\x12\x1c\n" + - "\tisProfile\x18\x02 \x01(\bR\tisProfile\x1a\xa5\x01\n" + + "\tisProfile\x18\x02 \x01(\bR\tisProfile\x1a>\n" + + "\x0eSignalNickname\x12\x14\n" + + "\x05given\x18\x01 \x01(\tR\x05given\x12\x16\n" + + "\x06family\x18\x02 \x01(\tR\x06familyJ\x04\b\x02\x10\x03\x1a\xa5\x01\n" + "\aSticker\x12\x16\n" + "\x06packId\x18\x01 \x01(\fR\x06packId\x12\x18\n" + "\apackKey\x18\x02 \x01(\fR\apackKey\x12\x1c\n" + @@ -9498,7 +9599,7 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\x11MESSAGE_NOT_FOUND\x10\x00B\x06\n" + "\x04data\x1a\x10\n" + "\x0eUsernameChangeB\t\n" + - "\acontentJ\x04\b\x03\x10\x04J\x04\b\x11\x10\x12\"\xe7\x04\n" + + "\acontentJ\x04\b\x03\x10\x04J\x04\b\x11\x10\x12\"\xc1\x05\n" + "\x11AttachmentPointer\x12\x16\n" + "\x05cdnId\x18\x01 \x01(\x06H\x00R\x05cdnId\x12\x18\n" + "\x06cdnKey\x18\x0f \x01(\tH\x00R\x06cdnKey\x12\x1e\n" + @@ -9520,7 +9621,9 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\acaption\x18\v \x01(\tR\acaption\x12\x1a\n" + "\bblurHash\x18\f \x01(\tR\bblurHash\x12(\n" + "\x0fuploadTimestamp\x18\r \x01(\x04R\x0fuploadTimestamp\x12\x1c\n" + - "\tcdnNumber\x18\x0e \x01(\rR\tcdnNumber\"9\n" + + "\tcdnNumber\x18\x0e \x01(\rR\tcdnNumber\x12$\n" + + "\raudioWaveform\x18\x15 \x01(\fR\raudioWaveform\x122\n" + + "\x14audioDurationSeconds\x18\x16 \x01(\x02R\x14audioDurationSeconds\"9\n" + "\x05Flags\x12\x11\n" + "\rVOICE_MESSAGE\x10\x01\x12\x0e\n" + "\n" + @@ -9614,7 +9717,7 @@ func file_signalpb_SignalService_proto_rawDescGZIP() []byte { } var file_signalpb_SignalService_proto_enumTypes = make([]protoimpl.EnumInfo, 28) -var file_signalpb_SignalService_proto_msgTypes = make([]protoimpl.MessageInfo, 92) +var file_signalpb_SignalService_proto_msgTypes = make([]protoimpl.MessageInfo, 93) var file_signalpb_SignalService_proto_goTypes = []any{ (Envelope_Type)(0), // 0: signalservice.Envelope.Type (CallMessage_Offer_Type)(0), // 1: signalservice.CallMessage.Offer.Type @@ -9698,44 +9801,45 @@ var file_signalpb_SignalService_proto_goTypes = []any{ (*DataMessage_Contact_Email)(nil), // 79: signalservice.DataMessage.Contact.Email (*DataMessage_Contact_PostalAddress)(nil), // 80: signalservice.DataMessage.Contact.PostalAddress (*DataMessage_Contact_Avatar)(nil), // 81: signalservice.DataMessage.Contact.Avatar - (*TextAttachment_Gradient)(nil), // 82: signalservice.TextAttachment.Gradient - (*SyncMessage_Sent)(nil), // 83: signalservice.SyncMessage.Sent - (*SyncMessage_Contacts)(nil), // 84: signalservice.SyncMessage.Contacts - (*SyncMessage_Blocked)(nil), // 85: signalservice.SyncMessage.Blocked - (*SyncMessage_Request)(nil), // 86: signalservice.SyncMessage.Request - (*SyncMessage_Read)(nil), // 87: signalservice.SyncMessage.Read - (*SyncMessage_Viewed)(nil), // 88: signalservice.SyncMessage.Viewed - (*SyncMessage_Configuration)(nil), // 89: signalservice.SyncMessage.Configuration - (*SyncMessage_StickerPackOperation)(nil), // 90: signalservice.SyncMessage.StickerPackOperation - (*SyncMessage_ViewOnceOpen)(nil), // 91: signalservice.SyncMessage.ViewOnceOpen - (*SyncMessage_FetchLatest)(nil), // 92: signalservice.SyncMessage.FetchLatest - (*SyncMessage_Keys)(nil), // 93: signalservice.SyncMessage.Keys - (*SyncMessage_PniIdentity)(nil), // 94: signalservice.SyncMessage.PniIdentity - (*SyncMessage_MessageRequestResponse)(nil), // 95: signalservice.SyncMessage.MessageRequestResponse - (*SyncMessage_OutgoingPayment)(nil), // 96: signalservice.SyncMessage.OutgoingPayment - (*SyncMessage_PniChangeNumber)(nil), // 97: signalservice.SyncMessage.PniChangeNumber - (*SyncMessage_CallEvent)(nil), // 98: signalservice.SyncMessage.CallEvent - (*SyncMessage_CallLinkUpdate)(nil), // 99: signalservice.SyncMessage.CallLinkUpdate - (*SyncMessage_CallLogEvent)(nil), // 100: signalservice.SyncMessage.CallLogEvent - (*SyncMessage_DeleteForMe)(nil), // 101: signalservice.SyncMessage.DeleteForMe - (*SyncMessage_DeviceNameChange)(nil), // 102: signalservice.SyncMessage.DeviceNameChange - (*SyncMessage_AttachmentBackfillRequest)(nil), // 103: signalservice.SyncMessage.AttachmentBackfillRequest - (*SyncMessage_AttachmentBackfillResponse)(nil), // 104: signalservice.SyncMessage.AttachmentBackfillResponse - (*SyncMessage_UsernameChange)(nil), // 105: signalservice.SyncMessage.UsernameChange - (*SyncMessage_Sent_UnidentifiedDeliveryStatus)(nil), // 106: signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus - (*SyncMessage_Sent_StoryMessageRecipient)(nil), // 107: signalservice.SyncMessage.Sent.StoryMessageRecipient - (*SyncMessage_Blocked_BlockedE164)(nil), // 108: signalservice.SyncMessage.Blocked.BlockedE164 - (*SyncMessage_Blocked_BlockedAci)(nil), // 109: signalservice.SyncMessage.Blocked.BlockedAci - (*SyncMessage_Blocked_BlockedGroup)(nil), // 110: signalservice.SyncMessage.Blocked.BlockedGroup - (*SyncMessage_OutgoingPayment_MobileCoin)(nil), // 111: signalservice.SyncMessage.OutgoingPayment.MobileCoin - (*SyncMessage_DeleteForMe_MessageDeletes)(nil), // 112: signalservice.SyncMessage.DeleteForMe.MessageDeletes - (*SyncMessage_DeleteForMe_AttachmentDelete)(nil), // 113: signalservice.SyncMessage.DeleteForMe.AttachmentDelete - (*SyncMessage_DeleteForMe_ConversationDelete)(nil), // 114: signalservice.SyncMessage.DeleteForMe.ConversationDelete - (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete)(nil), // 115: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete - (*SyncMessage_AttachmentBackfillResponse_AttachmentData)(nil), // 116: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList)(nil), // 117: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList - (*ContactDetails_Avatar)(nil), // 118: signalservice.ContactDetails.Avatar - (*PaymentAddress_MobileCoin)(nil), // 119: signalservice.PaymentAddress.MobileCoin + (*DataMessage_Contact_SignalNickname)(nil), // 82: signalservice.DataMessage.Contact.SignalNickname + (*TextAttachment_Gradient)(nil), // 83: signalservice.TextAttachment.Gradient + (*SyncMessage_Sent)(nil), // 84: signalservice.SyncMessage.Sent + (*SyncMessage_Contacts)(nil), // 85: signalservice.SyncMessage.Contacts + (*SyncMessage_Blocked)(nil), // 86: signalservice.SyncMessage.Blocked + (*SyncMessage_Request)(nil), // 87: signalservice.SyncMessage.Request + (*SyncMessage_Read)(nil), // 88: signalservice.SyncMessage.Read + (*SyncMessage_Viewed)(nil), // 89: signalservice.SyncMessage.Viewed + (*SyncMessage_Configuration)(nil), // 90: signalservice.SyncMessage.Configuration + (*SyncMessage_StickerPackOperation)(nil), // 91: signalservice.SyncMessage.StickerPackOperation + (*SyncMessage_ViewOnceOpen)(nil), // 92: signalservice.SyncMessage.ViewOnceOpen + (*SyncMessage_FetchLatest)(nil), // 93: signalservice.SyncMessage.FetchLatest + (*SyncMessage_Keys)(nil), // 94: signalservice.SyncMessage.Keys + (*SyncMessage_PniIdentity)(nil), // 95: signalservice.SyncMessage.PniIdentity + (*SyncMessage_MessageRequestResponse)(nil), // 96: signalservice.SyncMessage.MessageRequestResponse + (*SyncMessage_OutgoingPayment)(nil), // 97: signalservice.SyncMessage.OutgoingPayment + (*SyncMessage_PniChangeNumber)(nil), // 98: signalservice.SyncMessage.PniChangeNumber + (*SyncMessage_CallEvent)(nil), // 99: signalservice.SyncMessage.CallEvent + (*SyncMessage_CallLinkUpdate)(nil), // 100: signalservice.SyncMessage.CallLinkUpdate + (*SyncMessage_CallLogEvent)(nil), // 101: signalservice.SyncMessage.CallLogEvent + (*SyncMessage_DeleteForMe)(nil), // 102: signalservice.SyncMessage.DeleteForMe + (*SyncMessage_DeviceNameChange)(nil), // 103: signalservice.SyncMessage.DeviceNameChange + (*SyncMessage_AttachmentBackfillRequest)(nil), // 104: signalservice.SyncMessage.AttachmentBackfillRequest + (*SyncMessage_AttachmentBackfillResponse)(nil), // 105: signalservice.SyncMessage.AttachmentBackfillResponse + (*SyncMessage_UsernameChange)(nil), // 106: signalservice.SyncMessage.UsernameChange + (*SyncMessage_Sent_UnidentifiedDeliveryStatus)(nil), // 107: signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus + (*SyncMessage_Sent_StoryMessageRecipient)(nil), // 108: signalservice.SyncMessage.Sent.StoryMessageRecipient + (*SyncMessage_Blocked_BlockedE164)(nil), // 109: signalservice.SyncMessage.Blocked.BlockedE164 + (*SyncMessage_Blocked_BlockedAci)(nil), // 110: signalservice.SyncMessage.Blocked.BlockedAci + (*SyncMessage_Blocked_BlockedGroup)(nil), // 111: signalservice.SyncMessage.Blocked.BlockedGroup + (*SyncMessage_OutgoingPayment_MobileCoin)(nil), // 112: signalservice.SyncMessage.OutgoingPayment.MobileCoin + (*SyncMessage_DeleteForMe_MessageDeletes)(nil), // 113: signalservice.SyncMessage.DeleteForMe.MessageDeletes + (*SyncMessage_DeleteForMe_AttachmentDelete)(nil), // 114: signalservice.SyncMessage.DeleteForMe.AttachmentDelete + (*SyncMessage_DeleteForMe_ConversationDelete)(nil), // 115: signalservice.SyncMessage.DeleteForMe.ConversationDelete + (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete)(nil), // 116: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete + (*SyncMessage_AttachmentBackfillResponse_AttachmentData)(nil), // 117: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList)(nil), // 118: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList + (*ContactDetails_Avatar)(nil), // 119: signalservice.ContactDetails.Avatar + (*PaymentAddress_MobileCoin)(nil), // 120: signalservice.PaymentAddress.MobileCoin } var file_signalpb_SignalService_proto_depIdxs = []int32{ 0, // 0: signalservice.Envelope.type:type_name -> signalservice.Envelope.Type @@ -9782,33 +9886,33 @@ var file_signalpb_SignalService_proto_depIdxs = []int32{ 40, // 41: signalservice.Preview.image:type_name -> signalservice.AttachmentPointer 13, // 42: signalservice.TextAttachment.textStyle:type_name -> signalservice.TextAttachment.Style 36, // 43: signalservice.TextAttachment.preview:type_name -> signalservice.Preview - 82, // 44: signalservice.TextAttachment.gradient:type_name -> signalservice.TextAttachment.Gradient + 83, // 44: signalservice.TextAttachment.gradient:type_name -> signalservice.TextAttachment.Gradient 14, // 45: signalservice.Verified.state:type_name -> signalservice.Verified.State - 83, // 46: signalservice.SyncMessage.sent:type_name -> signalservice.SyncMessage.Sent - 84, // 47: signalservice.SyncMessage.contacts:type_name -> signalservice.SyncMessage.Contacts - 86, // 48: signalservice.SyncMessage.request:type_name -> signalservice.SyncMessage.Request - 85, // 49: signalservice.SyncMessage.blocked:type_name -> signalservice.SyncMessage.Blocked + 84, // 46: signalservice.SyncMessage.sent:type_name -> signalservice.SyncMessage.Sent + 85, // 47: signalservice.SyncMessage.contacts:type_name -> signalservice.SyncMessage.Contacts + 87, // 48: signalservice.SyncMessage.request:type_name -> signalservice.SyncMessage.Request + 86, // 49: signalservice.SyncMessage.blocked:type_name -> signalservice.SyncMessage.Blocked 38, // 50: signalservice.SyncMessage.verified:type_name -> signalservice.Verified - 89, // 51: signalservice.SyncMessage.configuration:type_name -> signalservice.SyncMessage.Configuration - 91, // 52: signalservice.SyncMessage.viewOnceOpen:type_name -> signalservice.SyncMessage.ViewOnceOpen - 92, // 53: signalservice.SyncMessage.fetchLatest:type_name -> signalservice.SyncMessage.FetchLatest - 93, // 54: signalservice.SyncMessage.keys:type_name -> signalservice.SyncMessage.Keys - 95, // 55: signalservice.SyncMessage.messageRequestResponse:type_name -> signalservice.SyncMessage.MessageRequestResponse - 96, // 56: signalservice.SyncMessage.outgoingPayment:type_name -> signalservice.SyncMessage.OutgoingPayment - 97, // 57: signalservice.SyncMessage.pniChangeNumber:type_name -> signalservice.SyncMessage.PniChangeNumber - 98, // 58: signalservice.SyncMessage.callEvent:type_name -> signalservice.SyncMessage.CallEvent - 99, // 59: signalservice.SyncMessage.callLinkUpdate:type_name -> signalservice.SyncMessage.CallLinkUpdate - 100, // 60: signalservice.SyncMessage.callLogEvent:type_name -> signalservice.SyncMessage.CallLogEvent - 101, // 61: signalservice.SyncMessage.deleteForMe:type_name -> signalservice.SyncMessage.DeleteForMe - 102, // 62: signalservice.SyncMessage.deviceNameChange:type_name -> signalservice.SyncMessage.DeviceNameChange - 103, // 63: signalservice.SyncMessage.attachmentBackfillRequest:type_name -> signalservice.SyncMessage.AttachmentBackfillRequest - 104, // 64: signalservice.SyncMessage.attachmentBackfillResponse:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse - 105, // 65: signalservice.SyncMessage.usernameChange:type_name -> signalservice.SyncMessage.UsernameChange - 87, // 66: signalservice.SyncMessage.read:type_name -> signalservice.SyncMessage.Read - 90, // 67: signalservice.SyncMessage.stickerPackOperation:type_name -> signalservice.SyncMessage.StickerPackOperation - 88, // 68: signalservice.SyncMessage.viewed:type_name -> signalservice.SyncMessage.Viewed - 118, // 69: signalservice.ContactDetails.avatar:type_name -> signalservice.ContactDetails.Avatar - 119, // 70: signalservice.PaymentAddress.mobileCoin:type_name -> signalservice.PaymentAddress.MobileCoin + 90, // 51: signalservice.SyncMessage.configuration:type_name -> signalservice.SyncMessage.Configuration + 92, // 52: signalservice.SyncMessage.viewOnceOpen:type_name -> signalservice.SyncMessage.ViewOnceOpen + 93, // 53: signalservice.SyncMessage.fetchLatest:type_name -> signalservice.SyncMessage.FetchLatest + 94, // 54: signalservice.SyncMessage.keys:type_name -> signalservice.SyncMessage.Keys + 96, // 55: signalservice.SyncMessage.messageRequestResponse:type_name -> signalservice.SyncMessage.MessageRequestResponse + 97, // 56: signalservice.SyncMessage.outgoingPayment:type_name -> signalservice.SyncMessage.OutgoingPayment + 98, // 57: signalservice.SyncMessage.pniChangeNumber:type_name -> signalservice.SyncMessage.PniChangeNumber + 99, // 58: signalservice.SyncMessage.callEvent:type_name -> signalservice.SyncMessage.CallEvent + 100, // 59: signalservice.SyncMessage.callLinkUpdate:type_name -> signalservice.SyncMessage.CallLinkUpdate + 101, // 60: signalservice.SyncMessage.callLogEvent:type_name -> signalservice.SyncMessage.CallLogEvent + 102, // 61: signalservice.SyncMessage.deleteForMe:type_name -> signalservice.SyncMessage.DeleteForMe + 103, // 62: signalservice.SyncMessage.deviceNameChange:type_name -> signalservice.SyncMessage.DeviceNameChange + 104, // 63: signalservice.SyncMessage.attachmentBackfillRequest:type_name -> signalservice.SyncMessage.AttachmentBackfillRequest + 105, // 64: signalservice.SyncMessage.attachmentBackfillResponse:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse + 106, // 65: signalservice.SyncMessage.usernameChange:type_name -> signalservice.SyncMessage.UsernameChange + 88, // 66: signalservice.SyncMessage.read:type_name -> signalservice.SyncMessage.Read + 91, // 67: signalservice.SyncMessage.stickerPackOperation:type_name -> signalservice.SyncMessage.StickerPackOperation + 89, // 68: signalservice.SyncMessage.viewed:type_name -> signalservice.SyncMessage.Viewed + 119, // 69: signalservice.ContactDetails.avatar:type_name -> signalservice.ContactDetails.Avatar + 120, // 70: signalservice.PaymentAddress.mobileCoin:type_name -> signalservice.PaymentAddress.MobileCoin 31, // 71: signalservice.EditMessage.dataMessage:type_name -> signalservice.DataMessage 27, // 72: signalservice.BodyRange.style:type_name -> signalservice.BodyRange.Style 1, // 73: signalservice.CallMessage.Offer.type:type_name -> signalservice.CallMessage.Offer.Type @@ -9824,61 +9928,62 @@ var file_signalpb_SignalService_proto_depIdxs = []int32{ 79, // 83: signalservice.DataMessage.Contact.email:type_name -> signalservice.DataMessage.Contact.Email 80, // 84: signalservice.DataMessage.Contact.address:type_name -> signalservice.DataMessage.Contact.PostalAddress 81, // 85: signalservice.DataMessage.Contact.avatar:type_name -> signalservice.DataMessage.Contact.Avatar - 40, // 86: signalservice.DataMessage.Sticker.data:type_name -> signalservice.AttachmentPointer - 74, // 87: signalservice.DataMessage.Payment.Amount.mobileCoin:type_name -> signalservice.DataMessage.Payment.Amount.MobileCoin - 75, // 88: signalservice.DataMessage.Payment.Notification.mobileCoin:type_name -> signalservice.DataMessage.Payment.Notification.MobileCoin - 6, // 89: signalservice.DataMessage.Payment.Activation.type:type_name -> signalservice.DataMessage.Payment.Activation.Type - 40, // 90: signalservice.DataMessage.Quote.QuotedAttachment.thumbnail:type_name -> signalservice.AttachmentPointer - 8, // 91: signalservice.DataMessage.Contact.Phone.type:type_name -> signalservice.DataMessage.Contact.Phone.Type - 9, // 92: signalservice.DataMessage.Contact.Email.type:type_name -> signalservice.DataMessage.Contact.Email.Type - 10, // 93: signalservice.DataMessage.Contact.PostalAddress.type:type_name -> signalservice.DataMessage.Contact.PostalAddress.Type - 40, // 94: signalservice.DataMessage.Contact.Avatar.avatar:type_name -> signalservice.AttachmentPointer - 31, // 95: signalservice.SyncMessage.Sent.message:type_name -> signalservice.DataMessage - 106, // 96: signalservice.SyncMessage.Sent.unidentifiedStatus:type_name -> signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus - 35, // 97: signalservice.SyncMessage.Sent.storyMessage:type_name -> signalservice.StoryMessage - 107, // 98: signalservice.SyncMessage.Sent.storyMessageRecipients:type_name -> signalservice.SyncMessage.Sent.StoryMessageRecipient - 46, // 99: signalservice.SyncMessage.Sent.editMessage:type_name -> signalservice.EditMessage - 40, // 100: signalservice.SyncMessage.Contacts.blob:type_name -> signalservice.AttachmentPointer - 108, // 101: signalservice.SyncMessage.Blocked.blockedE164s:type_name -> signalservice.SyncMessage.Blocked.BlockedE164 - 109, // 102: signalservice.SyncMessage.Blocked.blockedAcis:type_name -> signalservice.SyncMessage.Blocked.BlockedAci - 110, // 103: signalservice.SyncMessage.Blocked.blockedGroups:type_name -> signalservice.SyncMessage.Blocked.BlockedGroup - 15, // 104: signalservice.SyncMessage.Request.type:type_name -> signalservice.SyncMessage.Request.Type - 16, // 105: signalservice.SyncMessage.StickerPackOperation.type:type_name -> signalservice.SyncMessage.StickerPackOperation.Type - 17, // 106: signalservice.SyncMessage.FetchLatest.type:type_name -> signalservice.SyncMessage.FetchLatest.Type - 18, // 107: signalservice.SyncMessage.MessageRequestResponse.type:type_name -> signalservice.SyncMessage.MessageRequestResponse.Type - 111, // 108: signalservice.SyncMessage.OutgoingPayment.mobileCoin:type_name -> signalservice.SyncMessage.OutgoingPayment.MobileCoin - 19, // 109: signalservice.SyncMessage.CallEvent.type:type_name -> signalservice.SyncMessage.CallEvent.Type - 20, // 110: signalservice.SyncMessage.CallEvent.direction:type_name -> signalservice.SyncMessage.CallEvent.Direction - 21, // 111: signalservice.SyncMessage.CallEvent.event:type_name -> signalservice.SyncMessage.CallEvent.Event - 22, // 112: signalservice.SyncMessage.CallLinkUpdate.type:type_name -> signalservice.SyncMessage.CallLinkUpdate.Type - 23, // 113: signalservice.SyncMessage.CallLogEvent.type:type_name -> signalservice.SyncMessage.CallLogEvent.Type - 112, // 114: signalservice.SyncMessage.DeleteForMe.messageDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.MessageDeletes - 114, // 115: signalservice.SyncMessage.DeleteForMe.conversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.ConversationDelete - 115, // 116: signalservice.SyncMessage.DeleteForMe.localOnlyConversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete - 113, // 117: signalservice.SyncMessage.DeleteForMe.attachmentDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.AttachmentDelete - 48, // 118: signalservice.SyncMessage.AttachmentBackfillRequest.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 119: signalservice.SyncMessage.AttachmentBackfillRequest.targetConversation:type_name -> signalservice.ConversationIdentifier - 48, // 120: signalservice.SyncMessage.AttachmentBackfillResponse.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 121: signalservice.SyncMessage.AttachmentBackfillResponse.targetConversation:type_name -> signalservice.ConversationIdentifier - 117, // 122: signalservice.SyncMessage.AttachmentBackfillResponse.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList - 24, // 123: signalservice.SyncMessage.AttachmentBackfillResponse.error:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.Error - 49, // 124: signalservice.SyncMessage.DeleteForMe.MessageDeletes.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 125: signalservice.SyncMessage.DeleteForMe.MessageDeletes.messages:type_name -> signalservice.AddressableMessage - 49, // 126: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 127: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 128: signalservice.SyncMessage.DeleteForMe.ConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 129: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentMessages:type_name -> signalservice.AddressableMessage - 48, // 130: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentNonExpiringMessages:type_name -> signalservice.AddressableMessage - 49, // 131: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier - 40, // 132: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.attachment:type_name -> signalservice.AttachmentPointer - 25, // 133: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.status:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Status - 116, // 134: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - 116, // 135: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.longText:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - 136, // [136:136] is the sub-list for method output_type - 136, // [136:136] is the sub-list for method input_type - 136, // [136:136] is the sub-list for extension type_name - 136, // [136:136] is the sub-list for extension extendee - 0, // [0:136] is the sub-list for field type_name + 82, // 86: signalservice.DataMessage.Contact.nickname:type_name -> signalservice.DataMessage.Contact.SignalNickname + 40, // 87: signalservice.DataMessage.Sticker.data:type_name -> signalservice.AttachmentPointer + 74, // 88: signalservice.DataMessage.Payment.Amount.mobileCoin:type_name -> signalservice.DataMessage.Payment.Amount.MobileCoin + 75, // 89: signalservice.DataMessage.Payment.Notification.mobileCoin:type_name -> signalservice.DataMessage.Payment.Notification.MobileCoin + 6, // 90: signalservice.DataMessage.Payment.Activation.type:type_name -> signalservice.DataMessage.Payment.Activation.Type + 40, // 91: signalservice.DataMessage.Quote.QuotedAttachment.thumbnail:type_name -> signalservice.AttachmentPointer + 8, // 92: signalservice.DataMessage.Contact.Phone.type:type_name -> signalservice.DataMessage.Contact.Phone.Type + 9, // 93: signalservice.DataMessage.Contact.Email.type:type_name -> signalservice.DataMessage.Contact.Email.Type + 10, // 94: signalservice.DataMessage.Contact.PostalAddress.type:type_name -> signalservice.DataMessage.Contact.PostalAddress.Type + 40, // 95: signalservice.DataMessage.Contact.Avatar.avatar:type_name -> signalservice.AttachmentPointer + 31, // 96: signalservice.SyncMessage.Sent.message:type_name -> signalservice.DataMessage + 107, // 97: signalservice.SyncMessage.Sent.unidentifiedStatus:type_name -> signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus + 35, // 98: signalservice.SyncMessage.Sent.storyMessage:type_name -> signalservice.StoryMessage + 108, // 99: signalservice.SyncMessage.Sent.storyMessageRecipients:type_name -> signalservice.SyncMessage.Sent.StoryMessageRecipient + 46, // 100: signalservice.SyncMessage.Sent.editMessage:type_name -> signalservice.EditMessage + 40, // 101: signalservice.SyncMessage.Contacts.blob:type_name -> signalservice.AttachmentPointer + 109, // 102: signalservice.SyncMessage.Blocked.blockedE164s:type_name -> signalservice.SyncMessage.Blocked.BlockedE164 + 110, // 103: signalservice.SyncMessage.Blocked.blockedAcis:type_name -> signalservice.SyncMessage.Blocked.BlockedAci + 111, // 104: signalservice.SyncMessage.Blocked.blockedGroups:type_name -> signalservice.SyncMessage.Blocked.BlockedGroup + 15, // 105: signalservice.SyncMessage.Request.type:type_name -> signalservice.SyncMessage.Request.Type + 16, // 106: signalservice.SyncMessage.StickerPackOperation.type:type_name -> signalservice.SyncMessage.StickerPackOperation.Type + 17, // 107: signalservice.SyncMessage.FetchLatest.type:type_name -> signalservice.SyncMessage.FetchLatest.Type + 18, // 108: signalservice.SyncMessage.MessageRequestResponse.type:type_name -> signalservice.SyncMessage.MessageRequestResponse.Type + 112, // 109: signalservice.SyncMessage.OutgoingPayment.mobileCoin:type_name -> signalservice.SyncMessage.OutgoingPayment.MobileCoin + 19, // 110: signalservice.SyncMessage.CallEvent.type:type_name -> signalservice.SyncMessage.CallEvent.Type + 20, // 111: signalservice.SyncMessage.CallEvent.direction:type_name -> signalservice.SyncMessage.CallEvent.Direction + 21, // 112: signalservice.SyncMessage.CallEvent.event:type_name -> signalservice.SyncMessage.CallEvent.Event + 22, // 113: signalservice.SyncMessage.CallLinkUpdate.type:type_name -> signalservice.SyncMessage.CallLinkUpdate.Type + 23, // 114: signalservice.SyncMessage.CallLogEvent.type:type_name -> signalservice.SyncMessage.CallLogEvent.Type + 113, // 115: signalservice.SyncMessage.DeleteForMe.messageDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.MessageDeletes + 115, // 116: signalservice.SyncMessage.DeleteForMe.conversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.ConversationDelete + 116, // 117: signalservice.SyncMessage.DeleteForMe.localOnlyConversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete + 114, // 118: signalservice.SyncMessage.DeleteForMe.attachmentDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.AttachmentDelete + 48, // 119: signalservice.SyncMessage.AttachmentBackfillRequest.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 120: signalservice.SyncMessage.AttachmentBackfillRequest.targetConversation:type_name -> signalservice.ConversationIdentifier + 48, // 121: signalservice.SyncMessage.AttachmentBackfillResponse.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 122: signalservice.SyncMessage.AttachmentBackfillResponse.targetConversation:type_name -> signalservice.ConversationIdentifier + 118, // 123: signalservice.SyncMessage.AttachmentBackfillResponse.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList + 24, // 124: signalservice.SyncMessage.AttachmentBackfillResponse.error:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.Error + 49, // 125: signalservice.SyncMessage.DeleteForMe.MessageDeletes.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 126: signalservice.SyncMessage.DeleteForMe.MessageDeletes.messages:type_name -> signalservice.AddressableMessage + 49, // 127: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 128: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 129: signalservice.SyncMessage.DeleteForMe.ConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 130: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentMessages:type_name -> signalservice.AddressableMessage + 48, // 131: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentNonExpiringMessages:type_name -> signalservice.AddressableMessage + 49, // 132: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier + 40, // 133: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.attachment:type_name -> signalservice.AttachmentPointer + 25, // 134: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.status:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Status + 117, // 135: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + 117, // 136: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.longText:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + 137, // [137:137] is the sub-list for method output_type + 137, // [137:137] is the sub-list for method input_type + 137, // [137:137] is the sub-list for extension type_name + 137, // [137:137] is the sub-list for extension extendee + 0, // [0:137] is the sub-list for field type_name } func init() { file_signalpb_SignalService_proto_init() } @@ -9964,14 +10069,14 @@ func file_signalpb_SignalService_proto_init() { file_signalpb_SignalService_proto_msgTypes[44].OneofWrappers = []any{ (*DataMessage_Payment_Notification_MobileCoin_)(nil), } - file_signalpb_SignalService_proto_msgTypes[68].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[69].OneofWrappers = []any{ (*SyncMessage_OutgoingPayment_MobileCoin_)(nil), } - file_signalpb_SignalService_proto_msgTypes[76].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[77].OneofWrappers = []any{ (*SyncMessage_AttachmentBackfillResponse_Attachments)(nil), (*SyncMessage_AttachmentBackfillResponse_Error_)(nil), } - file_signalpb_SignalService_proto_msgTypes[88].OneofWrappers = []any{ + file_signalpb_SignalService_proto_msgTypes[89].OneofWrappers = []any{ (*SyncMessage_AttachmentBackfillResponse_AttachmentData_Attachment)(nil), (*SyncMessage_AttachmentBackfillResponse_AttachmentData_Status_)(nil), } @@ -9981,7 +10086,7 @@ func file_signalpb_SignalService_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_SignalService_proto_rawDesc), len(file_signalpb_SignalService_proto_rawDesc)), NumEnums: 28, - NumMessages: 92, + NumMessages: 93, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/signalmeow/protobuf/signalpb/SignalService.proto b/pkg/signalmeow/protobuf/signalpb/SignalService.proto index 562f47f..21a3fe5 100644 --- a/pkg/signalmeow/protobuf/signalpb/SignalService.proto +++ b/pkg/signalmeow/protobuf/signalpb/SignalService.proto @@ -319,12 +319,22 @@ message DataMessage { optional bool isProfile = 2; } + message SignalNickname { + optional string given = 1; + optional string family = 2; + } + optional Name name = 1; + reserved 2; repeated Phone number = 3; repeated Email email = 4; repeated PostalAddress address = 5; optional Avatar avatar = 6; optional string organization = 7; + optional bytes aciBinary = 8; // 16-byte UUID + optional SignalNickname nickname = 9; + optional string note = 10; + // Next ID: 11 } message Sticker { @@ -940,7 +950,12 @@ message AttachmentPointer { optional string blurHash = 12; optional uint64 uploadTimestamp = 13; optional uint32 cdnNumber = 14; - // Next ID: 21 + // Waveform for audio attachments. Each byte represents a "bar" in the + // waveform, with 0 as silence 255 as loudest. At most 100 bytes/bars. + optional bytes audioWaveform = 21; + // Duration of an audio attachment, in seconds. + optional float audioDurationSeconds = 22; + // Next ID: 23 } message GroupContextV2 { diff --git a/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go b/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go index 6c8e24b..d412d29 100644 --- a/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go @@ -1159,6 +1159,7 @@ type ContactRecord struct { BlockedAtTimestamp uint64 `protobuf:"varint,27,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // 0 means the blocked time is unknown NotifyForCallsIfMuted OptionalBool `protobuf:"varint,28,opt,name=notifyForCallsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForCallsIfMuted,omitempty"` // If unset, use the default settings ShowUnreadReminders OptionalBool `protobuf:"varint,29,opt,name=showUnreadReminders,proto3,enum=signalservice.OptionalBool" json:"showUnreadReminders,omitempty"` // If unset, use the default settings + SharedName *ContactRecord_Name `protobuf:"bytes,30,opt,name=sharedName,proto3" json:"sharedName,omitempty"` // Name shared from a third party unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1396,6 +1397,13 @@ func (x *ContactRecord) GetShowUnreadReminders() OptionalBool { return OptionalBool_UNSET } +func (x *ContactRecord) GetSharedName() *ContactRecord_Name { + if x != nil { + return x.SharedName + } + return nil +} + type GroupV1Record struct { state protoimpl.MessageState `protogen:"open.v1"` Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -3458,7 +3466,7 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "chatFolder\x18\b \x01(\v2\x1f.signalservice.ChatFolderRecordH\x00R\n" + "chatFolder\x12V\n" + "\x13notificationProfile\x18\t \x01(\v2\".signalservice.NotificationProfileH\x00R\x13notificationProfileB\b\n" + - "\x06record\"\xab\n" + + "\x06record\"\xee\n" + "\n" + "\rContactRecord\x12\x10\n" + "\x03aci\x18\x01 \x01(\tR\x03aci\x12\x12\n" + @@ -3494,7 +3502,10 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\tpniBinary\x18\x1a \x01(\fR\tpniBinary\x12.\n" + "\x12blockedAtTimestamp\x18\x1b \x01(\x04R\x12blockedAtTimestamp\x12Q\n" + "\x15notifyForCallsIfMuted\x18\x1c \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15notifyForCallsIfMuted\x12M\n" + - "\x13showUnreadReminders\x18\x1d \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\x1a4\n" + + "\x13showUnreadReminders\x18\x1d \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\x12A\n" + + "\n" + + "sharedName\x18\x1e \x01(\v2!.signalservice.ContactRecord.NameR\n" + + "sharedName\x1a4\n" + "\x04Name\x12\x14\n" + "\x05given\x18\x01 \x01(\tR\x05given\x12\x16\n" + "\x06family\x18\x02 \x01(\tR\x06family\":\n" + @@ -3828,44 +3839,45 @@ var file_signalpb_StorageService_proto_depIdxs = []int32{ 1, // 15: signalservice.ContactRecord.avatarColor:type_name -> signalservice.AvatarColor 0, // 16: signalservice.ContactRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool 0, // 17: signalservice.ContactRecord.showUnreadReminders:type_name -> signalservice.OptionalBool - 4, // 18: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode - 1, // 19: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor - 0, // 20: signalservice.GroupV2Record.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 21: signalservice.GroupV2Record.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool - 0, // 22: signalservice.GroupV2Record.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool - 0, // 23: signalservice.GroupV2Record.showUnreadReminders:type_name -> signalservice.OptionalBool - 6, // 24: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode - 30, // 25: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation - 20, // 26: signalservice.AccountRecord.payments:type_name -> signalservice.Payments - 0, // 27: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool - 31, // 28: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink - 32, // 29: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData - 1, // 30: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor - 33, // 31: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride - 5, // 32: signalservice.AccountRecord.unreadBadgeType:type_name -> signalservice.AccountRecord.UnreadBadgeType - 0, // 33: signalservice.AccountRecord.includeMutedChatsInBadge:type_name -> signalservice.OptionalBool - 0, // 34: signalservice.AccountRecord.reactionNotifications:type_name -> signalservice.OptionalBool - 0, // 35: signalservice.AccountRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 36: signalservice.AccountRecord.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool - 0, // 37: signalservice.AccountRecord.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool - 0, // 38: signalservice.AccountRecord.showUnreadReminders:type_name -> signalservice.OptionalBool - 0, // 39: signalservice.AccountRecord.notifyWhenContactJoins:type_name -> signalservice.OptionalBool - 37, // 40: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact - 8, // 41: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType - 25, // 42: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient - 25, // 43: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient - 25, // 44: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient - 9, // 45: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek - 2, // 46: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type - 34, // 47: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact - 35, // 48: signalservice.AccountRecord.PinnedConversation.releaseNotes:type_name -> signalservice.AccountRecord.PinnedConversation.ReleaseNotes - 7, // 49: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color - 36, // 50: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled - 51, // [51:51] is the sub-list for method output_type - 51, // [51:51] is the sub-list for method input_type - 51, // [51:51] is the sub-list for extension type_name - 51, // [51:51] is the sub-list for extension extendee - 0, // [0:51] is the sub-list for field type_name + 29, // 18: signalservice.ContactRecord.sharedName:type_name -> signalservice.ContactRecord.Name + 4, // 19: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode + 1, // 20: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor + 0, // 21: signalservice.GroupV2Record.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 22: signalservice.GroupV2Record.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool + 0, // 23: signalservice.GroupV2Record.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool + 0, // 24: signalservice.GroupV2Record.showUnreadReminders:type_name -> signalservice.OptionalBool + 6, // 25: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode + 30, // 26: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation + 20, // 27: signalservice.AccountRecord.payments:type_name -> signalservice.Payments + 0, // 28: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool + 31, // 29: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink + 32, // 30: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData + 1, // 31: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor + 33, // 32: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride + 5, // 33: signalservice.AccountRecord.unreadBadgeType:type_name -> signalservice.AccountRecord.UnreadBadgeType + 0, // 34: signalservice.AccountRecord.includeMutedChatsInBadge:type_name -> signalservice.OptionalBool + 0, // 35: signalservice.AccountRecord.reactionNotifications:type_name -> signalservice.OptionalBool + 0, // 36: signalservice.AccountRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 37: signalservice.AccountRecord.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool + 0, // 38: signalservice.AccountRecord.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool + 0, // 39: signalservice.AccountRecord.showUnreadReminders:type_name -> signalservice.OptionalBool + 0, // 40: signalservice.AccountRecord.notifyWhenContactJoins:type_name -> signalservice.OptionalBool + 37, // 41: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact + 8, // 42: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType + 25, // 43: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient + 25, // 44: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient + 25, // 45: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient + 9, // 46: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek + 2, // 47: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type + 34, // 48: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact + 35, // 49: signalservice.AccountRecord.PinnedConversation.releaseNotes:type_name -> signalservice.AccountRecord.PinnedConversation.ReleaseNotes + 7, // 50: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color + 36, // 51: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled + 52, // [52:52] is the sub-list for method output_type + 52, // [52:52] is the sub-list for method input_type + 52, // [52:52] is the sub-list for extension type_name + 52, // [52:52] is the sub-list for extension extendee + 0, // [0:52] is the sub-list for field type_name } func init() { file_signalpb_StorageService_proto_init() } diff --git a/pkg/signalmeow/protobuf/signalpb/StorageService.proto b/pkg/signalmeow/protobuf/signalpb/StorageService.proto index 4109826..5d6b77f 100644 --- a/pkg/signalmeow/protobuf/signalpb/StorageService.proto +++ b/pkg/signalmeow/protobuf/signalpb/StorageService.proto @@ -146,7 +146,8 @@ message ContactRecord { uint64 blockedAtTimestamp = 27; // 0 means the blocked time is unknown OptionalBool notifyForCallsIfMuted = 28; // If unset, use the default settings OptionalBool showUnreadReminders = 29; // If unset, use the default settings - // Next ID: 30 + Name sharedName = 30; // Name shared from a third party + // Next ID: 31 } message GroupV1Record { diff --git a/pkg/signalmeow/protobuf/update-protos.sh b/pkg/signalmeow/protobuf/update-protos.sh index c1e3c71..0c07e12 100755 --- a/pkg/signalmeow/protobuf/update-protos.sh +++ b/pkg/signalmeow/protobuf/update-protos.sh @@ -2,7 +2,7 @@ cd $(dirname "$0") set -euo pipefail -ANDROID_GIT_REVISION=${1:-46d6eeb2f3d3e12e6938151a8dbd2a33b5604b1f} +ANDROID_GIT_REVISION=${1:-d8d36376f480eb4669efe8bfee94b2c196a9f7bd} update_proto() { case "$1" in From feb07b93a9a261f5b2a707d5e8288e42ae8a21fb Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 1 Oct 2026 18:13:35 +0300 Subject: [PATCH 09/84] signalmeow: use context for attachment download requests --- pkg/signalmeow/web/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/signalmeow/web/web.go b/pkg/signalmeow/web/web.go index c5a0e12..d30e367 100644 --- a/pkg/signalmeow/web/web.go +++ b/pkg/signalmeow/web/web.go @@ -232,7 +232,7 @@ func GetAttachment(ctx context.Context, path string, cdnNumber uint32) (*http.Re } log.Debug().Str("host", host).Msg("getting attachment") urlStr := "https://" + host + path - req, err := http.NewRequest(http.MethodGet, urlStr, nil) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, urlStr, nil) if err != nil { return nil, err } From e131b72209eea4ef8357b3cff69be7229a1df25e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 5 Oct 2026 17:52:08 +0300 Subject: [PATCH 10/84] handle*,signalmeow: add support for blocking DMs --- go.mod | 2 +- go.sum | 4 +- pkg/connector/capabilities.go | 22 +++++++++-- pkg/connector/chatinfo.go | 1 + pkg/connector/handlematrix.go | 67 ++++++++++++++++++++++++++++++++ pkg/connector/handlesignal.go | 57 +++++++++++++++------------ pkg/signalid/dbmeta.go | 2 + pkg/signalmeow/events/message.go | 2 + pkg/signalmeow/receiving.go | 28 ++++++++++++- pkg/signalmeow/sending.go | 18 +++++++++ 10 files changed, 170 insertions(+), 33 deletions(-) diff --git a/go.mod b/go.mod index 87adb6a..5f888c7 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.31.1-0.20260919103532-1f3ae33f3f52 + maunium.net/go/mautrix v0.31.1-0.20261005141226-f14e6b5fc009 ) require ( diff --git a/go.sum b/go.sum index 8b8cbe9..18a799c 100644 --- a/go.sum +++ b/go.sum @@ -113,5 +113,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.31.1-0.20260919103532-1f3ae33f3f52 h1:+BGvyZlokeXN63W5Iog7YCqyFYxUtJ44zUVb3P9ylBo= -maunium.net/go/mautrix v0.31.1-0.20260919103532-1f3ae33f3f52/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= +maunium.net/go/mautrix v0.31.1-0.20261005141226-f14e6b5fc009 h1:PSQyac5CVEVOFRjyXrqFMs9SZByQvi7DrVZZxiG40hg= +maunium.net/go/mautrix v0.31.1-0.20261005141226-f14e6b5fc009/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index 228ac94..03fcf53 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -23,11 +23,13 @@ import ( "go.mau.fi/util/ffmpeg" "go.mau.fi/util/jsontime" "go.mau.fi/util/ptr" - "maunium.net/go/mautrix/bridgev2" "maunium.net/go/mautrix/bridgev2/database" "maunium.net/go/mautrix/bridgev2/networkid" "maunium.net/go/mautrix/event" + + "go.mau.fi/mautrix-signal/pkg/libsignalgo" + "go.mau.fi/mautrix-signal/pkg/signalid" ) func supportedIfFFmpeg() event.CapabilitySupportLevel { @@ -38,7 +40,7 @@ func supportedIfFFmpeg() event.CapabilitySupportLevel { } func capID() string { - base := "fi.mau.signal.capabilities.2026_07_22" + base := "fi.mau.signal.capabilities.2026_10_01" if ffmpeg.Supported() { return base + "+ffmpeg" } @@ -192,6 +194,7 @@ var signalDisappearingCap = &event.DisappearingTimerCapability{ var signalCapsNoteToSelf *event.RoomFeatures var signalCapsDM *event.RoomFeatures +var signalCapsPNIDM *event.RoomFeatures func init() { signalCapsDM = ptr.Clone(signalCaps) @@ -200,7 +203,16 @@ func init() { signalCapsDM.State = event.StateFeatureMap{ event.StateBeeperDisappearingTimer.Type: {Level: event.CapLevelFullySupported}, } + + signalCapsPNIDM = ptr.Clone(signalCapsDM) + signalCapsPNIDM.ID += "+pni" + + signalCapsDM.BlockUser = true + signalCapsDM.ReportSpam = true + signalCapsNoteToSelf = ptr.Clone(signalCapsDM) + signalCapsNoteToSelf.BlockUser = false + signalCapsNoteToSelf.ReportSpam = false signalCapsNoteToSelf.EditMaxAge = nil signalCapsNoteToSelf.DeleteMaxAge = nil signalCapsNoteToSelf.ID = capID() + "+note_to_self" @@ -210,6 +222,10 @@ func (s *SignalClient) GetCapabilities(ctx context.Context, portal *bridgev2.Por if portal.Receiver == s.UserLogin.ID && portal.ID == networkid.PortalID(s.UserLogin.ID) { return signalCapsNoteToSelf } else if portal.RoomType == database.RoomTypeDM { + userID, _, _ := signalid.ParsePortalID(portal.ID) + if userID.Type == libsignalgo.ServiceIDTypePNI { + return signalCapsPNIDM + } return signalCapsDM } return signalCaps @@ -245,5 +261,5 @@ func (s *SignalConnector) GetCapabilities() *bridgev2.NetworkGeneralCapabilities } func (s *SignalConnector) GetBridgeInfoVersion() (info, capabilities int) { - return 1, 11 + return 1, 12 } diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index 0d48c45..11af872 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -480,6 +480,7 @@ func (s *SignalClient) makeCreateDMResponse(ctx context.Context, recipient *type Members: members, Type: ptr.Ptr(database.RoomTypeDM), + UserBlocked: ptr.Ptr(recipient.Blocked), MessageRequest: ptr.Ptr(recipient.ACI != uuid.Nil && recipient.ProbablyMessageRequest()), CanBackfill: backupChat != nil, ExtraUpdates: updatePortalSyncMeta, diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 009943a..1d7b398 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -40,6 +40,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) var ( @@ -56,6 +57,7 @@ var ( _ bridgev2.DeleteChatHandlingNetworkAPI = (*SignalClient)(nil) _ bridgev2.PollHandlingNetworkAPI = (*SignalClient)(nil) _ bridgev2.MessageRequestAcceptingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.UserBlockingNetworkAPI = (*SignalClient)(nil) ) func (s *SignalClient) sendMessage(ctx context.Context, portalID networkid.PortalID, content *signalpb.Content) error { @@ -955,3 +957,68 @@ func (s *SignalClient) HandleMatrixAcceptMessageRequest(ctx context.Context, msg } return nil } + +func (s *SignalClient) HandleMatrixBlockUser(ctx context.Context, msg *bridgev2.MatrixBlockUser) error { + if s.Client == nil { + return bridgev2.ErrNotLoggedIn + } + userID, groupID, err := signalid.ParsePortalID(msg.Portal.ID) + if err != nil { + return err + } + if groupID != "" { + return bridgev2.ErrNonDMBlockUser + } + aci, pni := userID.ToACIAndPNI() + if aci == uuid.Nil { + return fmt.Errorf("blocking requires a known ACI") + } + respType := signalpb.SyncMessage_MessageRequestResponse_ACCEPT + if msg.Content.Block { + respType = signalpb.SyncMessage_MessageRequestResponse_BLOCK + } + if msg.Content.ReportSpam { + if err = s.reportSpam(ctx, msg.Portal, aci); err != nil { + return err + } + if msg.Content.Block { + respType = signalpb.SyncMessage_MessageRequestResponse_BLOCK_AND_SPAM + } else { + respType = signalpb.SyncMessage_MessageRequestResponse_SPAM + } + } + if err = s.syncMessageRequestResponse(ctx, msg.Portal, respType); err != nil { + return err + } + _, err = s.Client.Store.RecipientStore.LoadAndUpdateRecipient(ctx, aci, pni, func(recipient *types.Recipient) (bool, error) { + changed := recipient.Blocked != msg.Content.Block + recipient.Blocked = msg.Content.Block + return changed, nil + }) + return err +} + +func (s *SignalClient) reportSpam(ctx context.Context, portal *bridgev2.Portal, aci uuid.UUID) error { + messages, err := s.Main.Bridge.DB.Message.GetLastNInPortal(ctx, portal.PortalKey, 100) + if err != nil { + return err + } + seen := make(map[string]bool) + for _, message := range messages { + meta := message.Metadata.(*signalid.MessageMetadata) + if message.SenderID != signalid.MakeUserID(aci) || meta.ServerGUID == "" || seen[meta.ServerGUID] { + continue + } + if err = s.Client.ReportSpam(ctx, aci, meta.ServerGUID, meta.ReportingToken); err != nil { + return err + } + seen[meta.ServerGUID] = true + if len(seen) == 3 { + break + } + } + if len(seen) == 0 { + return fmt.Errorf("no received messages with server GUIDs available to report") + } + return nil +} diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index fce7f2c..c92436b 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -341,6 +341,16 @@ func (evt *Bv2ChatEvent) ConvertMessage(ctx context.Context, portal *bridgev2.Po return nil, fmt.Errorf("ConvertMessage() called for non-DataMessage event") } converted := evt.s.Main.MsgConv.ToMatrix(ctx, evt.s.Client, portal, evt.Info.Sender, intent, dataMsg, nil) + for _, part := range converted.Parts { + meta, ok := part.DBMetadata.(*signalid.MessageMetadata) + if !ok { + meta = &signalid.MessageMetadata{} + part.DBMetadata = meta + } + meta.ServerGUID = evt.Info.ServerGUID + meta.ReportingToken = evt.Info.ReportingToken + } + if converted.Disappear.Type != "" { evtTS := evt.GetTimestamp() if !dataMsg.GetIsViewOnce() { @@ -689,8 +699,14 @@ func (s *SignalClient) handleSignalDeleteForMe(evt *events.DeleteForMe) bool { } func (s *SignalClient) handleSignalMessageRequestResponse(evt *events.MessageRequestResponse) bool { - if evt.Type != signalpb.SyncMessage_MessageRequestResponse_ACCEPT { - // TODO do we need to do anything with blocks/deletes here or are they sent as normal delete events? + info := &bridgev2.ChatInfo{} + switch evt.Type { + case signalpb.SyncMessage_MessageRequestResponse_ACCEPT: + info.MessageRequest = ptr.Ptr(false) + info.UserBlocked = ptr.Ptr(false) + case signalpb.SyncMessage_MessageRequestResponse_BLOCK, signalpb.SyncMessage_MessageRequestResponse_BLOCK_AND_SPAM, signalpb.SyncMessage_MessageRequestResponse_BLOCK_AND_DELETE: + info.UserBlocked = ptr.Ptr(true) + default: return true } var portalKey networkid.PortalKey @@ -712,9 +728,7 @@ func (s *SignalClient) handleSignalMessageRequestResponse(evt *events.MessageReq }, }, ChatInfoChange: &bridgev2.ChatInfoChange{ - ChatInfo: &bridgev2.ChatInfo{ - MessageRequest: ptr.Ptr(false), - }, + ChatInfo: info, }, }) return res.Success @@ -774,27 +788,20 @@ func (s *SignalClient) handleSignalContactList(evt *events.ContactList) { if contact.ACI == s.Client.Store.ACI { s.updateRemoteProfile(ctx, true) } - if ptr.Val(contact.Whitelisted) { - portal, err := s.Main.Bridge.GetExistingPortalByKey(ctx, s.makeDMPortalKey(libsignalgo.NewACIServiceID(contact.ACI))) - if err != nil { - log.Err(err).Msg("Failed to get existing portal to update contact info") - continue - } else if portal != nil && portal.MessageRequest { - s.UserLogin.QueueRemoteEvent(&simplevent.ChatInfoChange{ - EventMeta: simplevent.EventMeta{ - Type: bridgev2.RemoteEventChatInfoChange, - LogContext: func(c zerolog.Context) zerolog.Context { - return c.Str("action", "unmark message request").Str("source", "contact list") - }, - PortalKey: portal.PortalKey, - }, - ChatInfoChange: &bridgev2.ChatInfoChange{ - ChatInfo: &bridgev2.ChatInfo{ - MessageRequest: ptr.Ptr(false), - }, - }, - }) + portal, err := s.Main.Bridge.GetExistingPortalByKey(ctx, s.makeDMPortalKey(libsignalgo.NewACIServiceID(contact.ACI))) + if err != nil { + log.Err(err).Msg("Failed to get existing portal to update contact info") + continue + } + if portal != nil && (portal.UserBlocked != contact.Blocked || (portal.MessageRequest && ptr.Val(contact.Whitelisted))) { + info := &bridgev2.ChatInfo{UserBlocked: ptr.Ptr(contact.Blocked)} + if ptr.Val(contact.Whitelisted) { + info.MessageRequest = ptr.Ptr(false) } + s.UserLogin.QueueRemoteEvent(&simplevent.ChatInfoChange{ + EventMeta: simplevent.EventMeta{Type: bridgev2.RemoteEventChatInfoChange, PortalKey: portal.PortalKey}, + ChatInfoChange: &bridgev2.ChatInfoChange{ChatInfo: info}, + }) } } s.UserLogin.Metadata.(*signalid.UserLoginMetadata).LastContactSync = jsontime.UnixMilliNow() diff --git a/pkg/signalid/dbmeta.go b/pkg/signalid/dbmeta.go index 35893c0..4dc3586 100644 --- a/pkg/signalid/dbmeta.go +++ b/pkg/signalid/dbmeta.go @@ -28,6 +28,8 @@ type PortalMetadata struct { } type MessageMetadata struct { + ServerGUID string `json:"server_guid,omitempty"` + ReportingToken []byte `json:"reporting_token,omitempty"` ContainsAttachments bool `json:"contains_attachments,omitempty"` MatrixPollOptionIDs []string `json:"matrix_poll_option_ids,omitempty"` VoteCount map[string]uint32 `json:"vote_count,omitempty"` diff --git a/pkg/signalmeow/events/message.go b/pkg/signalmeow/events/message.go index 475ac02..693470e 100644 --- a/pkg/signalmeow/events/message.go +++ b/pkg/signalmeow/events/message.go @@ -46,6 +46,8 @@ type MessageInfo struct { GroupRevision uint32 ServerTimestamp uint64 + ServerGUID string + ReportingToken []byte } type ChatEvent struct { diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 9773943..8693f2d 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -609,7 +609,7 @@ func (cli *Client) handleDecryptedResult( return nil case *signalpb.Content_DataMessage: handlerSuccess, sendDeliveryReceipt = cli.incomingDataMessage( - ctx, content.DataMessage, theirServiceID.UUID, theirServiceID, envelope.GetServerTimestamp(), isBlocked, + ctx, content.DataMessage, theirServiceID.UUID, theirServiceID, envelope.GetServerTimestamp(), isBlocked, envelope, ) deliveryReceiptTS = content.DataMessage.GetTimestamp() case *signalpb.Content_EditMessage: @@ -764,7 +764,7 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess log.Warn().Msg("sync message sent destination is nil") } else if syncSent.Message != nil { // TODO handle expiration start ts, and maybe the sync message ts? - cli.incomingDataMessage(ctx, syncSent.Message, cli.Store.ACI, syncDestinationServiceID, envelope.GetServerTimestamp(), false) + cli.incomingDataMessage(ctx, syncSent.Message, cli.Store.ACI, syncDestinationServiceID, envelope.GetServerTimestamp(), false, nil) } else if syncSent.EditMessage != nil { cli.incomingEditMessage(ctx, syncSent.EditMessage, cli.Store.ACI, syncDestinationServiceID, envelope.GetServerTimestamp(), false) } @@ -827,6 +827,22 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess log.Err(err).Msg("Failed to clear needs_pni_signature flag after message request accept") } } + responseType := content.MessageRequestResponse.GetType() + if aciUUID != uuid.Nil && (responseType == signalpb.SyncMessage_MessageRequestResponse_ACCEPT || + responseType == signalpb.SyncMessage_MessageRequestResponse_BLOCK || + responseType == signalpb.SyncMessage_MessageRequestResponse_BLOCK_AND_SPAM || + responseType == signalpb.SyncMessage_MessageRequestResponse_BLOCK_AND_DELETE) { + blocked := responseType != signalpb.SyncMessage_MessageRequestResponse_ACCEPT + _, err := cli.Store.RecipientStore.LoadAndUpdateRecipient(ctx, aciUUID, uuid.Nil, func(recipient *types.Recipient) (bool, error) { + changed := recipient.Blocked != blocked + recipient.Blocked = blocked + return changed, nil + }) + if err != nil { + log.Err(err).Msg("Failed to update blocked state from message request response") + return false + } + } var groupID *libsignalgo.GroupIdentifier if len(content.MessageRequestResponse.GroupId) == libsignalgo.GroupIdentifierLength { groupID = (*libsignalgo.GroupIdentifier)(content.MessageRequestResponse.GroupId) @@ -958,6 +974,7 @@ func (cli *Client) incomingDataMessage( chatRecipient libsignalgo.ServiceID, serverTimestamp uint64, isBlocked bool, + envelope *signalpb.Envelope, ) (handlerSuccess, sendDeliveryReceipt bool) { // If there's a profile key, save it if dataMessage.ProfileKey != nil { @@ -994,6 +1011,13 @@ func (cli *Client) incomingDataMessage( GroupRevision: groupRevision, ServerTimestamp: serverTimestamp, } + if envelope != nil { + guid, _ := ParseStringOrBinaryUUID(envelope.GetServerGuid(), envelope.GetServerGuidBinary()) + if guid != uuid.Nil { + evtInfo.ServerGUID = guid.String() + } + evtInfo.ReportingToken = envelope.GetReportSpamToken() + } // Hacky special case for group calls to cache the state if dataMessage.GroupCallUpdate != nil { isRinging := cli.GroupCache.UpdateActiveCall(groupID, dataMessage.GroupCallUpdate.GetEraId()) diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index 8852197..0fd3cc4 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -36,6 +36,8 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/messages" "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" @@ -1171,3 +1173,19 @@ func (cli *Client) handle428(ctx context.Context, recipient libsignalgo.ServiceI //} return fmt.Errorf("got 428 error") } + +func (cli *Client) ReportSpam(ctx context.Context, aci uuid.UUID, serverGUID string, token []byte) error { + if cli.GRPC == nil { + return fmt.Errorf("gRPC client is not connected") + } + guid, err := uuid.Parse(serverGUID) + if err != nil { + return fmt.Errorf("invalid message server GUID: %w", err) + } + _, err = cli.GRPC.Messages.ReportMessage(ctx, &messages.ReportMessageRequest{ + SourceServiceIdentifier: &common.ServiceIdentifier{IdentityType: common.IdentityType_IDENTITY_TYPE_ACI, Uuid: aci[:]}, + MessageGuid: guid[:], + ReportSpamToken: token, + }) + return err +} From e04d4c941e208d2e0f35ba425fc863353f9d7424 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Tue, 6 Oct 2026 10:39:50 +0100 Subject: [PATCH 11/84] signalmeow: reconcile self recipient during provisioning (#673) Co-authored-by: Tulir Asokan --- pkg/signalmeow/provisioning.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index bba1411..8daf641 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -232,13 +232,10 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev device.PNIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, pniPQLastResortPreKey) // Store our profile key - err = device.RecipientStore.StoreRecipient(ctx, &types.Recipient{ - ACI: data.ACI, - PNI: data.PNI, - E164: data.Number, - Profile: types.Profile{ - Key: profileKey, - }, + _, err = device.RecipientStore.LoadAndUpdateRecipient(ctx, data.ACI, data.PNI, func(recipient *types.Recipient) (bool, error) { + recipient.E164 = data.Number + recipient.Profile.Key = profileKey + return true, nil }) if err != nil { c <- ProvisioningResponse{ From 6b4c22586c6e9da05f079f422abe4036223a194e Mon Sep 17 00:00:00 2001 From: Highest <91629626+highesttt@users.noreply.github.com> Date: Tue, 6 Oct 2026 15:24:08 -0400 Subject: [PATCH 12/84] handle*,signalmeow: implement view-once media with new interface (#672) --- pkg/connector/capabilities.go | 6 ++- pkg/connector/client.go | 5 ++- pkg/connector/config.go | 2 - pkg/connector/connector.go | 4 +- pkg/connector/example-config.yaml | 2 - pkg/connector/handlematrix.go | 57 +++++++++++++++++++------- pkg/connector/handlesignal.go | 66 ++++++++++++++++++++++++++++++- pkg/msgconv/from-matrix.go | 13 ++++++ pkg/msgconv/from-signal.go | 64 +++++++++++++++++++++++------- pkg/msgconv/msgconv.go | 9 ++--- pkg/signalid/dbmeta.go | 1 + pkg/signalmeow/events/message.go | 5 +++ pkg/signalmeow/receiving.go | 4 ++ pkg/signalmeow/sending.go | 22 +++++++++-- 14 files changed, 210 insertions(+), 50 deletions(-) diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index 03fcf53..43e7b58 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -40,7 +40,7 @@ func supportedIfFFmpeg() event.CapabilitySupportLevel { } func capID() string { - base := "fi.mau.signal.capabilities.2026_10_01" + base := "fi.mau.signal.capabilities.2026_10_06" if ffmpeg.Supported() { return base + "+ffmpeg" } @@ -83,6 +83,7 @@ var signalCaps = &event.RoomFeatures{ }, MaxWidth: 4096, MaxHeight: 4096, + ViewLimitedTypes: []*event.BeeperViewLimitedMedia{{Type: "count", Count: 1}}, MaxSize: MaxFileSize, Caption: event.CapLevelFullySupported, MaxCaptionLength: MaxTextLength, @@ -93,6 +94,7 @@ var signalCaps = &event.RoomFeatures{ "video/ogg": event.CapLevelFullySupported, "video/webm": event.CapLevelFullySupported, }, + ViewLimitedTypes: []*event.BeeperViewLimitedMedia{{Type: "count", Count: 1}}, MaxSize: MaxFileSize, Caption: event.CapLevelFullySupported, MaxCaptionLength: MaxTextLength, @@ -261,5 +263,5 @@ func (s *SignalConnector) GetCapabilities() *bridgev2.NetworkGeneralCapabilities } func (s *SignalConnector) GetBridgeInfoVersion() (info, capabilities int) { - return 1, 12 + return 1, 13 } diff --git a/pkg/connector/client.go b/pkg/connector/client.go index 723b029..d915576 100644 --- a/pkg/connector/client.go +++ b/pkg/connector/client.go @@ -40,8 +40,9 @@ type SignalClient struct { Client *signalmeow.Client Ghost *bridgev2.Ghost - queueEmptyWaiter *exsync.Event - cancelChatSync atomic.Pointer[context.CancelFunc] + recentMessageRooms *exsync.RingBuffer[networkid.MessageID, networkid.PortalKey] + queueEmptyWaiter *exsync.Event + cancelChatSync atomic.Pointer[context.CancelFunc] } var ( diff --git a/pkg/connector/config.go b/pkg/connector/config.go index 232571f..7795869 100644 --- a/pkg/connector/config.go +++ b/pkg/connector/config.go @@ -41,7 +41,6 @@ type SignalConfig struct { DeviceName string `yaml:"device_name"` NoteToSelfAvatar id.ContentURIString `yaml:"note_to_self_avatar"` LocationFormat string `yaml:"location_format"` - DisappearViewOnce bool `yaml:"disappear_view_once"` ExtEvPolls bool `yaml:"extev_polls"` displaynameTemplate *template.Template `yaml:"-"` @@ -103,7 +102,6 @@ func upgradeConfig(helper up.Helper) { helper.Copy(up.Str, "device_name") helper.Copy(up.Str, "note_to_self_avatar") helper.Copy(up.Str, "location_format") - helper.Copy(up.Bool, "disappear_view_once") helper.Copy(up.Bool, "extev_polls") } diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go index 0343d02..e87fcb0 100644 --- a/pkg/connector/connector.go +++ b/pkg/connector/connector.go @@ -66,7 +66,6 @@ func (s *SignalConnector) Init(bridge *bridgev2.Bridge) { s.Bridge = bridge s.MsgConv = msgconv.NewMessageConverter(bridge) s.MsgConv.LocationFormat = s.Config.LocationFormat - s.MsgConv.DisappearViewOnce = s.Config.DisappearViewOnce s.MsgConv.ExtEvPolls = s.Config.ExtEvPolls bridge.Commands.(*commands.Processor).AddHandlers(CmdDiscardSenderKey) } @@ -117,7 +116,8 @@ func (s *SignalConnector) LoadUserLogin(ctx context.Context, login *bridgev2.Use Main: s, UserLogin: login, - queueEmptyWaiter: exsync.NewEvent(), + recentMessageRooms: exsync.NewRingBuffer[networkid.MessageID, networkid.PortalKey](32), + queueEmptyWaiter: exsync.NewEvent(), } if device != nil { sc.Client = signalmeow.NewClient( diff --git a/pkg/connector/example-config.yaml b/pkg/connector/example-config.yaml index 25fe035..b9b541b 100644 --- a/pkg/connector/example-config.yaml +++ b/pkg/connector/example-config.yaml @@ -22,7 +22,5 @@ note_to_self_avatar: mxc://maunium.net/REBIVrqjZwmaWpssCZpBlmlL # Google Maps: 'https://www.google.com/maps/place/%[1]s,%[2]s' # OpenStreetMap: 'https://www.openstreetmap.org/?mlat=%[1]s&mlon=%[2]s' location_format: 'https://www.google.com/maps/place/%[1]s,%[2]s' -# Should view-once messages disappear shortly after sending a read receipt on Matrix? -disappear_view_once: false # Should polls be sent using unstable MSC3381 event types? extev_polls: false diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 1d7b398..478c5a3 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -44,20 +44,21 @@ import ( ) var ( - _ bridgev2.EditHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.ReactionHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.RedactionHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.ReadReceiptHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.TypingHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.RoomNameHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.RoomAvatarHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.RoomTopicHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.ChatViewingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.DisappearTimerChangingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.DeleteChatHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.PollHandlingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.MessageRequestAcceptingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.UserBlockingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.EditHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.ReactionHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.RedactionHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.ReadReceiptHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.TypingHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.RoomNameHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.RoomAvatarHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.RoomTopicHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.ChatViewingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.DisappearTimerChangingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.DeleteChatHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.PollHandlingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.MessageRequestAcceptingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.UserBlockingNetworkAPI = (*SignalClient)(nil) + _ bridgev2.ViewLimitedMediaHandlingNetworkAPI = (*SignalClient)(nil) ) func (s *SignalClient) sendMessage(ctx context.Context, portalID networkid.PortalID, content *signalpb.Content) error { @@ -94,7 +95,10 @@ func (s *SignalClient) sendMessage(ctx context.Context, portalID networkid.Porta } else { res := s.Client.SendMessage(ctx, userID, content) if !res.WasSuccessful { - return res.Error + if res.Error != nil { + return res.Error + } + return errors.New("failed to send message") } return nil } @@ -123,6 +127,7 @@ func (s *SignalClient) HandleMatrixMessage(ctx context.Context, msg *bridgev2.Ma } return s.doSendMessage(ctx, msg, converted, &signalid.MessageMetadata{ ContainsAttachments: len(converted.Attachments) > 0, + ViewOnce: converted.GetIsViewOnce(), }) } @@ -155,7 +160,29 @@ func (s *SignalClient) doSendMessage( }, nil } +func (s *SignalClient) HandleMatrixViewLimitedMedia(ctx context.Context, msg *bridgev2.MatrixViewLimitedMedia) error { + meta, ok := msg.Message.Metadata.(*signalid.MessageMetadata) + if !ok || !meta.ViewOnce || !meta.ContainsAttachments || msg.Content == nil || *msg.Content != (event.BeeperViewLimitedMedia{Type: "count", Count: 1}) { + return bridgev2.ErrUnsupportedViewLimitedType + } + sender, timestamp, err := signalid.ParseMessageID(msg.Message.ID) + if err != nil { + return err + } + return s.sendMessage(ctx, signalid.MakeDMPortalID(libsignalgo.NewACIServiceID(sender)), &signalpb.Content{ + Content: &signalpb.Content_ReceiptMessage{ + ReceiptMessage: &signalpb.ReceiptMessage{ + Type: signalpb.ReceiptMessage_VIEWED.Enum(), + Timestamp: []uint64{timestamp}, + }, + }, + }) +} + func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.MatrixEdit) error { + if msg.Content.BeeperViewLimited != nil || msg.EditTarget.Metadata.(*signalid.MessageMetadata).ViewOnce { + return fmt.Errorf("%w of view-once media", bridgev2.ErrEditsNotSupported) + } _, targetSentTimestamp, err := signalid.ParseMessageID(msg.EditTarget.ID) if err != nil { return fmt.Errorf("failed to parse target message ID: %w", err) diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index c92436b..d59c5a6 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -47,11 +47,17 @@ import ( func (s *SignalClient) handleSignalEvent(rawEvt events.SignalEvent) bool { switch evt := rawEvt.(type) { case *events.ChatEvent: - return s.Main.Bridge.QueueRemoteEvent(s.UserLogin, &Bv2ChatEvent{ChatEvent: evt, s: s}).Success + wrapped := &Bv2ChatEvent{ChatEvent: evt, s: s} + if msg, ok := evt.Event.(*signalpb.DataMessage); ok && msg.GetIsViewOnce() { + s.recentMessageRooms.Push(wrapped.GetID(), wrapped.GetPortalKey()) + } + return s.Main.Bridge.QueueRemoteEvent(s.UserLogin, wrapped).Success case *events.DecryptionError: return s.Main.Bridge.QueueRemoteEvent(s.UserLogin, s.wrapDecryptionError(evt)).Success case *events.Receipt: return s.handleSignalReceipt(evt) + case *events.ViewOnceOpen: + return s.handleSignalViewOnceOpen(evt) case *events.ReadSelf: return s.handleSignalReadSelf(evt) case *events.DeleteForMe: @@ -175,7 +181,7 @@ func (evt *Bv2ChatEvent) GetType() bridgev2.RemoteEventType { switch innerEvt := evt.Event.(type) { case *signalpb.DataMessage: switch { - case innerEvt.Body != nil, innerEvt.Attachments != nil, innerEvt.Contact != nil, innerEvt.Sticker != nil, + case innerEvt.GetIsViewOnce(), innerEvt.Body != nil, innerEvt.Attachments != nil, innerEvt.Contact != nil, innerEvt.Sticker != nil, innerEvt.Payment != nil, innerEvt.GiftBadge != nil, innerEvt.PollCreate != nil, innerEvt.PollVote != nil, innerEvt.GetRequiredProtocolVersion() > uint32(signalpb.DataMessage_CURRENT), innerEvt.GetFlags()&uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE) != 0: @@ -394,6 +400,14 @@ func (evt *Bv2ChatEvent) ConvertEdit(ctx context.Context, portal *bridgev2.Porta if !ok { return nil, fmt.Errorf("ConvertEdit() called for non-EditMessage event") } + if editMsg.GetDataMessage().GetIsViewOnce() { + return nil, bridgev2.ErrIgnoringRemoteEvent + } + for _, part := range existing { + if part.Metadata.(*signalid.MessageMetadata).ViewOnce { + return nil, fmt.Errorf("%w: edit target is view-once media", bridgev2.ErrIgnoringRemoteEvent) + } + } existing = slices.DeleteFunc(slices.Clone(existing), isEditStub) if len(existing) == 0 { return nil, fmt.Errorf("%w: edit target has already been edited", bridgev2.ErrIgnoringRemoteEvent) @@ -522,6 +536,54 @@ func (s *SignalClient) handleSignalReceipt(evt *events.Receipt) bool { return s.dispatchReceipts(evt.Sender, evt.Content.GetType(), receipts) } +func (s *SignalClient) handleSignalViewOnceOpen(evt *events.ViewOnceOpen) bool { + ctx := s.Main.Bridge.BackgroundCtx + log := s.UserLogin.Log.With(). + Str("action", "handle signal view once open"). + Logger() + ctx = log.WithContext(ctx) + sender, err := signalmeow.ParseStringOrBinaryUUID(evt.GetSenderAci(), evt.GetSenderAciBinary()) + if err != nil { + log.Err(err).Msg("Invalid sender in view-once open sync") + return true + } + messageID := signalid.MakeMessageID(sender, evt.GetTimestamp()) + portalKey, ok := s.recentMessageRooms.Get(messageID) + if !ok { + msg, dbErr := s.Main.Bridge.DB.Message.GetFirstPartByID(ctx, s.UserLogin.ID, messageID) + if dbErr != nil { + log.Err(dbErr).Msg("Failed to get opened view-once message") + return ctx.Err() == nil + } else if msg == nil { + return true + } + portalKey = msg.Room + } + return s.Main.Bridge.QueueRemoteEvent(s.UserLogin, &simplevent.EventMeta{ + Type: bridgev2.RemoteEventUnknown, + PortalKey: portalKey, + PreHandleFunc: func(ctx context.Context, portal *bridgev2.Portal) { + messages, dbErr := s.Main.Bridge.DB.Message.GetAllPartsByID(ctx, s.UserLogin.ID, messageID) + if dbErr != nil { + log.Err(dbErr).Msg("Failed to get opened view-once message") + return + } + for _, msg := range messages { + meta := msg.Metadata.(*signalid.MessageMetadata) + if !meta.ViewOnce || !meta.ContainsAttachments { + continue + } + if addErr := s.Main.Bridge.DisappearLoop.Add(ctx, &database.DisappearingMessage{ + RoomID: portal.MXID, EventID: msg.MXID, Timestamp: msg.Timestamp, + DisappearingSetting: database.DisappearingSetting{Type: "view_limited", DisappearAt: time.Now()}, + }); addErr != nil { + log.Err(addErr).Msg("Failed to queue opened view-once media expiry") + } + } + }, + }).Success +} + func (s *SignalClient) handleSignalReadSelf(evt *events.ReadSelf) bool { log := s.UserLogin.Log.With(). Str("action", "handle signal read self"). diff --git a/pkg/msgconv/from-matrix.go b/pkg/msgconv/from-matrix.go index 3c8f840..c54654c 100644 --- a/pkg/msgconv/from-matrix.go +++ b/pkg/msgconv/from-matrix.go @@ -47,6 +47,12 @@ func (mc *MessageConverter) ToSignal( relaybotFormatted bool, replyTo *database.Message, ) (*signalpb.DataMessage, error) { + if content.BeeperViewLimited != nil && replyTo != nil { + return nil, bridgev2.ErrUnsupportedViewLimitedType + } + if content.BeeperViewLimited != nil && content.FileName != "" && (content.FileName != content.Body || content.Format == event.FormatHTML) { + return nil, bridgev2.ErrCaptionsNotAllowed + } ctx = context.WithValue(ctx, contextKeyClient, client) ctx = context.WithValue(ctx, contextKeyPortal, portal) if evt.Type == event.EventSticker { @@ -139,6 +145,13 @@ func (mc *MessageConverter) ToSignal( default: return nil, fmt.Errorf("%w %s", bridgev2.ErrUnsupportedMessageType, content.MsgType) } + if content.BeeperViewLimited != nil { + dm.IsViewOnce = proto.Bool(true) + dm.RequiredProtocolVersion = proto.Uint32(max(dm.GetRequiredProtocolVersion(), uint32(signalpb.DataMessage_VIEW_ONCE_VIDEO))) + dm.Body = nil + dm.BodyRanges = nil + dm.Preview = nil + } return dm, nil } diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 3ec4fdb..73f4843 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -52,7 +52,7 @@ var ( ) func calculateLength(dm *signalpb.DataMessage) int { - if dm.GetFlags()&uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE) != 0 { + if dm.GetIsViewOnce() || dm.GetFlags()&uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE) != 0 { return 1 } if dm.Sticker != nil || dm.PollVote != nil || dm.PollCreate != nil || dm.PollTerminate != nil { @@ -78,7 +78,6 @@ func CanConvertSignal(dm *signalpb.DataMessage) bool { return calculateLength(dm) > 0 } -const ViewOnceDisappearTimer = 5 * time.Minute const matrixTextMaxLength = 30000 // approximate value to avoid hitting 64 KiB PDU size limit with HTML duplication func (mc *MessageConverter) ToMatrix( @@ -98,6 +97,32 @@ func (mc *MessageConverter) ToMatrix( ThreadRoot: nil, Parts: make([]*bridgev2.ConvertedMessagePart, 0, calculateLength(dm)), } + if dm.GetIsViewOnce() { + var unavailableReason string + if len(dm.GetAttachments()) == 0 || sender == client.Store.ACI || + !time.UnixMilli(int64(dm.GetTimestamp())).Add(45*24*time.Hour).After(time.Now()) { + unavailableReason = "View-once media is no longer available." + } else if len(dm.GetAttachments()) != 1 || dm.Sticker != nil || dm.PollVote != nil || dm.PollCreate != nil || dm.PollTerminate != nil || + len(dm.GetContact()) != 0 || dm.Payment != nil || dm.GiftBadge != nil || dm.GetBody() != "" || len(dm.Preview) != 0 || dm.Quote != nil || dm.GetFlags() != 0 { + unavailableReason = "Invalid view-once media message." + } else { + attachmentMime, _, _ := mime.ParseMediaType(dm.Attachments[0].GetContentType()) + if attachmentMime != "" && !strings.HasPrefix(attachmentMime, "image/") && !strings.HasPrefix(attachmentMime, "video/") { + unavailableReason = "Invalid view-once media message." + } + } + if unavailableReason != "" { + cm.Parts = []*bridgev2.ConvertedMessagePart{{ + Type: event.EventMessage, + DBMetadata: &signalid.MessageMetadata{ViewOnce: true}, + Content: &event.MessageEventContent{ + MsgType: event.MsgNotice, + Body: unavailableReason, + }, + }} + return cm + } + } if dm.GetFlags()&uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE) != 0 { cm.Parts = append(cm.Parts, mc.ConvertDisappearingTimerChangeToMatrix( ctx, dm.GetExpireTimer(), dm.ExpireTimerVersion, time.UnixMilli(int64(dm.GetTimestamp())), attMap != nil, @@ -126,9 +151,24 @@ func (mc *MessageConverter) ToMatrix( cm.Parts = append(cm.Parts, mc.convertPollTerminateToMatrix(ctx, sender, dm.PollTerminate)) return cm } + if dm.GetIsViewOnce() { + cm.Disappear.DisappearAt = time.UnixMilli(int64(dm.GetTimestamp())).Add(45 * 24 * time.Hour) + if cm.Disappear.Timer == 0 { + cm.Disappear.Type = event.DisappearingTypeAfterSend + cm.Disappear.Timer = 45 * 24 * time.Hour + } + } for i, att := range dm.GetAttachments() { if att.GetContentType() != "text/x-signal-plain" || att.GetSize() > matrixTextMaxLength { - cm.Parts = append(cm.Parts, mc.convertAttachmentToMatrix(ctx, i, att, attMap)) + part := mc.convertAttachmentToMatrix(ctx, i, att, attMap) + if dm.GetIsViewOnce() { + if part.Content.MsgType == event.MsgImage || part.Content.MsgType == event.MsgVideo { + part.Content.BeeperViewLimited = &event.BeeperViewLimitedMedia{Type: "count", Count: 1} + } else if part.Content.MsgType != event.MsgNotice { + part.Content = &event.MessageEventContent{MsgType: event.MsgNotice, Body: "Invalid view-once media message."} + } + } + cm.Parts = append(cm.Parts, part) } else { longBody, err := mc.downloadSignalLongText(ctx, att, attMap) if err == nil { @@ -159,23 +199,17 @@ func (mc *MessageConverter) ToMatrix( }, }) } - if dm.GetIsViewOnce() && mc.DisappearViewOnce && (cm.Disappear.Timer == 0 || cm.Disappear.Timer > ViewOnceDisappearTimer) { - cm.Disappear.Type = event.DisappearingTypeAfterRead - cm.Disappear.Timer = ViewOnceDisappearTimer - cm.Parts = append(cm.Parts, &bridgev2.ConvertedMessagePart{ - Type: event.EventMessage, - Content: &event.MessageEventContent{ - MsgType: event.MsgText, - Body: "This is a view-once message. It will disappear in 5 minutes.", - }, - }) - } cm.MergeCaption() for i, part := range cm.Parts { part.ID = signalid.MakeMessagePartID(i) - part.DBMetadata = &signalid.MessageMetadata{ + meta := &signalid.MessageMetadata{ ContainsAttachments: len(dm.GetAttachments()) > 0, + ViewOnce: dm.GetIsViewOnce(), } + if meta.ViewOnce { + meta.ContainsAttachments = part.Content.BeeperViewLimited != nil + } + part.DBMetadata = meta } if dm.Quote != nil { authorACI, err := signalmeow.ParseStringOrBinaryUUID(dm.Quote.GetAuthorAci(), dm.Quote.GetAuthorAciBinary()) diff --git a/pkg/msgconv/msgconv.go b/pkg/msgconv/msgconv.go index e312a1f..03bf621 100644 --- a/pkg/msgconv/msgconv.go +++ b/pkg/msgconv/msgconv.go @@ -44,11 +44,10 @@ type MessageConverter struct { SignalFmtParams *signalfmt.FormatParams MatrixFmtParams *matrixfmt.HTMLParser - MaxFileSize int64 - LocationFormat string - DisappearViewOnce bool - DirectMedia bool - ExtEvPolls bool + MaxFileSize int64 + LocationFormat string + DirectMedia bool + ExtEvPolls bool } func NewMessageConverter(br *bridgev2.Bridge) *MessageConverter { diff --git a/pkg/signalid/dbmeta.go b/pkg/signalid/dbmeta.go index 4dc3586..3a86146 100644 --- a/pkg/signalid/dbmeta.go +++ b/pkg/signalid/dbmeta.go @@ -30,6 +30,7 @@ type PortalMetadata struct { type MessageMetadata struct { ServerGUID string `json:"server_guid,omitempty"` ReportingToken []byte `json:"reporting_token,omitempty"` + ViewOnce bool `json:"view_once,omitempty"` ContainsAttachments bool `json:"contains_attachments,omitempty"` MatrixPollOptionIDs []string `json:"matrix_poll_option_ids,omitempty"` VoteCount map[string]uint32 `json:"vote_count,omitempty"` diff --git a/pkg/signalmeow/events/message.go b/pkg/signalmeow/events/message.go index 693470e..f9d02b5 100644 --- a/pkg/signalmeow/events/message.go +++ b/pkg/signalmeow/events/message.go @@ -31,6 +31,7 @@ type SignalEvent interface { func (*ChatEvent) isSignalEvent() {} func (*DecryptionError) isSignalEvent() {} func (*Receipt) isSignalEvent() {} +func (*ViewOnceOpen) isSignalEvent() {} func (*ReadSelf) isSignalEvent() {} func (*Call) isSignalEvent() {} func (*ContactList) isSignalEvent() {} @@ -66,6 +67,10 @@ type Receipt struct { Content *signalpb.ReceiptMessage } +type ViewOnceOpen struct { + *signalpb.SyncMessage_ViewOnceOpen +} + type ReadSelf struct { Timestamp uint64 Messages []*signalpb.SyncMessage_Read diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 8693f2d..b02c70d 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -809,6 +809,10 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess }) } } + case *signalpb.SyncMessage_ViewOnceOpen_: + handlerSuccess = cli.handleEvent(&events.ViewOnceOpen{ + SyncMessage_ViewOnceOpen: content.ViewOnceOpen, + }) case *signalpb.SyncMessage_DeleteForMe_: handlerSuccess = cli.handleEvent(&events.DeleteForMe{ Timestamp: envelope.GetClientTimestamp(), diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index 0fd3cc4..81e9842 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -312,6 +312,10 @@ func WrapSyncMessage(content *signalpb.SyncMessage) *signalpb.Content { } func syncSentMessage(sent *signalpb.SyncMessage_Sent) *signalpb.Content { + if sent.Message.GetIsViewOnce() { + sent.Message = proto.Clone(sent.Message).(*signalpb.DataMessage) + sent.Message.Attachments = nil + } return WrapSyncMessage(&signalpb.SyncMessage{ Content: &signalpb.SyncMessage_Sent_{ Sent: sent, @@ -386,7 +390,19 @@ func syncMessageFromSoloEditMessage(editMessage *signalpb.EditMessage, result Su } func syncMessageFromReadReceiptMessage(ctx context.Context, receiptMessage *signalpb.ReceiptMessage, messageSender libsignalgo.ServiceID) *signalpb.Content { - if *receiptMessage.Type != signalpb.ReceiptMessage_READ || messageSender.Type != libsignalgo.ServiceIDTypeACI { + if messageSender.Type != libsignalgo.ServiceIDTypeACI { + return nil + } + if receiptMessage.GetType() == signalpb.ReceiptMessage_VIEWED && len(receiptMessage.Timestamp) == 1 { + return WrapSyncMessage(&signalpb.SyncMessage{ + Content: &signalpb.SyncMessage_ViewOnceOpen_{ + ViewOnceOpen: &signalpb.SyncMessage_ViewOnceOpen{ + SenderAciBinary: messageSender.UUID[:], + Timestamp: proto.Uint64(receiptMessage.Timestamp[0]), + }, + }, + }) + } else if receiptMessage.GetType() != signalpb.ReceiptMessage_READ { return nil } read := []*signalpb.SyncMessage_Read{} @@ -755,7 +771,7 @@ func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.Serv if recipientData.ProbablyMessageRequest() && isTypingOrReceipt { zerolog.Ctx(ctx).Debug().Msg("Not sending typing/receipt message to recipient as needs PNI signature flag is set") res := SuccessfulSendResult{Recipient: recipientID} - if content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_READ { + if content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_READ || content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_VIEWED { // Still send sync messages for read receipts cli.sendSyncCopy(ctx, content, messageTimestamp, &res) } @@ -764,7 +780,7 @@ func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.Serv zerolog.Ctx(ctx).Debug().Msg("Not sending typing message as typing indicators are disabled") res := SuccessfulSendResult{Recipient: recipientID} return SendMessageResult{WasSuccessful: true, SuccessfulSendResult: res} - } else if content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_READ && cli.Store.DeviceData.AccountRecord != nil && !cli.Store.DeviceData.AccountRecord.GetReadReceipts() { + } else if (content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_READ || content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_VIEWED) && cli.Store.DeviceData.AccountRecord != nil && !cli.Store.DeviceData.AccountRecord.GetReadReceipts() { zerolog.Ctx(ctx).Debug().Msg("Not sending receipt message as read receipts are disabled") res := SuccessfulSendResult{Recipient: recipientID} // Still send sync messages for read receipts From 241d56187da0a8ece27300d01052ec661f7dfc3b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 15:18:56 +0300 Subject: [PATCH 13/84] signalmeow: update protobufs --- .../protobuf/org/signal/chat/donations.proto | 2 +- .../org/signal/chat/one_time_donations.proto | 20 +- .../signal/chat/product_configuration.proto | 28 +- .../protobuf/org/signal/chat/profile.proto | 63 +- .../org/signal/chat/subscriptions.proto | 18 +- .../rpc/donations/donations_grpc.pb.go | 4 +- .../one_time_donations.pb.go | 222 +++--- .../one_time_donations_grpc.pb.go | 40 +- .../product_configuration.pb.go | 52 +- .../protobuf/rpc/profile/profile.pb.go | 683 ++++++++---------- .../protobuf/rpc/profile/profile_grpc.pb.go | 94 +-- .../rpc/subscriptions/subscriptions.pb.go | 166 ++--- .../subscriptions/subscriptions_grpc.pb.go | 42 +- .../protobuf/signalpb/StorageService.pb.go | 353 ++++++--- .../protobuf/signalpb/StorageService.proto | 17 + pkg/signalmeow/protobuf/update-protos.sh | 2 +- 16 files changed, 927 insertions(+), 879 deletions(-) diff --git a/pkg/signalmeow/protobuf/org/signal/chat/donations.proto b/pkg/signalmeow/protobuf/org/signal/chat/donations.proto index 0ea3022..220514e 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/donations.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/donations.proto @@ -16,7 +16,7 @@ import "org/signal/chat/tag.proto"; service Donations { option (require.auth) = AUTH_ONLY_AUTHENTICATED; - // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials + // Redeem a receipt acquired from Subscriptions.GetReceiptCredential // to add a badge to the account. After successful redemption, profile // responses will include the corresponding badge (if configured as visible) // until the expiration time on the receipt. diff --git a/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto b/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto index de5abcd..6ad57e0 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto @@ -21,7 +21,7 @@ service OneTimeDonations { option (require.auth) = AUTH_ONLY_ANONYMOUS; // Create a Stripe payment intent and return a client secret that can be used to complete the payment. - // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials + // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredential rpc CreateBoost(CreateBoostRequest) returns (CreateBoostResponse) {} // Create a PayPal one-time payment. @@ -41,19 +41,19 @@ service OneTimeDonations { // Obtain a ZK receipt credential for a completed one-time donation payment. // The receipt credential can then be used to redeem the one-time donation entitlement // via Donations.RedeemReceipt - rpc CreateBoostReceiptCredentials(CreateBoostReceiptCredentialsRequest) returns (CreateBoostReceiptCredentialsResponse) {} + rpc CreateBoostReceiptCredential(CreateBoostReceiptCredentialRequest) returns (CreateBoostReceiptCredentialResponse) {} } // The amount is below the minimum for the currency. message AmountBelowMinimumError { - // The minimum amount for the currency - string minimum = 1; + // The minimum amount for the currency in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) + uint64 minimum = 1; } // The SEPA Direct Debit amount exceeds the allowed maximum. message AmountAboveSepaLimitError { - // The maximum amount for a SEPA transaction - string maximum = 1; + // The maximum amount for a SEPA transaction in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) + uint64 maximum = 1; } message CreateBoostRequest { @@ -149,7 +149,7 @@ message ConfirmPayPalBoostResponse { } } -message CreateBoostReceiptCredentialsRequest { +message CreateBoostReceiptCredentialRequest { // a payment ID from the processor string payment_intent_id = 1 [(require.nonEmpty) = true]; // ZK blind-signature receipt credential request bytes @@ -158,12 +158,12 @@ message CreateBoostReceiptCredentialsRequest { PaymentProvider processor = 3 [(require.specified) = true]; } -message CreateBoostReceiptCredentialsResponse { - message CreateBoostReceiptCredentialsResult { +message CreateBoostReceiptCredentialResponse { + message CreateBoostReceiptCredentialResult { bytes receipt_credential_response = 1; } oneof response { - CreateBoostReceiptCredentialsResult result = 1; + CreateBoostReceiptCredentialResult result = 1; // Payment is still processing; client should retry errors.FailedPrecondition payment_still_processing = 2 [(tag.reason) = "payment_still_processing"]; // Payment failed diff --git a/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto b/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto index d3fc60f..8273261 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto @@ -31,29 +31,31 @@ message GetConfigurationResponse { map badge_levels = 2; // Configuration for backup subscription options BackupConfiguration backup = 3; - // Maximum value of a one-time SEPA donation - string sepa_maximum_euros = 4; + // Maximum value of a one-time SEPA donation, in EUR [minor units](https://docs.stripe.com/currencies#minor-units) + uint64 sepa_maximum_euros = 4; // Configuration for one-time Signal Login purchases LoginConfiguration login = 5; } message AmountList { - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - repeated string amounts = 1; + // Amount in the currency's minor unit. Unless otherwise noted, currencies are + // two-decimal: divide by 100 to get the value in the specified currency. + // Some currencies are [zero-decimal](https://docs.stripe.com/currencies#zero-decimal); + // for zero-decimal currencies no multiplication is required. + repeated uint64 amounts = 1; } message CurrencyConfiguration { - // Minimum one-time donation - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - string minimum = 1; + // Minimum one-time donation in the currency's minor unit + uint64 minimum = 1; // Map of one-time donation level IDs to suggested amounts map one_time = 2; - // Map of subscription level IDs to the amount charged - map subscription = 3; - // Map of backup subscription level IDs to the amount charged - map backup_subscription = 4; + // Map of subscription level IDs to the amount charged in the currency's minor + // unit + map subscription = 3; + // Map of backup subscription level IDs to the amount charged in the + // currency's minor unit + map backup_subscription = 4; repeated PaymentMethod supported_payment_methods = 5; } diff --git a/pkg/signalmeow/protobuf/org/signal/chat/profile.proto b/pkg/signalmeow/protobuf/org/signal/chat/profile.proto index 849204c..e79a844 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/profile.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/profile.proto @@ -20,19 +20,19 @@ import "org/signal/chat/tag.proto"; service Profile { option (require.auth) = AUTH_ONLY_AUTHENTICATED; - // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. + // Sets profile data and, if needed, returns a credential used by clients to upload a v1 avatar. rpc SetProfile(SetProfileRequest) returns (SetProfileResponse) {} // Retrieves profile data. Callers with an unidentified access key for the account // should use the version of this method in `ProfileAnonymous` instead. rpc GetProfile(GetProfileRequest) returns (GetProfileResponse) {} - // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous + // Returns an anonymous credential that may be presented with avatar operations in ProfilesAnonymous // // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC - rpc GetAvatarCredentials(GetAvatarCredentialsRequest) returns (GetAvatarCredentialsResponse) {} + rpc GetAvatarCredential(GetAvatarCredentialRequest) returns (GetAvatarCredentialResponse) {} - // Returns credentials used by clients to upload a v1 avatar, deleting any current avatar. + // Returns a credential used by clients to upload a v1 avatar, deleting any current avatar. // // This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads: // 1. SetV1Avatar @@ -57,16 +57,16 @@ service ProfileAnonymous { rpc GetProfile(GetProfileAnonymousRequest) returns (GetProfileAnonymousResponse) {} // Retrieves a profile key credential. - rpc GetExpiringProfileKeyCredential(GetExpiringProfileKeyCredentialAnonymousRequest) returns (GetExpiringProfileKeyCredentialAnonymousResponse) {} + rpc GetProfileKeyCredential(GetProfileKeyCredentialRequest) returns (GetProfileKeyCredentialResponse) {} - // Returns credentials to upload a v2 avatar. After uploading the avatar, the client + // Returns a credential to upload a v2 avatar. After uploading the avatar, the client // must call SetProfile with the new avatar URL in the encrypted `data`. // // Because avatars are uploaded anonymously, they have an expiration equal to the // idle account expiration. Clients must periodically (recommended: every 90 days) // call ExtendAvatarTTL to extend the TTl. // - // Note: any existing avatar associated with these credentials will be deleted immediately + // Note: any existing avatar associated with this credential will be deleted immediately rpc GetAvatarUploadForm(GetAvatarUploadFormRequest) returns (GetAvatarUploadFormResponse) {} // Extends the TTL of the avatar currently associated with the request’s avatar auth credential @@ -189,11 +189,7 @@ message SetProfileResponse { // another device on the account may have created a new version the caller does not know about. errors.FailedPrecondition expected_version_write_conflict = 4 [(tag.reason) = "expected_version_write_conflict"]; - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - ProfilesV2CapabilityRequired profiles_v2_capability_required = 15 [(tag.reason) = "profiles_v2_capability_required"]; - - // next: 4 + // next: 5 } } @@ -336,34 +332,31 @@ message GetProfileAnonymousResponse { // next: 5 } -message GetExpiringProfileKeyCredentialRequest { +message GetProfileKeyCredentialRequest { // The ACI of the account for which to get a profile key credential. common.ServiceIdentifier account_identifier = 1 [(require.present) = true, (require.identityType) = IDENTITY_TYPE_ACI]; - // A zkgroup request for a profile key credential. + // A zkgroup request for a profile key credential for the target’s current profile. bytes credential_request = 2 [(require.nonEmpty) = true]; // The type of credential being requested. CredentialType credential_type = 3 [(require.specified) = true]; - // The profile version for which to generate a profile key credential. - bytes version = 4 [(require.exactlySize) = 32]; -} - -message GetExpiringProfileKeyCredentialAnonymousRequest { - // Contains the data necessary to request an expiring profile key credential. - GetExpiringProfileKeyCredentialRequest request = 1 [(require.present) = true]; // The unidentified access key for the targeted account. - bytes unidentified_access_key = 2 [(require.exactlySize) = 16]; + bytes unidentified_access_key = 4 [(require.exactlySize) = 16]; } -message GetExpiringProfileKeyCredentialResult { +message GetProfileKeyCredentialResult { // A zkgroup credential used by a client to prove that it has the profile key // of a targeted account. bytes profile_key_credential = 1; } -message GetExpiringProfileKeyCredentialAnonymousResponse { +message GetProfileKeyCredentialResponse { oneof response { - GetExpiringProfileKeyCredentialResult result = 1; + GetProfileKeyCredentialResult result = 1; + // Indicates the account was not found or the account's current profile was + // not found. Use `AccountsAnonymous.CheckAccountExistence` for a canonical + // account existence check. errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; + // The provided unidentified access key was incorrect errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; } } @@ -375,13 +368,13 @@ enum CredentialType { // avatar auth -message GetAvatarCredentialsRequest { - bytes avatar_credentials_request = 1; +message GetAvatarCredentialRequest { + bytes avatar_credential_request = 1; } -message GetAvatarCredentialsResponse { +message GetAvatarCredentialResponse { oneof response { - bytes avatar_credentials = 1; + bytes avatar_credential = 1; // the client must call Accounts.SetZkCredentialKey to call this method errors.FailedPrecondition missing_zk_credential_key = 2 [(tag.reason) = "missing_zk_credential_key"]; @@ -389,7 +382,7 @@ message GetAvatarCredentialsResponse { } message GetAvatarUploadFormRequest { - bytes avatar_credentials_presentation = 1; + bytes avatar_credential_presentation = 1; // The length of the attachment for the requested upload form. Uploads // performed with this form will be limited to the provided length. @@ -401,31 +394,31 @@ message GetAvatarUploadFormResponse { // the policy and credential used by clients to upload an avatar to the CDN common.S3UploadForm avatar_upload_form = 1; - errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; + errors.FailedZkAuthentication invalid_credential_presentation = 2 [(tag.reason) = "invalid_credential_presentation"]; } } message ExtendAvatarTTLRequest { - bytes avatar_credentials_presentation = 1; + bytes avatar_credential_presentation = 1; } message ExtendAvatarTTLResponse { oneof response { // The avatar that was extended. May be used as a check against state de-synchronization. string path = 1; - errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; + errors.FailedZkAuthentication invalid_credential_presentation = 2 [(tag.reason) = "invalid_credential_presentation"]; // the identity does not have an active avatar errors.NotFound not_found = 3 [(tag.reason) = "no_active_avatar"]; } } message DeleteAvatarRequest { - bytes avatar_credentials_presentation = 1; + bytes avatar_credential_presentation = 1; } message DeleteAvatarResponse { oneof response { google.protobuf.Empty success = 1; - errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; + errors.FailedZkAuthentication invalid_credential_presentation = 2 [(tag.reason) = "invalid_credential_presentation"]; } } diff --git a/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto b/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto index 4f23c00..c9a270a 100644 --- a/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto +++ b/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto @@ -65,7 +65,7 @@ service Subscriptions { // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same - // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. + // ReceiptCredentialRequest MUST NOT be used again to request a receipt credential. // // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the @@ -75,7 +75,7 @@ service Subscriptions { // cannot be redeemed. // // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. - rpc GetReceiptCredentials(GetReceiptCredentialsRequest) returns (GetReceiptCredentialsResponse) {} + rpc GetReceiptCredential(GetReceiptCredentialRequest) returns (GetReceiptCredentialResponse) {} // Set a token that represents an IAP subscription made with App Store/Google Play Billing. // @@ -84,7 +84,7 @@ service Subscriptions { // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store // directly via StoreKit and obtain a originalTransactionId. // 3. Call this RPC with the originalTransactionId - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the // entitlement // // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. @@ -95,7 +95,7 @@ service Subscriptions { // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) // the purchaseToken. // 3. Call this RPC with the purchaseToken - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the // entitlement // // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling @@ -374,18 +374,18 @@ message SetIapSubscriptionResponse { } } -message GetReceiptCredentialsRequest { +message GetReceiptCredentialRequest { bytes subscriberId = 1 [(require.exactlySize) = 32]; bytes receiptCredentialRequest = 2 [(require.exactlySize) = 97]; } -message GetReceiptCredentialsResponse { - message GetReceiptCredentialsResult { +message GetReceiptCredentialResponse { + message GetReceiptCredentialResult { bytes receiptCredentialResponse = 1; } oneof response { - GetReceiptCredentialsResult success = 1; + GetReceiptCredentialResult success = 1; // The subscriber did not exist or it did not have an associated subscription errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state @@ -415,7 +415,7 @@ message GetSubscriptionInformationResponse { bool cancel_at_period_end = 5; // A three-letter ISO 4217 currency code for currency used in the subscription string currency = 6; - // The amount paid for the subscription in the currency's smallest unit + // The amount paid for the subscription in the currency's minor unit uint64 amount = 7; // The subscription's status, mapped to Stripe's statuses. trialing will never be returned SubscriptionStatus status = 8; diff --git a/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go index 7868dd8..e2479bf 100644 --- a/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go @@ -31,7 +31,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type DonationsClient interface { - // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials + // Redeem a receipt acquired from Subscriptions.GetReceiptCredential // to add a badge to the account. After successful redemption, profile // responses will include the corresponding badge (if configured as visible) // until the expiration time on the receipt. @@ -74,7 +74,7 @@ func (c *donationsClient) CreateDonationPermit(ctx context.Context, in *CreateDo // All implementations must embed UnimplementedDonationsServer // for forward compatibility. type DonationsServer interface { - // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials + // Redeem a receipt acquired from Subscriptions.GetReceiptCredential // to add a badge to the account. After successful redemption, profile // responses will include the corresponding badge (if configured as visible) // until the expiration time on the receipt. diff --git a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go index 507d508..1eec550 100644 --- a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go +++ b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go @@ -32,8 +32,8 @@ const ( // The amount is below the minimum for the currency. type AmountBelowMinimumError struct { state protoimpl.MessageState `protogen:"open.v1"` - // The minimum amount for the currency - Minimum string `protobuf:"bytes,1,opt,name=minimum,proto3" json:"minimum,omitempty"` + // The minimum amount for the currency in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) + Minimum uint64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -68,18 +68,18 @@ func (*AmountBelowMinimumError) Descriptor() ([]byte, []int) { return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{0} } -func (x *AmountBelowMinimumError) GetMinimum() string { +func (x *AmountBelowMinimumError) GetMinimum() uint64 { if x != nil { return x.Minimum } - return "" + return 0 } // The SEPA Direct Debit amount exceeds the allowed maximum. type AmountAboveSepaLimitError struct { state protoimpl.MessageState `protogen:"open.v1"` - // The maximum amount for a SEPA transaction - Maximum string `protobuf:"bytes,1,opt,name=maximum,proto3" json:"maximum,omitempty"` + // The maximum amount for a SEPA transaction in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) + Maximum uint64 `protobuf:"varint,1,opt,name=maximum,proto3" json:"maximum,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -114,11 +114,11 @@ func (*AmountAboveSepaLimitError) Descriptor() ([]byte, []int) { return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{1} } -func (x *AmountAboveSepaLimitError) GetMaximum() string { +func (x *AmountAboveSepaLimitError) GetMaximum() uint64 { if x != nil { return x.Maximum } - return "" + return 0 } type CreateBoostRequest struct { @@ -793,7 +793,7 @@ func (*ConfirmPayPalBoostResponse_UnsupportedLevel) isConfirmPayPalBoostResponse func (*ConfirmPayPalBoostResponse_ChargeFailure) isConfirmPayPalBoostResponse_Response() {} -type CreateBoostReceiptCredentialsRequest struct { +type CreateBoostReceiptCredentialRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // a payment ID from the processor PaymentIntentId string `protobuf:"bytes,1,opt,name=payment_intent_id,json=paymentIntentId,proto3" json:"payment_intent_id,omitempty"` @@ -805,20 +805,20 @@ type CreateBoostReceiptCredentialsRequest struct { sizeCache protoimpl.SizeCache } -func (x *CreateBoostReceiptCredentialsRequest) Reset() { - *x = CreateBoostReceiptCredentialsRequest{} +func (x *CreateBoostReceiptCredentialRequest) Reset() { + *x = CreateBoostReceiptCredentialRequest{} mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *CreateBoostReceiptCredentialsRequest) String() string { +func (x *CreateBoostReceiptCredentialRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateBoostReceiptCredentialsRequest) ProtoMessage() {} +func (*CreateBoostReceiptCredentialRequest) ProtoMessage() {} -func (x *CreateBoostReceiptCredentialsRequest) ProtoReflect() protoreflect.Message { +func (x *CreateBoostReceiptCredentialRequest) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -830,60 +830,60 @@ func (x *CreateBoostReceiptCredentialsRequest) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use CreateBoostReceiptCredentialsRequest.ProtoReflect.Descriptor instead. -func (*CreateBoostReceiptCredentialsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateBoostReceiptCredentialRequest.ProtoReflect.Descriptor instead. +func (*CreateBoostReceiptCredentialRequest) Descriptor() ([]byte, []int) { return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{8} } -func (x *CreateBoostReceiptCredentialsRequest) GetPaymentIntentId() string { +func (x *CreateBoostReceiptCredentialRequest) GetPaymentIntentId() string { if x != nil { return x.PaymentIntentId } return "" } -func (x *CreateBoostReceiptCredentialsRequest) GetReceiptCredentialRequest() []byte { +func (x *CreateBoostReceiptCredentialRequest) GetReceiptCredentialRequest() []byte { if x != nil { return x.ReceiptCredentialRequest } return nil } -func (x *CreateBoostReceiptCredentialsRequest) GetProcessor() subscriptions.PaymentProvider { +func (x *CreateBoostReceiptCredentialRequest) GetProcessor() subscriptions.PaymentProvider { if x != nil { return x.Processor } return subscriptions.PaymentProvider(0) } -type CreateBoostReceiptCredentialsResponse struct { +type CreateBoostReceiptCredentialResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Response: // - // *CreateBoostReceiptCredentialsResponse_Result - // *CreateBoostReceiptCredentialsResponse_PaymentStillProcessing - // *CreateBoostReceiptCredentialsResponse_PaymentRequired - // *CreateBoostReceiptCredentialsResponse_PaymentNotFound - // *CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued - Response isCreateBoostReceiptCredentialsResponse_Response `protobuf_oneof:"response"` + // *CreateBoostReceiptCredentialResponse_Result + // *CreateBoostReceiptCredentialResponse_PaymentStillProcessing + // *CreateBoostReceiptCredentialResponse_PaymentRequired + // *CreateBoostReceiptCredentialResponse_PaymentNotFound + // *CreateBoostReceiptCredentialResponse_ReceiptAlreadyIssued + Response isCreateBoostReceiptCredentialResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *CreateBoostReceiptCredentialsResponse) Reset() { - *x = CreateBoostReceiptCredentialsResponse{} +func (x *CreateBoostReceiptCredentialResponse) Reset() { + *x = CreateBoostReceiptCredentialResponse{} mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *CreateBoostReceiptCredentialsResponse) String() string { +func (x *CreateBoostReceiptCredentialResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateBoostReceiptCredentialsResponse) ProtoMessage() {} +func (*CreateBoostReceiptCredentialResponse) ProtoMessage() {} -func (x *CreateBoostReceiptCredentialsResponse) ProtoReflect() protoreflect.Message { +func (x *CreateBoostReceiptCredentialResponse) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -895,104 +895,104 @@ func (x *CreateBoostReceiptCredentialsResponse) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use CreateBoostReceiptCredentialsResponse.ProtoReflect.Descriptor instead. -func (*CreateBoostReceiptCredentialsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateBoostReceiptCredentialResponse.ProtoReflect.Descriptor instead. +func (*CreateBoostReceiptCredentialResponse) Descriptor() ([]byte, []int) { return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{9} } -func (x *CreateBoostReceiptCredentialsResponse) GetResponse() isCreateBoostReceiptCredentialsResponse_Response { +func (x *CreateBoostReceiptCredentialResponse) GetResponse() isCreateBoostReceiptCredentialResponse_Response { if x != nil { return x.Response } return nil } -func (x *CreateBoostReceiptCredentialsResponse) GetResult() *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult { +func (x *CreateBoostReceiptCredentialResponse) GetResult() *CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult { if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_Result); ok { + if x, ok := x.Response.(*CreateBoostReceiptCredentialResponse_Result); ok { return x.Result } } return nil } -func (x *CreateBoostReceiptCredentialsResponse) GetPaymentStillProcessing() *errors.FailedPrecondition { +func (x *CreateBoostReceiptCredentialResponse) GetPaymentStillProcessing() *errors.FailedPrecondition { if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing); ok { + if x, ok := x.Response.(*CreateBoostReceiptCredentialResponse_PaymentStillProcessing); ok { return x.PaymentStillProcessing } } return nil } -func (x *CreateBoostReceiptCredentialsResponse) GetPaymentRequired() *subscriptions.PaymentRequired { +func (x *CreateBoostReceiptCredentialResponse) GetPaymentRequired() *subscriptions.PaymentRequired { if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentRequired); ok { + if x, ok := x.Response.(*CreateBoostReceiptCredentialResponse_PaymentRequired); ok { return x.PaymentRequired } } return nil } -func (x *CreateBoostReceiptCredentialsResponse) GetPaymentNotFound() *errors.NotFound { +func (x *CreateBoostReceiptCredentialResponse) GetPaymentNotFound() *errors.NotFound { if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentNotFound); ok { + if x, ok := x.Response.(*CreateBoostReceiptCredentialResponse_PaymentNotFound); ok { return x.PaymentNotFound } } return nil } -func (x *CreateBoostReceiptCredentialsResponse) GetReceiptAlreadyIssued() *errors.FailedPrecondition { +func (x *CreateBoostReceiptCredentialResponse) GetReceiptAlreadyIssued() *errors.FailedPrecondition { if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued); ok { + if x, ok := x.Response.(*CreateBoostReceiptCredentialResponse_ReceiptAlreadyIssued); ok { return x.ReceiptAlreadyIssued } } return nil } -type isCreateBoostReceiptCredentialsResponse_Response interface { - isCreateBoostReceiptCredentialsResponse_Response() +type isCreateBoostReceiptCredentialResponse_Response interface { + isCreateBoostReceiptCredentialResponse_Response() } -type CreateBoostReceiptCredentialsResponse_Result struct { - Result *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +type CreateBoostReceiptCredentialResponse_Result struct { + Result *CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` } -type CreateBoostReceiptCredentialsResponse_PaymentStillProcessing struct { +type CreateBoostReceiptCredentialResponse_PaymentStillProcessing struct { // Payment is still processing; client should retry PaymentStillProcessing *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=payment_still_processing,json=paymentStillProcessing,proto3,oneof"` } -type CreateBoostReceiptCredentialsResponse_PaymentRequired struct { +type CreateBoostReceiptCredentialResponse_PaymentRequired struct { // Payment failed PaymentRequired *subscriptions.PaymentRequired `protobuf:"bytes,3,opt,name=payment_required,json=paymentRequired,proto3,oneof"` } -type CreateBoostReceiptCredentialsResponse_PaymentNotFound struct { +type CreateBoostReceiptCredentialResponse_PaymentNotFound struct { // Payment intent not found PaymentNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=payment_not_found,json=paymentNotFound,proto3,oneof"` } -type CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued struct { +type CreateBoostReceiptCredentialResponse_ReceiptAlreadyIssued struct { // A receipt credential was already issued for this payment ReceiptAlreadyIssued *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=receipt_already_issued,json=receiptAlreadyIssued,proto3,oneof"` } -func (*CreateBoostReceiptCredentialsResponse_Result) isCreateBoostReceiptCredentialsResponse_Response() { +func (*CreateBoostReceiptCredentialResponse_Result) isCreateBoostReceiptCredentialResponse_Response() { } -func (*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing) isCreateBoostReceiptCredentialsResponse_Response() { +func (*CreateBoostReceiptCredentialResponse_PaymentStillProcessing) isCreateBoostReceiptCredentialResponse_Response() { } -func (*CreateBoostReceiptCredentialsResponse_PaymentRequired) isCreateBoostReceiptCredentialsResponse_Response() { +func (*CreateBoostReceiptCredentialResponse_PaymentRequired) isCreateBoostReceiptCredentialResponse_Response() { } -func (*CreateBoostReceiptCredentialsResponse_PaymentNotFound) isCreateBoostReceiptCredentialsResponse_Response() { +func (*CreateBoostReceiptCredentialResponse_PaymentNotFound) isCreateBoostReceiptCredentialResponse_Response() { } -func (*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued) isCreateBoostReceiptCredentialsResponse_Response() { +func (*CreateBoostReceiptCredentialResponse_ReceiptAlreadyIssued) isCreateBoostReceiptCredentialResponse_Response() { } type CreatePayPalBoostResponse_CreatePayPalBoostResult struct { @@ -1091,27 +1091,27 @@ func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) GetPaymentId() str return "" } -type CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult struct { +type CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult struct { state protoimpl.MessageState `protogen:"open.v1"` ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receipt_credential_response,json=receiptCredentialResponse,proto3" json:"receipt_credential_response,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) Reset() { - *x = CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult{} +func (x *CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult) Reset() { + *x = CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult{} mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) String() string { +func (x *CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) ProtoMessage() {} +func (*CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult) ProtoMessage() {} -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) ProtoReflect() protoreflect.Message { +func (x *CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1123,12 +1123,12 @@ func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResu return mi.MessageOf(x) } -// Deprecated: Use CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult.ProtoReflect.Descriptor instead. -func (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult.ProtoReflect.Descriptor instead. +func (*CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult) Descriptor() ([]byte, []int) { return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{9, 0} } -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) GetReceiptCredentialResponse() []byte { +func (x *CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult) GetReceiptCredentialResponse() []byte { if x != nil { return x.ReceiptCredentialResponse } @@ -1141,9 +1141,9 @@ const file_org_signal_chat_one_time_donations_proto_rawDesc = "" + "\n" + "(org/signal/chat/one_time_donations.proto\x12\x18org.signal.chat.purchase\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\x1a#org/signal/chat/subscriptions.proto\"3\n" + "\x17AmountBelowMinimumError\x12\x18\n" + - "\aminimum\x18\x01 \x01(\tR\aminimum\"5\n" + + "\aminimum\x18\x01 \x01(\x04R\aminimum\"5\n" + "\x19AmountAboveSepaLimitError\x12\x18\n" + - "\amaximum\x18\x01 \x01(\tR\amaximum\"\xfa\x01\n" + + "\amaximum\x18\x01 \x01(\x04R\amaximum\"\xfa\x01\n" + "\x12CreateBoostRequest\x12!\n" + "\bcurrency\x18\x01 \x01(\tB\x05\xa2\x97\"\x01\x03R\bcurrency\x12\x1e\n" + "\x06amount\x18\x02 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x06amount\x12\x1c\n" + @@ -1197,26 +1197,26 @@ const file_org_signal_chat_one_time_donations_proto_rawDesc = "" + "\n" + "payment_id\x18\x01 \x01(\tR\tpaymentIdB\n" + "\n" + - "\bresponse\"\xeb\x01\n" + - "$CreateBoostReceiptCredentialsRequest\x120\n" + + "\bresponse\"\xea\x01\n" + + "#CreateBoostReceiptCredentialRequest\x120\n" + "\x11payment_intent_id\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x0fpaymentIntentId\x12B\n" + "\x1areceipt_credential_request\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\x18receiptCredentialRequest\x12M\n" + - "\tprocessor\x18\x03 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderB\x04\x90\x97\"\x01R\tprocessor\"\xf5\x05\n" + - "%CreateBoostReceiptCredentialsResponse\x12}\n" + - "\x06result\x18\x01 \x01(\v2c.org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResultH\x00R\x06result\x12\x84\x01\n" + + "\tprocessor\x18\x03 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderB\x04\x90\x97\"\x01R\tprocessor\"\xf1\x05\n" + + "$CreateBoostReceiptCredentialResponse\x12{\n" + + "\x06result\x18\x01 \x01(\v2a.org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.CreateBoostReceiptCredentialResultH\x00R\x06result\x12\x84\x01\n" + "\x18payment_still_processing\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18payment_still_processingH\x00R\x16paymentStillProcessing\x12l\n" + "\x10payment_required\x18\x03 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12e\n" + "\x11payment_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x15\xc2\xd5\"\x11payment_not_foundH\x00R\x0fpaymentNotFound\x12~\n" + - "\x16receipt_already_issued\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1a\xc2\xd5\"\x16receipt_already_issuedH\x00R\x14receiptAlreadyIssued\x1ae\n" + - "#CreateBoostReceiptCredentialsResult\x12>\n" + + "\x16receipt_already_issued\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1a\xc2\xd5\"\x16receipt_already_issuedH\x00R\x14receiptAlreadyIssued\x1ad\n" + + "\"CreateBoostReceiptCredentialResult\x12>\n" + "\x1breceipt_credential_response\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + "\n" + - "\bresponse2\xaf\x04\n" + + "\bresponse2\xac\x04\n" + "\x10OneTimeDonations\x12l\n" + "\vCreateBoost\x12,.org.signal.chat.purchase.CreateBoostRequest\x1a-.org.signal.chat.purchase.CreateBoostResponse\"\x00\x12~\n" + "\x11CreatePayPalBoost\x122.org.signal.chat.purchase.CreatePayPalBoostRequest\x1a3.org.signal.chat.purchase.CreatePayPalBoostResponse\"\x00\x12\x81\x01\n" + - "\x12ConfirmPayPalBoost\x123.org.signal.chat.purchase.ConfirmPayPalBoostRequest\x1a4.org.signal.chat.purchase.ConfirmPayPalBoostResponse\"\x00\x12\xa2\x01\n" + - "\x1dCreateBoostReceiptCredentials\x12>.org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest\x1a?.org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" + "\x12ConfirmPayPalBoost\x123.org.signal.chat.purchase.ConfirmPayPalBoostRequest\x1a4.org.signal.chat.purchase.ConfirmPayPalBoostResponse\"\x00\x12\x9f\x01\n" + + "\x1cCreateBoostReceiptCredential\x12=.org.signal.chat.purchase.CreateBoostReceiptCredentialRequest\x1a>.org.signal.chat.purchase.CreateBoostReceiptCredentialResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" var ( file_org_signal_chat_one_time_donations_proto_rawDescOnce sync.Once @@ -1232,26 +1232,26 @@ func file_org_signal_chat_one_time_donations_proto_rawDescGZIP() []byte { var file_org_signal_chat_one_time_donations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_org_signal_chat_one_time_donations_proto_goTypes = []any{ - (*AmountBelowMinimumError)(nil), // 0: org.signal.chat.purchase.AmountBelowMinimumError - (*AmountAboveSepaLimitError)(nil), // 1: org.signal.chat.purchase.AmountAboveSepaLimitError - (*CreateBoostRequest)(nil), // 2: org.signal.chat.purchase.CreateBoostRequest - (*CreateBoostResponse)(nil), // 3: org.signal.chat.purchase.CreateBoostResponse - (*CreatePayPalBoostRequest)(nil), // 4: org.signal.chat.purchase.CreatePayPalBoostRequest - (*CreatePayPalBoostResponse)(nil), // 5: org.signal.chat.purchase.CreatePayPalBoostResponse - (*ConfirmPayPalBoostRequest)(nil), // 6: org.signal.chat.purchase.ConfirmPayPalBoostRequest - (*ConfirmPayPalBoostResponse)(nil), // 7: org.signal.chat.purchase.ConfirmPayPalBoostResponse - (*CreateBoostReceiptCredentialsRequest)(nil), // 8: org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest - (*CreateBoostReceiptCredentialsResponse)(nil), // 9: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse - (*CreatePayPalBoostResponse_CreatePayPalBoostResult)(nil), // 10: org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResult - (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult)(nil), // 11: org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResult - (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult)(nil), // 12: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResult - (subscriptions.PaymentMethod)(0), // 13: org.signal.chat.purchase.PaymentMethod - (*errors.FailedPrecondition)(nil), // 14: org.signal.chat.errors.FailedPrecondition - (*errors.FailedZkAuthentication)(nil), // 15: org.signal.chat.errors.FailedZkAuthentication - (*subscriptions.ChargeFailure)(nil), // 16: org.signal.chat.purchase.ChargeFailure - (subscriptions.PaymentProvider)(0), // 17: org.signal.chat.purchase.PaymentProvider - (*subscriptions.PaymentRequired)(nil), // 18: org.signal.chat.purchase.PaymentRequired - (*errors.NotFound)(nil), // 19: org.signal.chat.errors.NotFound + (*AmountBelowMinimumError)(nil), // 0: org.signal.chat.purchase.AmountBelowMinimumError + (*AmountAboveSepaLimitError)(nil), // 1: org.signal.chat.purchase.AmountAboveSepaLimitError + (*CreateBoostRequest)(nil), // 2: org.signal.chat.purchase.CreateBoostRequest + (*CreateBoostResponse)(nil), // 3: org.signal.chat.purchase.CreateBoostResponse + (*CreatePayPalBoostRequest)(nil), // 4: org.signal.chat.purchase.CreatePayPalBoostRequest + (*CreatePayPalBoostResponse)(nil), // 5: org.signal.chat.purchase.CreatePayPalBoostResponse + (*ConfirmPayPalBoostRequest)(nil), // 6: org.signal.chat.purchase.ConfirmPayPalBoostRequest + (*ConfirmPayPalBoostResponse)(nil), // 7: org.signal.chat.purchase.ConfirmPayPalBoostResponse + (*CreateBoostReceiptCredentialRequest)(nil), // 8: org.signal.chat.purchase.CreateBoostReceiptCredentialRequest + (*CreateBoostReceiptCredentialResponse)(nil), // 9: org.signal.chat.purchase.CreateBoostReceiptCredentialResponse + (*CreatePayPalBoostResponse_CreatePayPalBoostResult)(nil), // 10: org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResult + (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult)(nil), // 11: org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResult + (*CreateBoostReceiptCredentialResponse_CreateBoostReceiptCredentialResult)(nil), // 12: org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.CreateBoostReceiptCredentialResult + (subscriptions.PaymentMethod)(0), // 13: org.signal.chat.purchase.PaymentMethod + (*errors.FailedPrecondition)(nil), // 14: org.signal.chat.errors.FailedPrecondition + (*errors.FailedZkAuthentication)(nil), // 15: org.signal.chat.errors.FailedZkAuthentication + (*subscriptions.ChargeFailure)(nil), // 16: org.signal.chat.purchase.ChargeFailure + (subscriptions.PaymentProvider)(0), // 17: org.signal.chat.purchase.PaymentProvider + (*subscriptions.PaymentRequired)(nil), // 18: org.signal.chat.purchase.PaymentRequired + (*errors.NotFound)(nil), // 19: org.signal.chat.errors.NotFound } var file_org_signal_chat_one_time_donations_proto_depIdxs = []int32{ 13, // 0: org.signal.chat.purchase.CreateBoostRequest.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod @@ -1270,20 +1270,20 @@ var file_org_signal_chat_one_time_donations_proto_depIdxs = []int32{ 14, // 13: org.signal.chat.purchase.ConfirmPayPalBoostResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition 14, // 14: org.signal.chat.purchase.ConfirmPayPalBoostResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition 16, // 15: org.signal.chat.purchase.ConfirmPayPalBoostResponse.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 17, // 16: org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest.processor:type_name -> org.signal.chat.purchase.PaymentProvider - 12, // 17: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.result:type_name -> org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResult - 14, // 18: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_still_processing:type_name -> org.signal.chat.errors.FailedPrecondition - 18, // 19: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired - 19, // 20: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_not_found:type_name -> org.signal.chat.errors.NotFound - 14, // 21: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.receipt_already_issued:type_name -> org.signal.chat.errors.FailedPrecondition + 17, // 16: org.signal.chat.purchase.CreateBoostReceiptCredentialRequest.processor:type_name -> org.signal.chat.purchase.PaymentProvider + 12, // 17: org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.result:type_name -> org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.CreateBoostReceiptCredentialResult + 14, // 18: org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.payment_still_processing:type_name -> org.signal.chat.errors.FailedPrecondition + 18, // 19: org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired + 19, // 20: org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.payment_not_found:type_name -> org.signal.chat.errors.NotFound + 14, // 21: org.signal.chat.purchase.CreateBoostReceiptCredentialResponse.receipt_already_issued:type_name -> org.signal.chat.errors.FailedPrecondition 2, // 22: org.signal.chat.purchase.OneTimeDonations.CreateBoost:input_type -> org.signal.chat.purchase.CreateBoostRequest 4, // 23: org.signal.chat.purchase.OneTimeDonations.CreatePayPalBoost:input_type -> org.signal.chat.purchase.CreatePayPalBoostRequest 6, // 24: org.signal.chat.purchase.OneTimeDonations.ConfirmPayPalBoost:input_type -> org.signal.chat.purchase.ConfirmPayPalBoostRequest - 8, // 25: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredentials:input_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest + 8, // 25: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredential:input_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialRequest 3, // 26: org.signal.chat.purchase.OneTimeDonations.CreateBoost:output_type -> org.signal.chat.purchase.CreateBoostResponse 5, // 27: org.signal.chat.purchase.OneTimeDonations.CreatePayPalBoost:output_type -> org.signal.chat.purchase.CreatePayPalBoostResponse 7, // 28: org.signal.chat.purchase.OneTimeDonations.ConfirmPayPalBoost:output_type -> org.signal.chat.purchase.ConfirmPayPalBoostResponse - 9, // 29: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredentials:output_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse + 9, // 29: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredential:output_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialResponse 26, // [26:30] is the sub-list for method output_type 22, // [22:26] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name @@ -1319,11 +1319,11 @@ func file_org_signal_chat_one_time_donations_proto_init() { (*ConfirmPayPalBoostResponse_ChargeFailure)(nil), } file_org_signal_chat_one_time_donations_proto_msgTypes[9].OneofWrappers = []any{ - (*CreateBoostReceiptCredentialsResponse_Result)(nil), - (*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing)(nil), - (*CreateBoostReceiptCredentialsResponse_PaymentRequired)(nil), - (*CreateBoostReceiptCredentialsResponse_PaymentNotFound)(nil), - (*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued)(nil), + (*CreateBoostReceiptCredentialResponse_Result)(nil), + (*CreateBoostReceiptCredentialResponse_PaymentStillProcessing)(nil), + (*CreateBoostReceiptCredentialResponse_PaymentRequired)(nil), + (*CreateBoostReceiptCredentialResponse_PaymentNotFound)(nil), + (*CreateBoostReceiptCredentialResponse_ReceiptAlreadyIssued)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go index bbbf7ef..f9c3986 100644 --- a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go @@ -23,10 +23,10 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - OneTimeDonations_CreateBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoost" - OneTimeDonations_CreatePayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreatePayPalBoost" - OneTimeDonations_ConfirmPayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/ConfirmPayPalBoost" - OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoostReceiptCredentials" + OneTimeDonations_CreateBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoost" + OneTimeDonations_CreatePayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreatePayPalBoost" + OneTimeDonations_ConfirmPayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/ConfirmPayPalBoost" + OneTimeDonations_CreateBoostReceiptCredential_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoostReceiptCredential" ) // OneTimeDonationsClient is the client API for OneTimeDonations service. @@ -38,7 +38,7 @@ const ( // Configuration for one-time donations can be found in ProductConfiguration. type OneTimeDonationsClient interface { // Create a Stripe payment intent and return a client secret that can be used to complete the payment. - // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials + // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredential CreateBoost(ctx context.Context, in *CreateBoostRequest, opts ...grpc.CallOption) (*CreateBoostResponse, error) // Create a PayPal one-time payment. // @@ -55,7 +55,7 @@ type OneTimeDonationsClient interface { // Obtain a ZK receipt credential for a completed one-time donation payment. // The receipt credential can then be used to redeem the one-time donation entitlement // via Donations.RedeemReceipt - CreateBoostReceiptCredentials(ctx context.Context, in *CreateBoostReceiptCredentialsRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialsResponse, error) + CreateBoostReceiptCredential(ctx context.Context, in *CreateBoostReceiptCredentialRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialResponse, error) } type oneTimeDonationsClient struct { @@ -96,10 +96,10 @@ func (c *oneTimeDonationsClient) ConfirmPayPalBoost(ctx context.Context, in *Con return out, nil } -func (c *oneTimeDonationsClient) CreateBoostReceiptCredentials(ctx context.Context, in *CreateBoostReceiptCredentialsRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialsResponse, error) { +func (c *oneTimeDonationsClient) CreateBoostReceiptCredential(ctx context.Context, in *CreateBoostReceiptCredentialRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateBoostReceiptCredentialsResponse) - err := c.cc.Invoke(ctx, OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName, in, out, cOpts...) + out := new(CreateBoostReceiptCredentialResponse) + err := c.cc.Invoke(ctx, OneTimeDonations_CreateBoostReceiptCredential_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -115,7 +115,7 @@ func (c *oneTimeDonationsClient) CreateBoostReceiptCredentials(ctx context.Conte // Configuration for one-time donations can be found in ProductConfiguration. type OneTimeDonationsServer interface { // Create a Stripe payment intent and return a client secret that can be used to complete the payment. - // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials + // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredential CreateBoost(context.Context, *CreateBoostRequest) (*CreateBoostResponse, error) // Create a PayPal one-time payment. // @@ -132,7 +132,7 @@ type OneTimeDonationsServer interface { // Obtain a ZK receipt credential for a completed one-time donation payment. // The receipt credential can then be used to redeem the one-time donation entitlement // via Donations.RedeemReceipt - CreateBoostReceiptCredentials(context.Context, *CreateBoostReceiptCredentialsRequest) (*CreateBoostReceiptCredentialsResponse, error) + CreateBoostReceiptCredential(context.Context, *CreateBoostReceiptCredentialRequest) (*CreateBoostReceiptCredentialResponse, error) mustEmbedUnimplementedOneTimeDonationsServer() } @@ -152,8 +152,8 @@ func (UnimplementedOneTimeDonationsServer) CreatePayPalBoost(context.Context, *C func (UnimplementedOneTimeDonationsServer) ConfirmPayPalBoost(context.Context, *ConfirmPayPalBoostRequest) (*ConfirmPayPalBoostResponse, error) { return nil, status.Error(codes.Unimplemented, "method ConfirmPayPalBoost not implemented") } -func (UnimplementedOneTimeDonationsServer) CreateBoostReceiptCredentials(context.Context, *CreateBoostReceiptCredentialsRequest) (*CreateBoostReceiptCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateBoostReceiptCredentials not implemented") +func (UnimplementedOneTimeDonationsServer) CreateBoostReceiptCredential(context.Context, *CreateBoostReceiptCredentialRequest) (*CreateBoostReceiptCredentialResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateBoostReceiptCredential not implemented") } func (UnimplementedOneTimeDonationsServer) mustEmbedUnimplementedOneTimeDonationsServer() {} func (UnimplementedOneTimeDonationsServer) testEmbeddedByValue() {} @@ -230,20 +230,20 @@ func _OneTimeDonations_ConfirmPayPalBoost_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } -func _OneTimeDonations_CreateBoostReceiptCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBoostReceiptCredentialsRequest) +func _OneTimeDonations_CreateBoostReceiptCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBoostReceiptCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OneTimeDonationsServer).CreateBoostReceiptCredentials(ctx, in) + return srv.(OneTimeDonationsServer).CreateBoostReceiptCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName, + FullMethod: OneTimeDonations_CreateBoostReceiptCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OneTimeDonationsServer).CreateBoostReceiptCredentials(ctx, req.(*CreateBoostReceiptCredentialsRequest)) + return srv.(OneTimeDonationsServer).CreateBoostReceiptCredential(ctx, req.(*CreateBoostReceiptCredentialRequest)) } return interceptor(ctx, in, info, handler) } @@ -268,8 +268,8 @@ var OneTimeDonations_ServiceDesc = grpc.ServiceDesc{ Handler: _OneTimeDonations_ConfirmPayPalBoost_Handler, }, { - MethodName: "CreateBoostReceiptCredentials", - Handler: _OneTimeDonations_CreateBoostReceiptCredentials_Handler, + MethodName: "CreateBoostReceiptCredential", + Handler: _OneTimeDonations_CreateBoostReceiptCredential_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go index 0760fe5..04aca75 100644 --- a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go +++ b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go @@ -71,8 +71,8 @@ type GetConfigurationResponse struct { BadgeLevels map[uint64]*LevelConfiguration `protobuf:"bytes,2,rep,name=badge_levels,json=badgeLevels,proto3" json:"badge_levels,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Configuration for backup subscription options Backup *BackupConfiguration `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"` - // Maximum value of a one-time SEPA donation - SepaMaximumEuros string `protobuf:"bytes,4,opt,name=sepa_maximum_euros,json=sepaMaximumEuros,proto3" json:"sepa_maximum_euros,omitempty"` + // Maximum value of a one-time SEPA donation, in EUR [minor units](https://docs.stripe.com/currencies#minor-units) + SepaMaximumEuros uint64 `protobuf:"varint,4,opt,name=sepa_maximum_euros,json=sepaMaximumEuros,proto3" json:"sepa_maximum_euros,omitempty"` // Configuration for one-time Signal Login purchases Login *LoginConfiguration `protobuf:"bytes,5,opt,name=login,proto3" json:"login,omitempty"` unknownFields protoimpl.UnknownFields @@ -130,11 +130,11 @@ func (x *GetConfigurationResponse) GetBackup() *BackupConfiguration { return nil } -func (x *GetConfigurationResponse) GetSepaMaximumEuros() string { +func (x *GetConfigurationResponse) GetSepaMaximumEuros() uint64 { if x != nil { return x.SepaMaximumEuros } - return "" + return 0 } func (x *GetConfigurationResponse) GetLogin() *LoginConfiguration { @@ -146,9 +146,11 @@ func (x *GetConfigurationResponse) GetLogin() *LoginConfiguration { type AmountList struct { state protoimpl.MessageState `protogen:"open.v1"` - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - Amounts []string `protobuf:"bytes,1,rep,name=amounts,proto3" json:"amounts,omitempty"` + // Amount in the currency's minor unit. Unless otherwise noted, currencies are + // two-decimal: divide by 100 to get the value in the specified currency. + // Some currencies are [zero-decimal](https://docs.stripe.com/currencies#zero-decimal); + // for zero-decimal currencies no multiplication is required. + Amounts []uint64 `protobuf:"varint,1,rep,packed,name=amounts,proto3" json:"amounts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -183,7 +185,7 @@ func (*AmountList) Descriptor() ([]byte, []int) { return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{2} } -func (x *AmountList) GetAmounts() []string { +func (x *AmountList) GetAmounts() []uint64 { if x != nil { return x.Amounts } @@ -192,16 +194,16 @@ func (x *AmountList) GetAmounts() []string { type CurrencyConfiguration struct { state protoimpl.MessageState `protogen:"open.v1"` - // Minimum one-time donation - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - Minimum string `protobuf:"bytes,1,opt,name=minimum,proto3" json:"minimum,omitempty"` + // Minimum one-time donation in the currency's minor unit + Minimum uint64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"` // Map of one-time donation level IDs to suggested amounts OneTime map[uint64]*AmountList `protobuf:"bytes,2,rep,name=one_time,json=oneTime,proto3" json:"one_time,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Map of subscription level IDs to the amount charged - Subscription map[uint64]string `protobuf:"bytes,3,rep,name=subscription,proto3" json:"subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Map of backup subscription level IDs to the amount charged - BackupSubscription map[uint64]string `protobuf:"bytes,4,rep,name=backup_subscription,json=backupSubscription,proto3" json:"backup_subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Map of subscription level IDs to the amount charged in the currency's minor + // unit + Subscription map[uint64]uint64 `protobuf:"bytes,3,rep,name=subscription,proto3" json:"subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + // Map of backup subscription level IDs to the amount charged in the + // currency's minor unit + BackupSubscription map[uint64]uint64 `protobuf:"bytes,4,rep,name=backup_subscription,json=backupSubscription,proto3" json:"backup_subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` SupportedPaymentMethods []subscriptions.PaymentMethod `protobuf:"varint,5,rep,packed,name=supported_payment_methods,json=supportedPaymentMethods,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"supported_payment_methods,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -237,11 +239,11 @@ func (*CurrencyConfiguration) Descriptor() ([]byte, []int) { return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{3} } -func (x *CurrencyConfiguration) GetMinimum() string { +func (x *CurrencyConfiguration) GetMinimum() uint64 { if x != nil { return x.Minimum } - return "" + return 0 } func (x *CurrencyConfiguration) GetOneTime() map[uint64]*AmountList { @@ -251,14 +253,14 @@ func (x *CurrencyConfiguration) GetOneTime() map[uint64]*AmountList { return nil } -func (x *CurrencyConfiguration) GetSubscription() map[uint64]string { +func (x *CurrencyConfiguration) GetSubscription() map[uint64]uint64 { if x != nil { return x.Subscription } return nil } -func (x *CurrencyConfiguration) GetBackupSubscription() map[uint64]string { +func (x *CurrencyConfiguration) GetBackupSubscription() map[uint64]uint64 { if x != nil { return x.BackupSubscription } @@ -531,7 +533,7 @@ const file_org_signal_chat_product_configuration_proto_rawDesc = "" + "currencies\x12f\n" + "\fbadge_levels\x18\x02 \x03(\v2C.org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntryR\vbadgeLevels\x12E\n" + "\x06backup\x18\x03 \x01(\v2-.org.signal.chat.purchase.BackupConfigurationR\x06backup\x12,\n" + - "\x12sepa_maximum_euros\x18\x04 \x01(\tR\x10sepaMaximumEuros\x12B\n" + + "\x12sepa_maximum_euros\x18\x04 \x01(\x04R\x10sepaMaximumEuros\x12B\n" + "\x05login\x18\x05 \x01(\v2,.org.signal.chat.purchase.LoginConfigurationR\x05login\x1an\n" + "\x0fCurrenciesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12E\n" + @@ -541,9 +543,9 @@ const file_org_signal_chat_product_configuration_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\v2,.org.signal.chat.purchase.LevelConfigurationR\x05value:\x028\x01\"&\n" + "\n" + "AmountList\x12\x18\n" + - "\aamounts\x18\x01 \x03(\tR\aamounts\"\xba\x05\n" + + "\aamounts\x18\x01 \x03(\x04R\aamounts\"\xba\x05\n" + "\x15CurrencyConfiguration\x12\x18\n" + - "\aminimum\x18\x01 \x01(\tR\aminimum\x12W\n" + + "\aminimum\x18\x01 \x01(\x04R\aminimum\x12W\n" + "\bone_time\x18\x02 \x03(\v2<.org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntryR\aoneTime\x12e\n" + "\fsubscription\x18\x03 \x03(\v2A.org.signal.chat.purchase.CurrencyConfiguration.SubscriptionEntryR\fsubscription\x12x\n" + "\x13backup_subscription\x18\x04 \x03(\v2G.org.signal.chat.purchase.CurrencyConfiguration.BackupSubscriptionEntryR\x12backupSubscription\x12c\n" + @@ -553,10 +555,10 @@ const file_org_signal_chat_product_configuration_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\v2$.org.signal.chat.purchase.AmountListR\x05value:\x028\x01\x1a?\n" + "\x11SubscriptionEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aE\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\x1aE\n" + "\x17BackupSubscriptionEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x85\x01\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\"\x85\x01\n" + "\x12LevelConfiguration\x12\x19\n" + "\bbadge_id\x18\x01 \x01(\tR\abadgeId\x129\n" + "\x16badge_duration_seconds\x18\x02 \x01(\x04H\x00R\x14badgeDurationSeconds\x88\x01\x01B\x19\n" + diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go index ac22050..054b348 100644 --- a/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go +++ b/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go @@ -558,7 +558,6 @@ type SetProfileResponse struct { // *SetProfileResponse_ExpectedDataWriteConflict // *SetProfileResponse_PaymentsForbiddenInRegion // *SetProfileResponse_ExpectedVersionWriteConflict - // *SetProfileResponse_ProfilesV2CapabilityRequired Response isSetProfileResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -637,15 +636,6 @@ func (x *SetProfileResponse) GetExpectedVersionWriteConflict() *errors.FailedPre return nil } -func (x *SetProfileResponse) GetProfilesV2CapabilityRequired() *ProfilesV2CapabilityRequired { - if x != nil { - if x, ok := x.Response.(*SetProfileResponse_ProfilesV2CapabilityRequired); ok { - return x.ProfilesV2CapabilityRequired - } - } - return nil -} - type isSetProfileResponse_Response interface { isSetProfileResponse_Response() } @@ -673,12 +663,6 @@ type SetProfileResponse_ExpectedVersionWriteConflict struct { ExpectedVersionWriteConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=expected_version_write_conflict,json=expectedVersionWriteConflict,proto3,oneof"` } -type SetProfileResponse_ProfilesV2CapabilityRequired struct { - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - ProfilesV2CapabilityRequired *ProfilesV2CapabilityRequired `protobuf:"bytes,15,opt,name=profiles_v2_capability_required,json=profilesV2CapabilityRequired,proto3,oneof"` -} - func (*SetProfileResponse_Result) isSetProfileResponse_Response() {} func (*SetProfileResponse_ExpectedDataWriteConflict) isSetProfileResponse_Response() {} @@ -687,8 +671,6 @@ func (*SetProfileResponse_PaymentsForbiddenInRegion) isSetProfileResponse_Respon func (*SetProfileResponse_ExpectedVersionWriteConflict) isSetProfileResponse_Response() {} -func (*SetProfileResponse_ProfilesV2CapabilityRequired) isSetProfileResponse_Response() {} - type GetProfileRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // The ACI of the account for which to get profile data. @@ -1379,34 +1361,34 @@ func (*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization) isGetProfile func (*GetProfileAnonymousResponse_ProfileV1) isGetProfileAnonymousResponse_Response() {} -type GetExpiringProfileKeyCredentialRequest struct { +type GetProfileKeyCredentialRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // The ACI of the account for which to get a profile key credential. AccountIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=account_identifier,json=accountIdentifier,proto3" json:"account_identifier,omitempty"` - // A zkgroup request for a profile key credential. + // A zkgroup request for a profile key credential for the target’s current profile. CredentialRequest []byte `protobuf:"bytes,2,opt,name=credential_request,json=credentialRequest,proto3" json:"credential_request,omitempty"` // The type of credential being requested. CredentialType CredentialType `protobuf:"varint,3,opt,name=credential_type,json=credentialType,proto3,enum=org.signal.chat.profile.CredentialType" json:"credential_type,omitempty"` - // The profile version for which to generate a profile key credential. - Version []byte `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // The unidentified access key for the targeted account. + UnidentifiedAccessKey []byte `protobuf:"bytes,4,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3" json:"unidentified_access_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetExpiringProfileKeyCredentialRequest) Reset() { - *x = GetExpiringProfileKeyCredentialRequest{} +func (x *GetProfileKeyCredentialRequest) Reset() { + *x = GetProfileKeyCredentialRequest{} mi := &file_org_signal_chat_profile_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetExpiringProfileKeyCredentialRequest) String() string { +func (x *GetProfileKeyCredentialRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetExpiringProfileKeyCredentialRequest) ProtoMessage() {} +func (*GetProfileKeyCredentialRequest) ProtoMessage() {} -func (x *GetExpiringProfileKeyCredentialRequest) ProtoReflect() protoreflect.Message { +func (x *GetProfileKeyCredentialRequest) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_profile_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1418,94 +1400,40 @@ func (x *GetExpiringProfileKeyCredentialRequest) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use GetExpiringProfileKeyCredentialRequest.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileKeyCredentialRequest.ProtoReflect.Descriptor instead. +func (*GetProfileKeyCredentialRequest) Descriptor() ([]byte, []int) { return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{15} } -func (x *GetExpiringProfileKeyCredentialRequest) GetAccountIdentifier() *common.ServiceIdentifier { +func (x *GetProfileKeyCredentialRequest) GetAccountIdentifier() *common.ServiceIdentifier { if x != nil { return x.AccountIdentifier } return nil } -func (x *GetExpiringProfileKeyCredentialRequest) GetCredentialRequest() []byte { +func (x *GetProfileKeyCredentialRequest) GetCredentialRequest() []byte { if x != nil { return x.CredentialRequest } return nil } -func (x *GetExpiringProfileKeyCredentialRequest) GetCredentialType() CredentialType { +func (x *GetProfileKeyCredentialRequest) GetCredentialType() CredentialType { if x != nil { return x.CredentialType } return CredentialType_CREDENTIAL_TYPE_UNSPECIFIED } -func (x *GetExpiringProfileKeyCredentialRequest) GetVersion() []byte { - if x != nil { - return x.Version - } - return nil -} - -type GetExpiringProfileKeyCredentialAnonymousRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Contains the data necessary to request an expiring profile key credential. - Request *GetExpiringProfileKeyCredentialRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - // The unidentified access key for the targeted account. - UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3" json:"unidentified_access_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) Reset() { - *x = GetExpiringProfileKeyCredentialAnonymousRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExpiringProfileKeyCredentialAnonymousRequest) ProtoMessage() {} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetExpiringProfileKeyCredentialAnonymousRequest.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialAnonymousRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{16} -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) GetRequest() *GetExpiringProfileKeyCredentialRequest { - if x != nil { - return x.Request - } - return nil -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) GetUnidentifiedAccessKey() []byte { +func (x *GetProfileKeyCredentialRequest) GetUnidentifiedAccessKey() []byte { if x != nil { return x.UnidentifiedAccessKey } return nil } -type GetExpiringProfileKeyCredentialResult struct { +type GetProfileKeyCredentialResult struct { state protoimpl.MessageState `protogen:"open.v1"` // A zkgroup credential used by a client to prove that it has the profile key // of a targeted account. @@ -1514,21 +1442,21 @@ type GetExpiringProfileKeyCredentialResult struct { sizeCache protoimpl.SizeCache } -func (x *GetExpiringProfileKeyCredentialResult) Reset() { - *x = GetExpiringProfileKeyCredentialResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[17] +func (x *GetProfileKeyCredentialResult) Reset() { + *x = GetProfileKeyCredentialResult{} + mi := &file_org_signal_chat_profile_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetExpiringProfileKeyCredentialResult) String() string { +func (x *GetProfileKeyCredentialResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetExpiringProfileKeyCredentialResult) ProtoMessage() {} +func (*GetProfileKeyCredentialResult) ProtoMessage() {} -func (x *GetExpiringProfileKeyCredentialResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[17] +func (x *GetProfileKeyCredentialResult) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1539,45 +1467,45 @@ func (x *GetExpiringProfileKeyCredentialResult) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use GetExpiringProfileKeyCredentialResult.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{17} +// Deprecated: Use GetProfileKeyCredentialResult.ProtoReflect.Descriptor instead. +func (*GetProfileKeyCredentialResult) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{16} } -func (x *GetExpiringProfileKeyCredentialResult) GetProfileKeyCredential() []byte { +func (x *GetProfileKeyCredentialResult) GetProfileKeyCredential() []byte { if x != nil { return x.ProfileKeyCredential } return nil } -type GetExpiringProfileKeyCredentialAnonymousResponse struct { +type GetProfileKeyCredentialResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Response: // - // *GetExpiringProfileKeyCredentialAnonymousResponse_Result - // *GetExpiringProfileKeyCredentialAnonymousResponse_NotFound - // *GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization - Response isGetExpiringProfileKeyCredentialAnonymousResponse_Response `protobuf_oneof:"response"` + // *GetProfileKeyCredentialResponse_Result + // *GetProfileKeyCredentialResponse_NotFound + // *GetProfileKeyCredentialResponse_FailedUnidentifiedAuthorization + Response isGetProfileKeyCredentialResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) Reset() { - *x = GetExpiringProfileKeyCredentialAnonymousResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[18] +func (x *GetProfileKeyCredentialResponse) Reset() { + *x = GetProfileKeyCredentialResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) String() string { +func (x *GetProfileKeyCredentialResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetExpiringProfileKeyCredentialAnonymousResponse) ProtoMessage() {} +func (*GetProfileKeyCredentialResponse) ProtoMessage() {} -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[18] +func (x *GetProfileKeyCredentialResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1588,92 +1516,94 @@ func (x *GetExpiringProfileKeyCredentialAnonymousResponse) ProtoReflect() protor return mi.MessageOf(x) } -// Deprecated: Use GetExpiringProfileKeyCredentialAnonymousResponse.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialAnonymousResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{18} +// Deprecated: Use GetProfileKeyCredentialResponse.ProtoReflect.Descriptor instead. +func (*GetProfileKeyCredentialResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{17} } -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetResponse() isGetExpiringProfileKeyCredentialAnonymousResponse_Response { +func (x *GetProfileKeyCredentialResponse) GetResponse() isGetProfileKeyCredentialResponse_Response { if x != nil { return x.Response } return nil } -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetResult() *GetExpiringProfileKeyCredentialResult { +func (x *GetProfileKeyCredentialResponse) GetResult() *GetProfileKeyCredentialResult { if x != nil { - if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_Result); ok { + if x, ok := x.Response.(*GetProfileKeyCredentialResponse_Result); ok { return x.Result } } return nil } -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetNotFound() *errors.NotFound { +func (x *GetProfileKeyCredentialResponse) GetNotFound() *errors.NotFound { if x != nil { - if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound); ok { + if x, ok := x.Response.(*GetProfileKeyCredentialResponse_NotFound); ok { return x.NotFound } } return nil } -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { +func (x *GetProfileKeyCredentialResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { if x != nil { - if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization); ok { + if x, ok := x.Response.(*GetProfileKeyCredentialResponse_FailedUnidentifiedAuthorization); ok { return x.FailedUnidentifiedAuthorization } } return nil } -type isGetExpiringProfileKeyCredentialAnonymousResponse_Response interface { - isGetExpiringProfileKeyCredentialAnonymousResponse_Response() +type isGetProfileKeyCredentialResponse_Response interface { + isGetProfileKeyCredentialResponse_Response() } -type GetExpiringProfileKeyCredentialAnonymousResponse_Result struct { - Result *GetExpiringProfileKeyCredentialResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +type GetProfileKeyCredentialResponse_Result struct { + Result *GetProfileKeyCredentialResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` } -type GetExpiringProfileKeyCredentialAnonymousResponse_NotFound struct { +type GetProfileKeyCredentialResponse_NotFound struct { + // Indicates the account was not found or the account's current profile was + // not found. Use `AccountsAnonymous.CheckAccountExistence` for a canonical + // account existence check. NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` } -type GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization struct { +type GetProfileKeyCredentialResponse_FailedUnidentifiedAuthorization struct { + // The provided unidentified access key was incorrect FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` } -func (*GetExpiringProfileKeyCredentialAnonymousResponse_Result) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { +func (*GetProfileKeyCredentialResponse_Result) isGetProfileKeyCredentialResponse_Response() {} + +func (*GetProfileKeyCredentialResponse_NotFound) isGetProfileKeyCredentialResponse_Response() {} + +func (*GetProfileKeyCredentialResponse_FailedUnidentifiedAuthorization) isGetProfileKeyCredentialResponse_Response() { } -func (*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { +type GetAvatarCredentialRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialRequest []byte `protobuf:"bytes,1,opt,name=avatar_credential_request,json=avatarCredentialRequest,proto3" json:"avatar_credential_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { -} - -type GetAvatarCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsRequest []byte `protobuf:"bytes,1,opt,name=avatar_credentials_request,json=avatarCredentialsRequest,proto3" json:"avatar_credentials_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAvatarCredentialsRequest) Reset() { - *x = GetAvatarCredentialsRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[19] +func (x *GetAvatarCredentialRequest) Reset() { + *x = GetAvatarCredentialRequest{} + mi := &file_org_signal_chat_profile_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAvatarCredentialsRequest) String() string { +func (x *GetAvatarCredentialRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAvatarCredentialsRequest) ProtoMessage() {} +func (*GetAvatarCredentialRequest) ProtoMessage() {} -func (x *GetAvatarCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[19] +func (x *GetAvatarCredentialRequest) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1684,44 +1614,44 @@ func (x *GetAvatarCredentialsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAvatarCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetAvatarCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{19} +// Deprecated: Use GetAvatarCredentialRequest.ProtoReflect.Descriptor instead. +func (*GetAvatarCredentialRequest) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{18} } -func (x *GetAvatarCredentialsRequest) GetAvatarCredentialsRequest() []byte { +func (x *GetAvatarCredentialRequest) GetAvatarCredentialRequest() []byte { if x != nil { - return x.AvatarCredentialsRequest + return x.AvatarCredentialRequest } return nil } -type GetAvatarCredentialsResponse struct { +type GetAvatarCredentialResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Response: // - // *GetAvatarCredentialsResponse_AvatarCredentials - // *GetAvatarCredentialsResponse_MissingZkCredentialKey - Response isGetAvatarCredentialsResponse_Response `protobuf_oneof:"response"` + // *GetAvatarCredentialResponse_AvatarCredential + // *GetAvatarCredentialResponse_MissingZkCredentialKey + Response isGetAvatarCredentialResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetAvatarCredentialsResponse) Reset() { - *x = GetAvatarCredentialsResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[20] +func (x *GetAvatarCredentialResponse) Reset() { + *x = GetAvatarCredentialResponse{} + mi := &file_org_signal_chat_profile_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAvatarCredentialsResponse) String() string { +func (x *GetAvatarCredentialResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAvatarCredentialsResponse) ProtoMessage() {} +func (*GetAvatarCredentialResponse) ProtoMessage() {} -func (x *GetAvatarCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[20] +func (x *GetAvatarCredentialResponse) ProtoReflect() protoreflect.Message { + mi := &file_org_signal_chat_profile_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1732,57 +1662,56 @@ func (x *GetAvatarCredentialsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAvatarCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetAvatarCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{20} +// Deprecated: Use GetAvatarCredentialResponse.ProtoReflect.Descriptor instead. +func (*GetAvatarCredentialResponse) Descriptor() ([]byte, []int) { + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{19} } -func (x *GetAvatarCredentialsResponse) GetResponse() isGetAvatarCredentialsResponse_Response { +func (x *GetAvatarCredentialResponse) GetResponse() isGetAvatarCredentialResponse_Response { if x != nil { return x.Response } return nil } -func (x *GetAvatarCredentialsResponse) GetAvatarCredentials() []byte { +func (x *GetAvatarCredentialResponse) GetAvatarCredential() []byte { if x != nil { - if x, ok := x.Response.(*GetAvatarCredentialsResponse_AvatarCredentials); ok { - return x.AvatarCredentials + if x, ok := x.Response.(*GetAvatarCredentialResponse_AvatarCredential); ok { + return x.AvatarCredential } } return nil } -func (x *GetAvatarCredentialsResponse) GetMissingZkCredentialKey() *errors.FailedPrecondition { +func (x *GetAvatarCredentialResponse) GetMissingZkCredentialKey() *errors.FailedPrecondition { if x != nil { - if x, ok := x.Response.(*GetAvatarCredentialsResponse_MissingZkCredentialKey); ok { + if x, ok := x.Response.(*GetAvatarCredentialResponse_MissingZkCredentialKey); ok { return x.MissingZkCredentialKey } } return nil } -type isGetAvatarCredentialsResponse_Response interface { - isGetAvatarCredentialsResponse_Response() +type isGetAvatarCredentialResponse_Response interface { + isGetAvatarCredentialResponse_Response() } -type GetAvatarCredentialsResponse_AvatarCredentials struct { - AvatarCredentials []byte `protobuf:"bytes,1,opt,name=avatar_credentials,json=avatarCredentials,proto3,oneof"` +type GetAvatarCredentialResponse_AvatarCredential struct { + AvatarCredential []byte `protobuf:"bytes,1,opt,name=avatar_credential,json=avatarCredential,proto3,oneof"` } -type GetAvatarCredentialsResponse_MissingZkCredentialKey struct { +type GetAvatarCredentialResponse_MissingZkCredentialKey struct { // the client must call Accounts.SetZkCredentialKey to call this method MissingZkCredentialKey *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=missing_zk_credential_key,json=missingZkCredentialKey,proto3,oneof"` } -func (*GetAvatarCredentialsResponse_AvatarCredentials) isGetAvatarCredentialsResponse_Response() {} +func (*GetAvatarCredentialResponse_AvatarCredential) isGetAvatarCredentialResponse_Response() {} -func (*GetAvatarCredentialsResponse_MissingZkCredentialKey) isGetAvatarCredentialsResponse_Response() { -} +func (*GetAvatarCredentialResponse_MissingZkCredentialKey) isGetAvatarCredentialResponse_Response() {} type GetAvatarUploadFormRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credential_presentation,json=avatarCredentialPresentation,proto3" json:"avatar_credential_presentation,omitempty"` // The length of the attachment for the requested upload form. Uploads // performed with this form will be limited to the provided length. UploadLength uint32 `protobuf:"varint,2,opt,name=upload_length,json=uploadLength,proto3" json:"upload_length,omitempty"` @@ -1792,7 +1721,7 @@ type GetAvatarUploadFormRequest struct { func (x *GetAvatarUploadFormRequest) Reset() { *x = GetAvatarUploadFormRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[21] + mi := &file_org_signal_chat_profile_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1804,7 +1733,7 @@ func (x *GetAvatarUploadFormRequest) String() string { func (*GetAvatarUploadFormRequest) ProtoMessage() {} func (x *GetAvatarUploadFormRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[21] + mi := &file_org_signal_chat_profile_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1817,12 +1746,12 @@ func (x *GetAvatarUploadFormRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAvatarUploadFormRequest.ProtoReflect.Descriptor instead. func (*GetAvatarUploadFormRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{21} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{20} } -func (x *GetAvatarUploadFormRequest) GetAvatarCredentialsPresentation() []byte { +func (x *GetAvatarUploadFormRequest) GetAvatarCredentialPresentation() []byte { if x != nil { - return x.AvatarCredentialsPresentation + return x.AvatarCredentialPresentation } return nil } @@ -1839,7 +1768,7 @@ type GetAvatarUploadFormResponse struct { // Types that are valid to be assigned to Response: // // *GetAvatarUploadFormResponse_AvatarUploadForm - // *GetAvatarUploadFormResponse_InvalidCredentialsPresentation + // *GetAvatarUploadFormResponse_InvalidCredentialPresentation Response isGetAvatarUploadFormResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1847,7 +1776,7 @@ type GetAvatarUploadFormResponse struct { func (x *GetAvatarUploadFormResponse) Reset() { *x = GetAvatarUploadFormResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[22] + mi := &file_org_signal_chat_profile_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1859,7 +1788,7 @@ func (x *GetAvatarUploadFormResponse) String() string { func (*GetAvatarUploadFormResponse) ProtoMessage() {} func (x *GetAvatarUploadFormResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[22] + mi := &file_org_signal_chat_profile_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1872,7 +1801,7 @@ func (x *GetAvatarUploadFormResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAvatarUploadFormResponse.ProtoReflect.Descriptor instead. func (*GetAvatarUploadFormResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{22} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{21} } func (x *GetAvatarUploadFormResponse) GetResponse() isGetAvatarUploadFormResponse_Response { @@ -1891,10 +1820,10 @@ func (x *GetAvatarUploadFormResponse) GetAvatarUploadForm() *common.S3UploadForm return nil } -func (x *GetAvatarUploadFormResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { +func (x *GetAvatarUploadFormResponse) GetInvalidCredentialPresentation() *errors.FailedZkAuthentication { if x != nil { - if x, ok := x.Response.(*GetAvatarUploadFormResponse_InvalidCredentialsPresentation); ok { - return x.InvalidCredentialsPresentation + if x, ok := x.Response.(*GetAvatarUploadFormResponse_InvalidCredentialPresentation); ok { + return x.InvalidCredentialPresentation } } return nil @@ -1909,25 +1838,25 @@ type GetAvatarUploadFormResponse_AvatarUploadForm struct { AvatarUploadForm *common.S3UploadForm `protobuf:"bytes,1,opt,name=avatar_upload_form,json=avatarUploadForm,proto3,oneof"` } -type GetAvatarUploadFormResponse_InvalidCredentialsPresentation struct { - InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` +type GetAvatarUploadFormResponse_InvalidCredentialPresentation struct { + InvalidCredentialPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credential_presentation,json=invalidCredentialPresentation,proto3,oneof"` } func (*GetAvatarUploadFormResponse_AvatarUploadForm) isGetAvatarUploadFormResponse_Response() {} -func (*GetAvatarUploadFormResponse_InvalidCredentialsPresentation) isGetAvatarUploadFormResponse_Response() { +func (*GetAvatarUploadFormResponse_InvalidCredentialPresentation) isGetAvatarUploadFormResponse_Response() { } type ExtendAvatarTTLRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credential_presentation,json=avatarCredentialPresentation,proto3" json:"avatar_credential_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExtendAvatarTTLRequest) Reset() { *x = ExtendAvatarTTLRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[23] + mi := &file_org_signal_chat_profile_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1939,7 +1868,7 @@ func (x *ExtendAvatarTTLRequest) String() string { func (*ExtendAvatarTTLRequest) ProtoMessage() {} func (x *ExtendAvatarTTLRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[23] + mi := &file_org_signal_chat_profile_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1952,12 +1881,12 @@ func (x *ExtendAvatarTTLRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtendAvatarTTLRequest.ProtoReflect.Descriptor instead. func (*ExtendAvatarTTLRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{23} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{22} } -func (x *ExtendAvatarTTLRequest) GetAvatarCredentialsPresentation() []byte { +func (x *ExtendAvatarTTLRequest) GetAvatarCredentialPresentation() []byte { if x != nil { - return x.AvatarCredentialsPresentation + return x.AvatarCredentialPresentation } return nil } @@ -1967,7 +1896,7 @@ type ExtendAvatarTTLResponse struct { // Types that are valid to be assigned to Response: // // *ExtendAvatarTTLResponse_Path - // *ExtendAvatarTTLResponse_InvalidCredentialsPresentation + // *ExtendAvatarTTLResponse_InvalidCredentialPresentation // *ExtendAvatarTTLResponse_NotFound Response isExtendAvatarTTLResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields @@ -1976,7 +1905,7 @@ type ExtendAvatarTTLResponse struct { func (x *ExtendAvatarTTLResponse) Reset() { *x = ExtendAvatarTTLResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[24] + mi := &file_org_signal_chat_profile_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1988,7 +1917,7 @@ func (x *ExtendAvatarTTLResponse) String() string { func (*ExtendAvatarTTLResponse) ProtoMessage() {} func (x *ExtendAvatarTTLResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[24] + mi := &file_org_signal_chat_profile_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2001,7 +1930,7 @@ func (x *ExtendAvatarTTLResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtendAvatarTTLResponse.ProtoReflect.Descriptor instead. func (*ExtendAvatarTTLResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{24} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{23} } func (x *ExtendAvatarTTLResponse) GetResponse() isExtendAvatarTTLResponse_Response { @@ -2020,10 +1949,10 @@ func (x *ExtendAvatarTTLResponse) GetPath() string { return "" } -func (x *ExtendAvatarTTLResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { +func (x *ExtendAvatarTTLResponse) GetInvalidCredentialPresentation() *errors.FailedZkAuthentication { if x != nil { - if x, ok := x.Response.(*ExtendAvatarTTLResponse_InvalidCredentialsPresentation); ok { - return x.InvalidCredentialsPresentation + if x, ok := x.Response.(*ExtendAvatarTTLResponse_InvalidCredentialPresentation); ok { + return x.InvalidCredentialPresentation } } return nil @@ -2047,8 +1976,8 @@ type ExtendAvatarTTLResponse_Path struct { Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` } -type ExtendAvatarTTLResponse_InvalidCredentialsPresentation struct { - InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` +type ExtendAvatarTTLResponse_InvalidCredentialPresentation struct { + InvalidCredentialPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credential_presentation,json=invalidCredentialPresentation,proto3,oneof"` } type ExtendAvatarTTLResponse_NotFound struct { @@ -2058,20 +1987,20 @@ type ExtendAvatarTTLResponse_NotFound struct { func (*ExtendAvatarTTLResponse_Path) isExtendAvatarTTLResponse_Response() {} -func (*ExtendAvatarTTLResponse_InvalidCredentialsPresentation) isExtendAvatarTTLResponse_Response() {} +func (*ExtendAvatarTTLResponse_InvalidCredentialPresentation) isExtendAvatarTTLResponse_Response() {} func (*ExtendAvatarTTLResponse_NotFound) isExtendAvatarTTLResponse_Response() {} type DeleteAvatarRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + AvatarCredentialPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credential_presentation,json=avatarCredentialPresentation,proto3" json:"avatar_credential_presentation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteAvatarRequest) Reset() { *x = DeleteAvatarRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[25] + mi := &file_org_signal_chat_profile_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2083,7 +2012,7 @@ func (x *DeleteAvatarRequest) String() string { func (*DeleteAvatarRequest) ProtoMessage() {} func (x *DeleteAvatarRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[25] + mi := &file_org_signal_chat_profile_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2096,12 +2025,12 @@ func (x *DeleteAvatarRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAvatarRequest.ProtoReflect.Descriptor instead. func (*DeleteAvatarRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{25} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{24} } -func (x *DeleteAvatarRequest) GetAvatarCredentialsPresentation() []byte { +func (x *DeleteAvatarRequest) GetAvatarCredentialPresentation() []byte { if x != nil { - return x.AvatarCredentialsPresentation + return x.AvatarCredentialPresentation } return nil } @@ -2111,7 +2040,7 @@ type DeleteAvatarResponse struct { // Types that are valid to be assigned to Response: // // *DeleteAvatarResponse_Success - // *DeleteAvatarResponse_InvalidCredentialsPresentation + // *DeleteAvatarResponse_InvalidCredentialPresentation Response isDeleteAvatarResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2119,7 +2048,7 @@ type DeleteAvatarResponse struct { func (x *DeleteAvatarResponse) Reset() { *x = DeleteAvatarResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[26] + mi := &file_org_signal_chat_profile_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2131,7 +2060,7 @@ func (x *DeleteAvatarResponse) String() string { func (*DeleteAvatarResponse) ProtoMessage() {} func (x *DeleteAvatarResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[26] + mi := &file_org_signal_chat_profile_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2144,7 +2073,7 @@ func (x *DeleteAvatarResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAvatarResponse.ProtoReflect.Descriptor instead. func (*DeleteAvatarResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{26} + return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{25} } func (x *DeleteAvatarResponse) GetResponse() isDeleteAvatarResponse_Response { @@ -2163,10 +2092,10 @@ func (x *DeleteAvatarResponse) GetSuccess() *emptypb.Empty { return nil } -func (x *DeleteAvatarResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { +func (x *DeleteAvatarResponse) GetInvalidCredentialPresentation() *errors.FailedZkAuthentication { if x != nil { - if x, ok := x.Response.(*DeleteAvatarResponse_InvalidCredentialsPresentation); ok { - return x.InvalidCredentialsPresentation + if x, ok := x.Response.(*DeleteAvatarResponse_InvalidCredentialPresentation); ok { + return x.InvalidCredentialPresentation } } return nil @@ -2180,13 +2109,13 @@ type DeleteAvatarResponse_Success struct { Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` } -type DeleteAvatarResponse_InvalidCredentialsPresentation struct { - InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` +type DeleteAvatarResponse_InvalidCredentialPresentation struct { + InvalidCredentialPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credential_presentation,json=invalidCredentialPresentation,proto3,oneof"` } func (*DeleteAvatarResponse_Success) isDeleteAvatarResponse_Response() {} -func (*DeleteAvatarResponse_InvalidCredentialsPresentation) isDeleteAvatarResponse_Response() {} +func (*DeleteAvatarResponse_InvalidCredentialPresentation) isDeleteAvatarResponse_Response() {} var File_org_signal_chat_profile_proto protoreflect.FileDescriptor @@ -2226,13 +2155,12 @@ const file_org_signal_chat_profile_proto_rawDesc = "" + "\x1cProfilesV2CapabilityRequired\"\x8a\x01\n" + "\x10SetProfileResult\x12\\\n" + "\x15v1_avatar_upload_form\x18\x0f \x01(\v2$.org.signal.chat.common.S3UploadFormH\x00R\x12v1AvatarUploadForm\x88\x01\x01B\x18\n" + - "\x16_v1_avatar_upload_form\"\xd2\x05\n" + + "\x16_v1_avatar_upload_form\"\xac\x04\n" + "\x12SetProfileResponse\x12C\n" + "\x06result\x18\x01 \x01(\v2).org.signal.chat.profile.SetProfileResultH\x00R\x06result\x12\x8f\x01\n" + "\x1cexpected_data_write_conflict\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB \xc2\xd5\"\x1cexpected_data_write_conflictH\x00R\x19expectedDataWriteConflict\x12\x97\x01\n" + "\x1cpayments_forbidden_in_region\x18\x03 \x01(\v22.org.signal.chat.profile.PaymentsForbiddenInRegionB \xc2\xd5\"\x1cpayments_forbidden_in_regionH\x00R\x19paymentsForbiddenInRegion\x12\x98\x01\n" + - "\x1fexpected_version_write_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fexpected_version_write_conflictH\x00R\x1cexpectedVersionWriteConflict\x12\xa3\x01\n" + - "\x1fprofiles_v2_capability_required\x18\x0f \x01(\v25.org.signal.chat.profile.ProfilesV2CapabilityRequiredB#\xc2\xd5\"\x1fprofiles_v2_capability_requiredH\x00R\x1cprofilesV2CapabilityRequiredB\n" + + "\x1fexpected_version_write_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fexpected_version_write_conflictH\x00R\x1cexpectedVersionWriteConflictB\n" + "\n" + "\bresponse\"\xb4\x01\n" + "\x11GetProfileRequest\x12b\n" + @@ -2282,67 +2210,64 @@ const file_org_signal_chat_profile_proto_rawDesc = "" + "profile_v1\x18\x0f \x01(\v2,.org.signal.chat.profile.LegacyProfileResultB\x0e\xc2\xd5\"\n" + "profile_v1H\x00R\tprofileV1B\n" + "\n" + - "\bresponse\"\xba\x02\n" + - "&GetExpiringProfileKeyCredentialRequest\x12b\n" + + "\bresponse\"\xd0\x02\n" + + "\x1eGetProfileKeyCredentialRequest\x12b\n" + "\x12account_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierB\b\xb8\x97\"\x01ȗ\"\x01R\x11accountIdentifier\x123\n" + "\x12credential_request\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\x11credentialRequest\x12V\n" + - "\x0fcredential_type\x18\x03 \x01(\x0e2'.org.signal.chat.profile.CredentialTypeB\x04\x90\x97\"\x01R\x0ecredentialType\x12\x1f\n" + - "\aversion\x18\x04 \x01(\fB\x05\xa2\x97\"\x01 R\aversion\"\xd1\x01\n" + - "/GetExpiringProfileKeyCredentialAnonymousRequest\x12_\n" + - "\arequest\x18\x01 \x01(\v2?.org.signal.chat.profile.GetExpiringProfileKeyCredentialRequestB\x04\xb8\x97\"\x01R\arequest\x12=\n" + - "\x17unidentified_access_key\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x10R\x15unidentifiedAccessKey\"]\n" + - "%GetExpiringProfileKeyCredentialResult\x124\n" + - "\x16profile_key_credential\x18\x01 \x01(\fR\x14profileKeyCredential\"\x97\x03\n" + - "0GetExpiringProfileKeyCredentialAnonymousResponse\x12X\n" + - "\x06result\x18\x01 \x01(\v2>.org.signal.chat.profile.GetExpiringProfileKeyCredentialResultH\x00R\x06result\x12N\n" + + "\x0fcredential_type\x18\x03 \x01(\x0e2'.org.signal.chat.profile.CredentialTypeB\x04\x90\x97\"\x01R\x0ecredentialType\x12=\n" + + "\x17unidentified_access_key\x18\x04 \x01(\fB\x05\xa2\x97\"\x01\x10R\x15unidentifiedAccessKey\"U\n" + + "\x1dGetProfileKeyCredentialResult\x124\n" + + "\x16profile_key_credential\x18\x01 \x01(\fR\x14profileKeyCredential\"\xfe\x02\n" + + "\x1fGetProfileKeyCredentialResponse\x12P\n" + + "\x06result\x18\x01 \x01(\v26.org.signal.chat.profile.GetProfileKeyCredentialResultH\x00R\x06result\x12N\n" + "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFound\x12\xac\x01\n" + "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + "\n" + - "\bresponse\"[\n" + - "\x1bGetAvatarCredentialsRequest\x12<\n" + - "\x1aavatar_credentials_request\x18\x01 \x01(\fR\x18avatarCredentialsRequest\"\xe4\x01\n" + - "\x1cGetAvatarCredentialsResponse\x12/\n" + - "\x12avatar_credentials\x18\x01 \x01(\fH\x00R\x11avatarCredentials\x12\x86\x01\n" + + "\bresponse\"X\n" + + "\x1aGetAvatarCredentialRequest\x12:\n" + + "\x19avatar_credential_request\x18\x01 \x01(\fR\x17avatarCredentialRequest\"\xe1\x01\n" + + "\x1bGetAvatarCredentialResponse\x12-\n" + + "\x11avatar_credential\x18\x01 \x01(\fH\x00R\x10avatarCredential\x12\x86\x01\n" + "\x19missing_zk_credential_key\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19missing_zk_credential_keyH\x00R\x16missingZkCredentialKeyB\n" + "\n" + - "\bresponse\"\x96\x01\n" + - "\x1aGetAvatarUploadFormRequest\x12F\n" + - "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\x120\n" + - "\rupload_length\x18\x02 \x01(\rB\v\xb2\x97\"\a\b\x01\x10\x80\x80\x80\x05R\fuploadLength\"\xa2\x02\n" + + "\bresponse\"\x94\x01\n" + + "\x1aGetAvatarUploadFormRequest\x12D\n" + + "\x1eavatar_credential_presentation\x18\x01 \x01(\fR\x1cavatarCredentialPresentation\x120\n" + + "\rupload_length\x18\x02 \x01(\rB\v\xb2\x97\"\a\b\x01\x10\x80\x80\x80\x05R\fuploadLength\"\x9f\x02\n" + "\x1bGetAvatarUploadFormResponse\x12T\n" + - "\x12avatar_upload_form\x18\x01 \x01(\v2$.org.signal.chat.common.S3UploadFormH\x00R\x10avatarUploadForm\x12\xa0\x01\n" + - " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentationB\n" + + "\x12avatar_upload_form\x18\x01 \x01(\v2$.org.signal.chat.common.S3UploadFormH\x00R\x10avatarUploadForm\x12\x9d\x01\n" + + "\x1finvalid_credential_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB#\xc2\xd5\"\x1finvalid_credential_presentationH\x00R\x1dinvalidCredentialPresentationB\n" + "\n" + - "\bresponse\"`\n" + - "\x16ExtendAvatarTTLRequest\x12F\n" + - "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\"\xb5\x02\n" + + "\bresponse\"^\n" + + "\x16ExtendAvatarTTLRequest\x12D\n" + + "\x1eavatar_credential_presentation\x18\x01 \x01(\fR\x1cavatarCredentialPresentation\"\xb2\x02\n" + "\x17ExtendAvatarTTLResponse\x12\x14\n" + - "\x04path\x18\x01 \x01(\tH\x00R\x04path\x12\xa0\x01\n" + - " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentation\x12U\n" + + "\x04path\x18\x01 \x01(\tH\x00R\x04path\x12\x9d\x01\n" + + "\x1finvalid_credential_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB#\xc2\xd5\"\x1finvalid_credential_presentationH\x00R\x1dinvalidCredentialPresentation\x12U\n" + "\tnot_found\x18\x03 \x01(\v2 .org.signal.chat.errors.NotFoundB\x14\xc2\xd5\"\x10no_active_avatarH\x00R\bnotFoundB\n" + "\n" + - "\bresponse\"]\n" + - "\x13DeleteAvatarRequest\x12F\n" + - "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\"\xf9\x01\n" + + "\bresponse\"[\n" + + "\x13DeleteAvatarRequest\x12D\n" + + "\x1eavatar_credential_presentation\x18\x01 \x01(\fR\x1cavatarCredentialPresentation\"\xf6\x01\n" + "\x14DeleteAvatarResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\xa0\x01\n" + - " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentationB\n" + + "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x9d\x01\n" + + "\x1finvalid_credential_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB#\xc2\xd5\"\x1finvalid_credential_presentationH\x00R\x1dinvalidCredentialPresentationB\n" + "\n" + "\bresponse*[\n" + "\x0eCredentialType\x12\x1f\n" + "\x1bCREDENTIAL_TYPE_UNSPECIFIED\x10\x00\x12(\n" + - "$CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY\x10\x012\xd5\x03\n" + + "$CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY\x10\x012\xd2\x03\n" + "\aProfile\x12g\n" + "\n" + "SetProfile\x12*.org.signal.chat.profile.SetProfileRequest\x1a+.org.signal.chat.profile.SetProfileResponse\"\x00\x12g\n" + "\n" + - "GetProfile\x12*.org.signal.chat.profile.GetProfileRequest\x1a+.org.signal.chat.profile.GetProfileResponse\"\x00\x12\x85\x01\n" + - "\x14GetAvatarCredentials\x124.org.signal.chat.profile.GetAvatarCredentialsRequest\x1a5.org.signal.chat.profile.GetAvatarCredentialsResponse\"\x00\x12j\n" + - "\vSetV1Avatar\x12+.org.signal.chat.profile.SetV1AvatarRequest\x1a,.org.signal.chat.profile.SetV1AvatarResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xba\x05\n" + + "GetProfile\x12*.org.signal.chat.profile.GetProfileRequest\x1a+.org.signal.chat.profile.GetProfileResponse\"\x00\x12\x82\x01\n" + + "\x13GetAvatarCredential\x123.org.signal.chat.profile.GetAvatarCredentialRequest\x1a4.org.signal.chat.profile.GetAvatarCredentialResponse\"\x00\x12j\n" + + "\vSetV1Avatar\x12+.org.signal.chat.profile.SetV1AvatarRequest\x1a,.org.signal.chat.profile.SetV1AvatarResponse\"\x00\x1a\x04\xc8\xd5\"\x012\x90\x05\n" + "\x10ProfileAnonymous\x12y\n" + "\n" + - "GetProfile\x123.org.signal.chat.profile.GetProfileAnonymousRequest\x1a4.org.signal.chat.profile.GetProfileAnonymousResponse\"\x00\x12\xb8\x01\n" + - "\x1fGetExpiringProfileKeyCredential\x12H.org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest\x1aI.org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse\"\x00\x12\x82\x01\n" + + "GetProfile\x123.org.signal.chat.profile.GetProfileAnonymousRequest\x1a4.org.signal.chat.profile.GetProfileAnonymousResponse\"\x00\x12\x8e\x01\n" + + "\x17GetProfileKeyCredential\x127.org.signal.chat.profile.GetProfileKeyCredentialRequest\x1a8.org.signal.chat.profile.GetProfileKeyCredentialResponse\"\x00\x12\x82\x01\n" + "\x13GetAvatarUploadForm\x123.org.signal.chat.profile.GetAvatarUploadFormRequest\x1a4.org.signal.chat.profile.GetAvatarUploadFormResponse\"\x00\x12v\n" + "\x0fExtendAvatarTTL\x12/.org.signal.chat.profile.ExtendAvatarTTLRequest\x1a0.org.signal.chat.profile.ExtendAvatarTTLResponse\"\x00\x12m\n" + "\fDeleteAvatar\x12,.org.signal.chat.profile.DeleteAvatarRequest\x1a-.org.signal.chat.profile.DeleteAvatarResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" @@ -2360,102 +2285,99 @@ func file_org_signal_chat_profile_proto_rawDescGZIP() []byte { } var file_org_signal_chat_profile_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_org_signal_chat_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_org_signal_chat_profile_proto_goTypes = []any{ - (CredentialType)(0), // 0: org.signal.chat.profile.CredentialType - (SetProfileV1Request_AvatarChange)(0), // 1: org.signal.chat.profile.SetProfileV1Request.AvatarChange - (*SetProfileV1Request)(nil), // 2: org.signal.chat.profile.SetProfileV1Request - (*SetV1AvatarRequest)(nil), // 3: org.signal.chat.profile.SetV1AvatarRequest - (*SetV1AvatarResponse)(nil), // 4: org.signal.chat.profile.SetV1AvatarResponse - (*SetProfileRequest)(nil), // 5: org.signal.chat.profile.SetProfileRequest - (*PaymentsForbiddenInRegion)(nil), // 6: org.signal.chat.profile.PaymentsForbiddenInRegion - (*ProfilesV2CapabilityRequired)(nil), // 7: org.signal.chat.profile.ProfilesV2CapabilityRequired - (*SetProfileResult)(nil), // 8: org.signal.chat.profile.SetProfileResult - (*SetProfileResponse)(nil), // 9: org.signal.chat.profile.SetProfileResponse - (*GetProfileRequest)(nil), // 10: org.signal.chat.profile.GetProfileRequest - (*GetProfileAnonymousRequest)(nil), // 11: org.signal.chat.profile.GetProfileAnonymousRequest - (*AccountInfo)(nil), // 12: org.signal.chat.profile.AccountInfo - (*ProfileResult)(nil), // 13: org.signal.chat.profile.ProfileResult - (*LegacyProfileResult)(nil), // 14: org.signal.chat.profile.LegacyProfileResult - (*GetProfileResponse)(nil), // 15: org.signal.chat.profile.GetProfileResponse - (*GetProfileAnonymousResponse)(nil), // 16: org.signal.chat.profile.GetProfileAnonymousResponse - (*GetExpiringProfileKeyCredentialRequest)(nil), // 17: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest - (*GetExpiringProfileKeyCredentialAnonymousRequest)(nil), // 18: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest - (*GetExpiringProfileKeyCredentialResult)(nil), // 19: org.signal.chat.profile.GetExpiringProfileKeyCredentialResult - (*GetExpiringProfileKeyCredentialAnonymousResponse)(nil), // 20: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse - (*GetAvatarCredentialsRequest)(nil), // 21: org.signal.chat.profile.GetAvatarCredentialsRequest - (*GetAvatarCredentialsResponse)(nil), // 22: org.signal.chat.profile.GetAvatarCredentialsResponse - (*GetAvatarUploadFormRequest)(nil), // 23: org.signal.chat.profile.GetAvatarUploadFormRequest - (*GetAvatarUploadFormResponse)(nil), // 24: org.signal.chat.profile.GetAvatarUploadFormResponse - (*ExtendAvatarTTLRequest)(nil), // 25: org.signal.chat.profile.ExtendAvatarTTLRequest - (*ExtendAvatarTTLResponse)(nil), // 26: org.signal.chat.profile.ExtendAvatarTTLResponse - (*DeleteAvatarRequest)(nil), // 27: org.signal.chat.profile.DeleteAvatarRequest - (*DeleteAvatarResponse)(nil), // 28: org.signal.chat.profile.DeleteAvatarResponse - (*common.S3UploadForm)(nil), // 29: org.signal.chat.common.S3UploadForm - (*errors.FailedPrecondition)(nil), // 30: org.signal.chat.errors.FailedPrecondition - (*common.ServiceIdentifier)(nil), // 31: org.signal.chat.common.ServiceIdentifier - (*errors.NotFound)(nil), // 32: org.signal.chat.errors.NotFound - (*errors.FailedUnidentifiedAuthorization)(nil), // 33: org.signal.chat.errors.FailedUnidentifiedAuthorization - (*errors.FailedZkAuthentication)(nil), // 34: org.signal.chat.errors.FailedZkAuthentication - (*emptypb.Empty)(nil), // 35: google.protobuf.Empty + (CredentialType)(0), // 0: org.signal.chat.profile.CredentialType + (SetProfileV1Request_AvatarChange)(0), // 1: org.signal.chat.profile.SetProfileV1Request.AvatarChange + (*SetProfileV1Request)(nil), // 2: org.signal.chat.profile.SetProfileV1Request + (*SetV1AvatarRequest)(nil), // 3: org.signal.chat.profile.SetV1AvatarRequest + (*SetV1AvatarResponse)(nil), // 4: org.signal.chat.profile.SetV1AvatarResponse + (*SetProfileRequest)(nil), // 5: org.signal.chat.profile.SetProfileRequest + (*PaymentsForbiddenInRegion)(nil), // 6: org.signal.chat.profile.PaymentsForbiddenInRegion + (*ProfilesV2CapabilityRequired)(nil), // 7: org.signal.chat.profile.ProfilesV2CapabilityRequired + (*SetProfileResult)(nil), // 8: org.signal.chat.profile.SetProfileResult + (*SetProfileResponse)(nil), // 9: org.signal.chat.profile.SetProfileResponse + (*GetProfileRequest)(nil), // 10: org.signal.chat.profile.GetProfileRequest + (*GetProfileAnonymousRequest)(nil), // 11: org.signal.chat.profile.GetProfileAnonymousRequest + (*AccountInfo)(nil), // 12: org.signal.chat.profile.AccountInfo + (*ProfileResult)(nil), // 13: org.signal.chat.profile.ProfileResult + (*LegacyProfileResult)(nil), // 14: org.signal.chat.profile.LegacyProfileResult + (*GetProfileResponse)(nil), // 15: org.signal.chat.profile.GetProfileResponse + (*GetProfileAnonymousResponse)(nil), // 16: org.signal.chat.profile.GetProfileAnonymousResponse + (*GetProfileKeyCredentialRequest)(nil), // 17: org.signal.chat.profile.GetProfileKeyCredentialRequest + (*GetProfileKeyCredentialResult)(nil), // 18: org.signal.chat.profile.GetProfileKeyCredentialResult + (*GetProfileKeyCredentialResponse)(nil), // 19: org.signal.chat.profile.GetProfileKeyCredentialResponse + (*GetAvatarCredentialRequest)(nil), // 20: org.signal.chat.profile.GetAvatarCredentialRequest + (*GetAvatarCredentialResponse)(nil), // 21: org.signal.chat.profile.GetAvatarCredentialResponse + (*GetAvatarUploadFormRequest)(nil), // 22: org.signal.chat.profile.GetAvatarUploadFormRequest + (*GetAvatarUploadFormResponse)(nil), // 23: org.signal.chat.profile.GetAvatarUploadFormResponse + (*ExtendAvatarTTLRequest)(nil), // 24: org.signal.chat.profile.ExtendAvatarTTLRequest + (*ExtendAvatarTTLResponse)(nil), // 25: org.signal.chat.profile.ExtendAvatarTTLResponse + (*DeleteAvatarRequest)(nil), // 26: org.signal.chat.profile.DeleteAvatarRequest + (*DeleteAvatarResponse)(nil), // 27: org.signal.chat.profile.DeleteAvatarResponse + (*common.S3UploadForm)(nil), // 28: org.signal.chat.common.S3UploadForm + (*errors.FailedPrecondition)(nil), // 29: org.signal.chat.errors.FailedPrecondition + (*common.ServiceIdentifier)(nil), // 30: org.signal.chat.common.ServiceIdentifier + (*errors.NotFound)(nil), // 31: org.signal.chat.errors.NotFound + (*errors.FailedUnidentifiedAuthorization)(nil), // 32: org.signal.chat.errors.FailedUnidentifiedAuthorization + (*errors.FailedZkAuthentication)(nil), // 33: org.signal.chat.errors.FailedZkAuthentication + (*emptypb.Empty)(nil), // 34: google.protobuf.Empty } var file_org_signal_chat_profile_proto_depIdxs = []int32{ 1, // 0: org.signal.chat.profile.SetProfileV1Request.avatar_change:type_name -> org.signal.chat.profile.SetProfileV1Request.AvatarChange - 29, // 1: org.signal.chat.profile.SetV1AvatarResponse.form:type_name -> org.signal.chat.common.S3UploadForm + 28, // 1: org.signal.chat.profile.SetV1AvatarResponse.form:type_name -> org.signal.chat.common.S3UploadForm 2, // 2: org.signal.chat.profile.SetProfileRequest.v1Request:type_name -> org.signal.chat.profile.SetProfileV1Request - 29, // 3: org.signal.chat.profile.SetProfileResult.v1_avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm + 28, // 3: org.signal.chat.profile.SetProfileResult.v1_avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm 8, // 4: org.signal.chat.profile.SetProfileResponse.result:type_name -> org.signal.chat.profile.SetProfileResult - 30, // 5: org.signal.chat.profile.SetProfileResponse.expected_data_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 29, // 5: org.signal.chat.profile.SetProfileResponse.expected_data_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition 6, // 6: org.signal.chat.profile.SetProfileResponse.payments_forbidden_in_region:type_name -> org.signal.chat.profile.PaymentsForbiddenInRegion - 30, // 7: org.signal.chat.profile.SetProfileResponse.expected_version_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 7, // 8: org.signal.chat.profile.SetProfileResponse.profiles_v2_capability_required:type_name -> org.signal.chat.profile.ProfilesV2CapabilityRequired - 31, // 9: org.signal.chat.profile.GetProfileRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 10, // 10: org.signal.chat.profile.GetProfileAnonymousRequest.request:type_name -> org.signal.chat.profile.GetProfileRequest - 12, // 11: org.signal.chat.profile.ProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo - 12, // 12: org.signal.chat.profile.LegacyProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo - 13, // 13: org.signal.chat.profile.GetProfileResponse.profile:type_name -> org.signal.chat.profile.ProfileResult - 32, // 14: org.signal.chat.profile.GetProfileResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 14, // 15: org.signal.chat.profile.GetProfileResponse.legacy_profile:type_name -> org.signal.chat.profile.LegacyProfileResult - 13, // 16: org.signal.chat.profile.GetProfileAnonymousResponse.profile:type_name -> org.signal.chat.profile.ProfileResult - 32, // 17: org.signal.chat.profile.GetProfileAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 33, // 18: org.signal.chat.profile.GetProfileAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 14, // 19: org.signal.chat.profile.GetProfileAnonymousResponse.profile_v1:type_name -> org.signal.chat.profile.LegacyProfileResult - 31, // 20: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 0, // 21: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.credential_type:type_name -> org.signal.chat.profile.CredentialType - 17, // 22: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest.request:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest - 19, // 23: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.result:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialResult - 32, // 24: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 33, // 25: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 30, // 26: org.signal.chat.profile.GetAvatarCredentialsResponse.missing_zk_credential_key:type_name -> org.signal.chat.errors.FailedPrecondition - 29, // 27: org.signal.chat.profile.GetAvatarUploadFormResponse.avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm - 34, // 28: org.signal.chat.profile.GetAvatarUploadFormResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 34, // 29: org.signal.chat.profile.ExtendAvatarTTLResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 32, // 30: org.signal.chat.profile.ExtendAvatarTTLResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 35, // 31: org.signal.chat.profile.DeleteAvatarResponse.success:type_name -> google.protobuf.Empty - 34, // 32: org.signal.chat.profile.DeleteAvatarResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 5, // 33: org.signal.chat.profile.Profile.SetProfile:input_type -> org.signal.chat.profile.SetProfileRequest - 10, // 34: org.signal.chat.profile.Profile.GetProfile:input_type -> org.signal.chat.profile.GetProfileRequest - 21, // 35: org.signal.chat.profile.Profile.GetAvatarCredentials:input_type -> org.signal.chat.profile.GetAvatarCredentialsRequest - 3, // 36: org.signal.chat.profile.Profile.SetV1Avatar:input_type -> org.signal.chat.profile.SetV1AvatarRequest - 11, // 37: org.signal.chat.profile.ProfileAnonymous.GetProfile:input_type -> org.signal.chat.profile.GetProfileAnonymousRequest - 18, // 38: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:input_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest - 23, // 39: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:input_type -> org.signal.chat.profile.GetAvatarUploadFormRequest - 25, // 40: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:input_type -> org.signal.chat.profile.ExtendAvatarTTLRequest - 27, // 41: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:input_type -> org.signal.chat.profile.DeleteAvatarRequest - 9, // 42: org.signal.chat.profile.Profile.SetProfile:output_type -> org.signal.chat.profile.SetProfileResponse - 15, // 43: org.signal.chat.profile.Profile.GetProfile:output_type -> org.signal.chat.profile.GetProfileResponse - 22, // 44: org.signal.chat.profile.Profile.GetAvatarCredentials:output_type -> org.signal.chat.profile.GetAvatarCredentialsResponse - 4, // 45: org.signal.chat.profile.Profile.SetV1Avatar:output_type -> org.signal.chat.profile.SetV1AvatarResponse - 16, // 46: org.signal.chat.profile.ProfileAnonymous.GetProfile:output_type -> org.signal.chat.profile.GetProfileAnonymousResponse - 20, // 47: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:output_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse - 24, // 48: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:output_type -> org.signal.chat.profile.GetAvatarUploadFormResponse - 26, // 49: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:output_type -> org.signal.chat.profile.ExtendAvatarTTLResponse - 28, // 50: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:output_type -> org.signal.chat.profile.DeleteAvatarResponse - 42, // [42:51] is the sub-list for method output_type - 33, // [33:42] is the sub-list for method input_type - 33, // [33:33] is the sub-list for extension type_name - 33, // [33:33] is the sub-list for extension extendee - 0, // [0:33] is the sub-list for field type_name + 29, // 7: org.signal.chat.profile.SetProfileResponse.expected_version_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition + 30, // 8: org.signal.chat.profile.GetProfileRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 10, // 9: org.signal.chat.profile.GetProfileAnonymousRequest.request:type_name -> org.signal.chat.profile.GetProfileRequest + 12, // 10: org.signal.chat.profile.ProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo + 12, // 11: org.signal.chat.profile.LegacyProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo + 13, // 12: org.signal.chat.profile.GetProfileResponse.profile:type_name -> org.signal.chat.profile.ProfileResult + 31, // 13: org.signal.chat.profile.GetProfileResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 14, // 14: org.signal.chat.profile.GetProfileResponse.legacy_profile:type_name -> org.signal.chat.profile.LegacyProfileResult + 13, // 15: org.signal.chat.profile.GetProfileAnonymousResponse.profile:type_name -> org.signal.chat.profile.ProfileResult + 31, // 16: org.signal.chat.profile.GetProfileAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 32, // 17: org.signal.chat.profile.GetProfileAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 14, // 18: org.signal.chat.profile.GetProfileAnonymousResponse.profile_v1:type_name -> org.signal.chat.profile.LegacyProfileResult + 30, // 19: org.signal.chat.profile.GetProfileKeyCredentialRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier + 0, // 20: org.signal.chat.profile.GetProfileKeyCredentialRequest.credential_type:type_name -> org.signal.chat.profile.CredentialType + 18, // 21: org.signal.chat.profile.GetProfileKeyCredentialResponse.result:type_name -> org.signal.chat.profile.GetProfileKeyCredentialResult + 31, // 22: org.signal.chat.profile.GetProfileKeyCredentialResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 32, // 23: org.signal.chat.profile.GetProfileKeyCredentialResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization + 29, // 24: org.signal.chat.profile.GetAvatarCredentialResponse.missing_zk_credential_key:type_name -> org.signal.chat.errors.FailedPrecondition + 28, // 25: org.signal.chat.profile.GetAvatarUploadFormResponse.avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm + 33, // 26: org.signal.chat.profile.GetAvatarUploadFormResponse.invalid_credential_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 33, // 27: org.signal.chat.profile.ExtendAvatarTTLResponse.invalid_credential_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 31, // 28: org.signal.chat.profile.ExtendAvatarTTLResponse.not_found:type_name -> org.signal.chat.errors.NotFound + 34, // 29: org.signal.chat.profile.DeleteAvatarResponse.success:type_name -> google.protobuf.Empty + 33, // 30: org.signal.chat.profile.DeleteAvatarResponse.invalid_credential_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication + 5, // 31: org.signal.chat.profile.Profile.SetProfile:input_type -> org.signal.chat.profile.SetProfileRequest + 10, // 32: org.signal.chat.profile.Profile.GetProfile:input_type -> org.signal.chat.profile.GetProfileRequest + 20, // 33: org.signal.chat.profile.Profile.GetAvatarCredential:input_type -> org.signal.chat.profile.GetAvatarCredentialRequest + 3, // 34: org.signal.chat.profile.Profile.SetV1Avatar:input_type -> org.signal.chat.profile.SetV1AvatarRequest + 11, // 35: org.signal.chat.profile.ProfileAnonymous.GetProfile:input_type -> org.signal.chat.profile.GetProfileAnonymousRequest + 17, // 36: org.signal.chat.profile.ProfileAnonymous.GetProfileKeyCredential:input_type -> org.signal.chat.profile.GetProfileKeyCredentialRequest + 22, // 37: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:input_type -> org.signal.chat.profile.GetAvatarUploadFormRequest + 24, // 38: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:input_type -> org.signal.chat.profile.ExtendAvatarTTLRequest + 26, // 39: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:input_type -> org.signal.chat.profile.DeleteAvatarRequest + 9, // 40: org.signal.chat.profile.Profile.SetProfile:output_type -> org.signal.chat.profile.SetProfileResponse + 15, // 41: org.signal.chat.profile.Profile.GetProfile:output_type -> org.signal.chat.profile.GetProfileResponse + 21, // 42: org.signal.chat.profile.Profile.GetAvatarCredential:output_type -> org.signal.chat.profile.GetAvatarCredentialResponse + 4, // 43: org.signal.chat.profile.Profile.SetV1Avatar:output_type -> org.signal.chat.profile.SetV1AvatarResponse + 16, // 44: org.signal.chat.profile.ProfileAnonymous.GetProfile:output_type -> org.signal.chat.profile.GetProfileAnonymousResponse + 19, // 45: org.signal.chat.profile.ProfileAnonymous.GetProfileKeyCredential:output_type -> org.signal.chat.profile.GetProfileKeyCredentialResponse + 23, // 46: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:output_type -> org.signal.chat.profile.GetAvatarUploadFormResponse + 25, // 47: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:output_type -> org.signal.chat.profile.ExtendAvatarTTLResponse + 27, // 48: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:output_type -> org.signal.chat.profile.DeleteAvatarResponse + 40, // [40:49] is the sub-list for method output_type + 31, // [31:40] is the sub-list for method input_type + 31, // [31:31] is the sub-list for extension type_name + 31, // [31:31] is the sub-list for extension extendee + 0, // [0:31] is the sub-list for field type_name } func init() { file_org_signal_chat_profile_proto_init() } @@ -2469,7 +2391,6 @@ func file_org_signal_chat_profile_proto_init() { (*SetProfileResponse_ExpectedDataWriteConflict)(nil), (*SetProfileResponse_PaymentsForbiddenInRegion)(nil), (*SetProfileResponse_ExpectedVersionWriteConflict)(nil), - (*SetProfileResponse_ProfilesV2CapabilityRequired)(nil), } file_org_signal_chat_profile_proto_msgTypes[9].OneofWrappers = []any{ (*GetProfileAnonymousRequest_UnidentifiedAccessKey)(nil), @@ -2488,27 +2409,27 @@ func file_org_signal_chat_profile_proto_init() { (*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization)(nil), (*GetProfileAnonymousResponse_ProfileV1)(nil), } - file_org_signal_chat_profile_proto_msgTypes[18].OneofWrappers = []any{ - (*GetExpiringProfileKeyCredentialAnonymousResponse_Result)(nil), - (*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound)(nil), - (*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization)(nil), + file_org_signal_chat_profile_proto_msgTypes[17].OneofWrappers = []any{ + (*GetProfileKeyCredentialResponse_Result)(nil), + (*GetProfileKeyCredentialResponse_NotFound)(nil), + (*GetProfileKeyCredentialResponse_FailedUnidentifiedAuthorization)(nil), } - file_org_signal_chat_profile_proto_msgTypes[20].OneofWrappers = []any{ - (*GetAvatarCredentialsResponse_AvatarCredentials)(nil), - (*GetAvatarCredentialsResponse_MissingZkCredentialKey)(nil), + file_org_signal_chat_profile_proto_msgTypes[19].OneofWrappers = []any{ + (*GetAvatarCredentialResponse_AvatarCredential)(nil), + (*GetAvatarCredentialResponse_MissingZkCredentialKey)(nil), } - file_org_signal_chat_profile_proto_msgTypes[22].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[21].OneofWrappers = []any{ (*GetAvatarUploadFormResponse_AvatarUploadForm)(nil), - (*GetAvatarUploadFormResponse_InvalidCredentialsPresentation)(nil), + (*GetAvatarUploadFormResponse_InvalidCredentialPresentation)(nil), } - file_org_signal_chat_profile_proto_msgTypes[24].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[23].OneofWrappers = []any{ (*ExtendAvatarTTLResponse_Path)(nil), - (*ExtendAvatarTTLResponse_InvalidCredentialsPresentation)(nil), + (*ExtendAvatarTTLResponse_InvalidCredentialPresentation)(nil), (*ExtendAvatarTTLResponse_NotFound)(nil), } - file_org_signal_chat_profile_proto_msgTypes[26].OneofWrappers = []any{ + file_org_signal_chat_profile_proto_msgTypes[25].OneofWrappers = []any{ (*DeleteAvatarResponse_Success)(nil), - (*DeleteAvatarResponse_InvalidCredentialsPresentation)(nil), + (*DeleteAvatarResponse_InvalidCredentialPresentation)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2516,7 +2437,7 @@ func file_org_signal_chat_profile_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_profile_proto_rawDesc), len(file_org_signal_chat_profile_proto_rawDesc)), NumEnums: 2, - NumMessages: 27, + NumMessages: 26, NumExtensions: 0, NumServices: 2, }, diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go index 01e8c6f..82dcc4f 100644 --- a/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go @@ -23,10 +23,10 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Profile_SetProfile_FullMethodName = "/org.signal.chat.profile.Profile/SetProfile" - Profile_GetProfile_FullMethodName = "/org.signal.chat.profile.Profile/GetProfile" - Profile_GetAvatarCredentials_FullMethodName = "/org.signal.chat.profile.Profile/GetAvatarCredentials" - Profile_SetV1Avatar_FullMethodName = "/org.signal.chat.profile.Profile/SetV1Avatar" + Profile_SetProfile_FullMethodName = "/org.signal.chat.profile.Profile/SetProfile" + Profile_GetProfile_FullMethodName = "/org.signal.chat.profile.Profile/GetProfile" + Profile_GetAvatarCredential_FullMethodName = "/org.signal.chat.profile.Profile/GetAvatarCredential" + Profile_SetV1Avatar_FullMethodName = "/org.signal.chat.profile.Profile/SetV1Avatar" ) // ProfileClient is the client API for Profile service. @@ -35,16 +35,16 @@ const ( // // Provides methods for working with profiles and profile-related data. type ProfileClient interface { - // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. + // Sets profile data and, if needed, returns a credential used by clients to upload a v1 avatar. SetProfile(ctx context.Context, in *SetProfileRequest, opts ...grpc.CallOption) (*SetProfileResponse, error) // Retrieves profile data. Callers with an unidentified access key for the account // should use the version of this method in `ProfileAnonymous` instead. GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) - // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous + // Returns an anonymous credential that may be presented with avatar operations in ProfilesAnonymous // // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC - GetAvatarCredentials(ctx context.Context, in *GetAvatarCredentialsRequest, opts ...grpc.CallOption) (*GetAvatarCredentialsResponse, error) - // Returns credentials used by clients to upload a v1 avatar, deleting any current avatar. + GetAvatarCredential(ctx context.Context, in *GetAvatarCredentialRequest, opts ...grpc.CallOption) (*GetAvatarCredentialResponse, error) + // Returns a credential used by clients to upload a v1 avatar, deleting any current avatar. // // This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads: // 1. SetV1Avatar @@ -84,10 +84,10 @@ func (c *profileClient) GetProfile(ctx context.Context, in *GetProfileRequest, o return out, nil } -func (c *profileClient) GetAvatarCredentials(ctx context.Context, in *GetAvatarCredentialsRequest, opts ...grpc.CallOption) (*GetAvatarCredentialsResponse, error) { +func (c *profileClient) GetAvatarCredential(ctx context.Context, in *GetAvatarCredentialRequest, opts ...grpc.CallOption) (*GetAvatarCredentialResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAvatarCredentialsResponse) - err := c.cc.Invoke(ctx, Profile_GetAvatarCredentials_FullMethodName, in, out, cOpts...) + out := new(GetAvatarCredentialResponse) + err := c.cc.Invoke(ctx, Profile_GetAvatarCredential_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -110,16 +110,16 @@ func (c *profileClient) SetV1Avatar(ctx context.Context, in *SetV1AvatarRequest, // // Provides methods for working with profiles and profile-related data. type ProfileServer interface { - // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. + // Sets profile data and, if needed, returns a credential used by clients to upload a v1 avatar. SetProfile(context.Context, *SetProfileRequest) (*SetProfileResponse, error) // Retrieves profile data. Callers with an unidentified access key for the account // should use the version of this method in `ProfileAnonymous` instead. GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) - // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous + // Returns an anonymous credential that may be presented with avatar operations in ProfilesAnonymous // // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC - GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) - // Returns credentials used by clients to upload a v1 avatar, deleting any current avatar. + GetAvatarCredential(context.Context, *GetAvatarCredentialRequest) (*GetAvatarCredentialResponse, error) + // Returns a credential used by clients to upload a v1 avatar, deleting any current avatar. // // This RPC streamlines avatar changes during the v1 -> v2 transition by minimizing uploads: // 1. SetV1Avatar @@ -145,8 +145,8 @@ func (UnimplementedProfileServer) SetProfile(context.Context, *SetProfileRequest func (UnimplementedProfileServer) GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") } -func (UnimplementedProfileServer) GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetAvatarCredentials not implemented") +func (UnimplementedProfileServer) GetAvatarCredential(context.Context, *GetAvatarCredentialRequest) (*GetAvatarCredentialResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAvatarCredential not implemented") } func (UnimplementedProfileServer) SetV1Avatar(context.Context, *SetV1AvatarRequest) (*SetV1AvatarResponse, error) { return nil, status.Error(codes.Unimplemented, "method SetV1Avatar not implemented") @@ -208,20 +208,20 @@ func _Profile_GetProfile_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Profile_GetAvatarCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAvatarCredentialsRequest) +func _Profile_GetAvatarCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvatarCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ProfileServer).GetAvatarCredentials(ctx, in) + return srv.(ProfileServer).GetAvatarCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Profile_GetAvatarCredentials_FullMethodName, + FullMethod: Profile_GetAvatarCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileServer).GetAvatarCredentials(ctx, req.(*GetAvatarCredentialsRequest)) + return srv.(ProfileServer).GetAvatarCredential(ctx, req.(*GetAvatarCredentialRequest)) } return interceptor(ctx, in, info, handler) } @@ -260,8 +260,8 @@ var Profile_ServiceDesc = grpc.ServiceDesc{ Handler: _Profile_GetProfile_Handler, }, { - MethodName: "GetAvatarCredentials", - Handler: _Profile_GetAvatarCredentials_Handler, + MethodName: "GetAvatarCredential", + Handler: _Profile_GetAvatarCredential_Handler, }, { MethodName: "SetV1Avatar", @@ -273,11 +273,11 @@ var Profile_ServiceDesc = grpc.ServiceDesc{ } const ( - ProfileAnonymous_GetProfile_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetProfile" - ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetExpiringProfileKeyCredential" - ProfileAnonymous_GetAvatarUploadForm_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetAvatarUploadForm" - ProfileAnonymous_ExtendAvatarTTL_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/ExtendAvatarTTL" - ProfileAnonymous_DeleteAvatar_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/DeleteAvatar" + ProfileAnonymous_GetProfile_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetProfile" + ProfileAnonymous_GetProfileKeyCredential_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetProfileKeyCredential" + ProfileAnonymous_GetAvatarUploadForm_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetAvatarUploadForm" + ProfileAnonymous_ExtendAvatarTTL_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/ExtendAvatarTTL" + ProfileAnonymous_DeleteAvatar_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/DeleteAvatar" ) // ProfileAnonymousClient is the client API for ProfileAnonymous service. @@ -294,15 +294,15 @@ type ProfileAnonymousClient interface { // Retrieves profile data. GetProfile(ctx context.Context, in *GetProfileAnonymousRequest, opts ...grpc.CallOption) (*GetProfileAnonymousResponse, error) // Retrieves a profile key credential. - GetExpiringProfileKeyCredential(ctx context.Context, in *GetExpiringProfileKeyCredentialAnonymousRequest, opts ...grpc.CallOption) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) - // Returns credentials to upload a v2 avatar. After uploading the avatar, the client + GetProfileKeyCredential(ctx context.Context, in *GetProfileKeyCredentialRequest, opts ...grpc.CallOption) (*GetProfileKeyCredentialResponse, error) + // Returns a credential to upload a v2 avatar. After uploading the avatar, the client // must call SetProfile with the new avatar URL in the encrypted `data`. // // Because avatars are uploaded anonymously, they have an expiration equal to the // idle account expiration. Clients must periodically (recommended: every 90 days) // call ExtendAvatarTTL to extend the TTl. // - // Note: any existing avatar associated with these credentials will be deleted immediately + // Note: any existing avatar associated with this credential will be deleted immediately GetAvatarUploadForm(ctx context.Context, in *GetAvatarUploadFormRequest, opts ...grpc.CallOption) (*GetAvatarUploadFormResponse, error) // Extends the TTL of the avatar currently associated with the request’s avatar auth credential ExtendAvatarTTL(ctx context.Context, in *ExtendAvatarTTLRequest, opts ...grpc.CallOption) (*ExtendAvatarTTLResponse, error) @@ -330,10 +330,10 @@ func (c *profileAnonymousClient) GetProfile(ctx context.Context, in *GetProfileA return out, nil } -func (c *profileAnonymousClient) GetExpiringProfileKeyCredential(ctx context.Context, in *GetExpiringProfileKeyCredentialAnonymousRequest, opts ...grpc.CallOption) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) { +func (c *profileAnonymousClient) GetProfileKeyCredential(ctx context.Context, in *GetProfileKeyCredentialRequest, opts ...grpc.CallOption) (*GetProfileKeyCredentialResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetExpiringProfileKeyCredentialAnonymousResponse) - err := c.cc.Invoke(ctx, ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName, in, out, cOpts...) + out := new(GetProfileKeyCredentialResponse) + err := c.cc.Invoke(ctx, ProfileAnonymous_GetProfileKeyCredential_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -384,15 +384,15 @@ type ProfileAnonymousServer interface { // Retrieves profile data. GetProfile(context.Context, *GetProfileAnonymousRequest) (*GetProfileAnonymousResponse, error) // Retrieves a profile key credential. - GetExpiringProfileKeyCredential(context.Context, *GetExpiringProfileKeyCredentialAnonymousRequest) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) - // Returns credentials to upload a v2 avatar. After uploading the avatar, the client + GetProfileKeyCredential(context.Context, *GetProfileKeyCredentialRequest) (*GetProfileKeyCredentialResponse, error) + // Returns a credential to upload a v2 avatar. After uploading the avatar, the client // must call SetProfile with the new avatar URL in the encrypted `data`. // // Because avatars are uploaded anonymously, they have an expiration equal to the // idle account expiration. Clients must periodically (recommended: every 90 days) // call ExtendAvatarTTL to extend the TTl. // - // Note: any existing avatar associated with these credentials will be deleted immediately + // Note: any existing avatar associated with this credential will be deleted immediately GetAvatarUploadForm(context.Context, *GetAvatarUploadFormRequest) (*GetAvatarUploadFormResponse, error) // Extends the TTL of the avatar currently associated with the request’s avatar auth credential ExtendAvatarTTL(context.Context, *ExtendAvatarTTLRequest) (*ExtendAvatarTTLResponse, error) @@ -413,8 +413,8 @@ type UnimplementedProfileAnonymousServer struct{} func (UnimplementedProfileAnonymousServer) GetProfile(context.Context, *GetProfileAnonymousRequest) (*GetProfileAnonymousResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") } -func (UnimplementedProfileAnonymousServer) GetExpiringProfileKeyCredential(context.Context, *GetExpiringProfileKeyCredentialAnonymousRequest) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetExpiringProfileKeyCredential not implemented") +func (UnimplementedProfileAnonymousServer) GetProfileKeyCredential(context.Context, *GetProfileKeyCredentialRequest) (*GetProfileKeyCredentialResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetProfileKeyCredential not implemented") } func (UnimplementedProfileAnonymousServer) GetAvatarUploadForm(context.Context, *GetAvatarUploadFormRequest) (*GetAvatarUploadFormResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAvatarUploadForm not implemented") @@ -464,20 +464,20 @@ func _ProfileAnonymous_GetProfile_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _ProfileAnonymous_GetExpiringProfileKeyCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExpiringProfileKeyCredentialAnonymousRequest) +func _ProfileAnonymous_GetProfileKeyCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileKeyCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ProfileAnonymousServer).GetExpiringProfileKeyCredential(ctx, in) + return srv.(ProfileAnonymousServer).GetProfileKeyCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName, + FullMethod: ProfileAnonymous_GetProfileKeyCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileAnonymousServer).GetExpiringProfileKeyCredential(ctx, req.(*GetExpiringProfileKeyCredentialAnonymousRequest)) + return srv.(ProfileAnonymousServer).GetProfileKeyCredential(ctx, req.(*GetProfileKeyCredentialRequest)) } return interceptor(ctx, in, info, handler) } @@ -548,8 +548,8 @@ var ProfileAnonymous_ServiceDesc = grpc.ServiceDesc{ Handler: _ProfileAnonymous_GetProfile_Handler, }, { - MethodName: "GetExpiringProfileKeyCredential", - Handler: _ProfileAnonymous_GetExpiringProfileKeyCredential_Handler, + MethodName: "GetProfileKeyCredential", + Handler: _ProfileAnonymous_GetProfileKeyCredential_Handler, }, { MethodName: "GetAvatarUploadForm", diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go index e08d9a9..b6d0e2b 100644 --- a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go +++ b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go @@ -1785,7 +1785,7 @@ func (*SetIapSubscriptionResponse_PaymentRequired) isSetIapSubscriptionResponse_ func (*SetIapSubscriptionResponse_InvalidTransaction) isSetIapSubscriptionResponse_Response() {} -type GetReceiptCredentialsRequest struct { +type GetReceiptCredentialRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` ReceiptCredentialRequest []byte `protobuf:"bytes,2,opt,name=receiptCredentialRequest,proto3" json:"receiptCredentialRequest,omitempty"` @@ -1793,20 +1793,20 @@ type GetReceiptCredentialsRequest struct { sizeCache protoimpl.SizeCache } -func (x *GetReceiptCredentialsRequest) Reset() { - *x = GetReceiptCredentialsRequest{} +func (x *GetReceiptCredentialRequest) Reset() { + *x = GetReceiptCredentialRequest{} mi := &file_org_signal_chat_subscriptions_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetReceiptCredentialsRequest) String() string { +func (x *GetReceiptCredentialRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetReceiptCredentialsRequest) ProtoMessage() {} +func (*GetReceiptCredentialRequest) ProtoMessage() {} -func (x *GetReceiptCredentialsRequest) ProtoReflect() protoreflect.Message { +func (x *GetReceiptCredentialRequest) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_subscriptions_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1818,53 +1818,53 @@ func (x *GetReceiptCredentialsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetReceiptCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetReceiptCredentialsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetReceiptCredentialRequest.ProtoReflect.Descriptor instead. +func (*GetReceiptCredentialRequest) Descriptor() ([]byte, []int) { return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{16} } -func (x *GetReceiptCredentialsRequest) GetSubscriberId() []byte { +func (x *GetReceiptCredentialRequest) GetSubscriberId() []byte { if x != nil { return x.SubscriberId } return nil } -func (x *GetReceiptCredentialsRequest) GetReceiptCredentialRequest() []byte { +func (x *GetReceiptCredentialRequest) GetReceiptCredentialRequest() []byte { if x != nil { return x.ReceiptCredentialRequest } return nil } -type GetReceiptCredentialsResponse struct { +type GetReceiptCredentialResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Response: // - // *GetReceiptCredentialsResponse_Success - // *GetReceiptCredentialsResponse_SubscriberNotFound - // *GetReceiptCredentialsResponse_NoPaidInvoice - // *GetReceiptCredentialsResponse_PaymentRequired - // *GetReceiptCredentialsResponse_AlreadyRedeemed - Response isGetReceiptCredentialsResponse_Response `protobuf_oneof:"response"` + // *GetReceiptCredentialResponse_Success + // *GetReceiptCredentialResponse_SubscriberNotFound + // *GetReceiptCredentialResponse_NoPaidInvoice + // *GetReceiptCredentialResponse_PaymentRequired + // *GetReceiptCredentialResponse_AlreadyRedeemed + Response isGetReceiptCredentialResponse_Response `protobuf_oneof:"response"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetReceiptCredentialsResponse) Reset() { - *x = GetReceiptCredentialsResponse{} +func (x *GetReceiptCredentialResponse) Reset() { + *x = GetReceiptCredentialResponse{} mi := &file_org_signal_chat_subscriptions_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetReceiptCredentialsResponse) String() string { +func (x *GetReceiptCredentialResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetReceiptCredentialsResponse) ProtoMessage() {} +func (*GetReceiptCredentialResponse) ProtoMessage() {} -func (x *GetReceiptCredentialsResponse) ProtoReflect() protoreflect.Message { +func (x *GetReceiptCredentialResponse) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_subscriptions_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1876,100 +1876,100 @@ func (x *GetReceiptCredentialsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetReceiptCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetReceiptCredentialsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetReceiptCredentialResponse.ProtoReflect.Descriptor instead. +func (*GetReceiptCredentialResponse) Descriptor() ([]byte, []int) { return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{17} } -func (x *GetReceiptCredentialsResponse) GetResponse() isGetReceiptCredentialsResponse_Response { +func (x *GetReceiptCredentialResponse) GetResponse() isGetReceiptCredentialResponse_Response { if x != nil { return x.Response } return nil } -func (x *GetReceiptCredentialsResponse) GetSuccess() *GetReceiptCredentialsResponse_GetReceiptCredentialsResult { +func (x *GetReceiptCredentialResponse) GetSuccess() *GetReceiptCredentialResponse_GetReceiptCredentialResult { if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_Success); ok { + if x, ok := x.Response.(*GetReceiptCredentialResponse_Success); ok { return x.Success } } return nil } -func (x *GetReceiptCredentialsResponse) GetSubscriberNotFound() *errors.NotFound { +func (x *GetReceiptCredentialResponse) GetSubscriberNotFound() *errors.NotFound { if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_SubscriberNotFound); ok { + if x, ok := x.Response.(*GetReceiptCredentialResponse_SubscriberNotFound); ok { return x.SubscriberNotFound } } return nil } -func (x *GetReceiptCredentialsResponse) GetNoPaidInvoice() *errors.FailedPrecondition { +func (x *GetReceiptCredentialResponse) GetNoPaidInvoice() *errors.FailedPrecondition { if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_NoPaidInvoice); ok { + if x, ok := x.Response.(*GetReceiptCredentialResponse_NoPaidInvoice); ok { return x.NoPaidInvoice } } return nil } -func (x *GetReceiptCredentialsResponse) GetPaymentRequired() *PaymentRequired { +func (x *GetReceiptCredentialResponse) GetPaymentRequired() *PaymentRequired { if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_PaymentRequired); ok { + if x, ok := x.Response.(*GetReceiptCredentialResponse_PaymentRequired); ok { return x.PaymentRequired } } return nil } -func (x *GetReceiptCredentialsResponse) GetAlreadyRedeemed() *errors.FailedPrecondition { +func (x *GetReceiptCredentialResponse) GetAlreadyRedeemed() *errors.FailedPrecondition { if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_AlreadyRedeemed); ok { + if x, ok := x.Response.(*GetReceiptCredentialResponse_AlreadyRedeemed); ok { return x.AlreadyRedeemed } } return nil } -type isGetReceiptCredentialsResponse_Response interface { - isGetReceiptCredentialsResponse_Response() +type isGetReceiptCredentialResponse_Response interface { + isGetReceiptCredentialResponse_Response() } -type GetReceiptCredentialsResponse_Success struct { - Success *GetReceiptCredentialsResponse_GetReceiptCredentialsResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +type GetReceiptCredentialResponse_Success struct { + Success *GetReceiptCredentialResponse_GetReceiptCredentialResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` } -type GetReceiptCredentialsResponse_SubscriberNotFound struct { +type GetReceiptCredentialResponse_SubscriberNotFound struct { // The subscriber did not exist or it did not have an associated subscription SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` } -type GetReceiptCredentialsResponse_NoPaidInvoice struct { +type GetReceiptCredentialResponse_NoPaidInvoice struct { // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state NoPaidInvoice *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=no_paid_invoice,json=noPaidInvoice,proto3,oneof"` } -type GetReceiptCredentialsResponse_PaymentRequired struct { +type GetReceiptCredentialResponse_PaymentRequired struct { // Invoice is in any state other than 'draft', 'open', or 'paid'; Charge failure details may be present PaymentRequired *PaymentRequired `protobuf:"bytes,4,opt,name=payment_required,json=paymentRequired,proto3,oneof"` } -type GetReceiptCredentialsResponse_AlreadyRedeemed struct { +type GetReceiptCredentialResponse_AlreadyRedeemed struct { // Latest paid receipt on subscription was already redeemed for a receipt credential but with a different GetReceiptCredentialRequest AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"` } -func (*GetReceiptCredentialsResponse_Success) isGetReceiptCredentialsResponse_Response() {} +func (*GetReceiptCredentialResponse_Success) isGetReceiptCredentialResponse_Response() {} -func (*GetReceiptCredentialsResponse_SubscriberNotFound) isGetReceiptCredentialsResponse_Response() {} +func (*GetReceiptCredentialResponse_SubscriberNotFound) isGetReceiptCredentialResponse_Response() {} -func (*GetReceiptCredentialsResponse_NoPaidInvoice) isGetReceiptCredentialsResponse_Response() {} +func (*GetReceiptCredentialResponse_NoPaidInvoice) isGetReceiptCredentialResponse_Response() {} -func (*GetReceiptCredentialsResponse_PaymentRequired) isGetReceiptCredentialsResponse_Response() {} +func (*GetReceiptCredentialResponse_PaymentRequired) isGetReceiptCredentialResponse_Response() {} -func (*GetReceiptCredentialsResponse_AlreadyRedeemed) isGetReceiptCredentialsResponse_Response() {} +func (*GetReceiptCredentialResponse_AlreadyRedeemed) isGetReceiptCredentialResponse_Response() {} type GetSubscriptionInformationRequest struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2619,27 +2619,27 @@ func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) GetLevel() uint64 return 0 } -type GetReceiptCredentialsResponse_GetReceiptCredentialsResult struct { +type GetReceiptCredentialResponse_GetReceiptCredentialResult struct { state protoimpl.MessageState `protogen:"open.v1"` ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receiptCredentialResponse,proto3" json:"receiptCredentialResponse,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) Reset() { - *x = GetReceiptCredentialsResponse_GetReceiptCredentialsResult{} +func (x *GetReceiptCredentialResponse_GetReceiptCredentialResult) Reset() { + *x = GetReceiptCredentialResponse_GetReceiptCredentialResult{} mi := &file_org_signal_chat_subscriptions_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) String() string { +func (x *GetReceiptCredentialResponse_GetReceiptCredentialResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult) ProtoMessage() {} +func (*GetReceiptCredentialResponse_GetReceiptCredentialResult) ProtoMessage() {} -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) ProtoReflect() protoreflect.Message { +func (x *GetReceiptCredentialResponse_GetReceiptCredentialResult) ProtoReflect() protoreflect.Message { mi := &file_org_signal_chat_subscriptions_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2651,12 +2651,12 @@ func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use GetReceiptCredentialsResponse_GetReceiptCredentialsResult.ProtoReflect.Descriptor instead. -func (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult) Descriptor() ([]byte, []int) { +// Deprecated: Use GetReceiptCredentialResponse_GetReceiptCredentialResult.ProtoReflect.Descriptor instead. +func (*GetReceiptCredentialResponse_GetReceiptCredentialResult) Descriptor() ([]byte, []int) { return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{17, 0} } -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) GetReceiptCredentialResponse() []byte { +func (x *GetReceiptCredentialResponse_GetReceiptCredentialResult) GetReceiptCredentialResponse() []byte { if x != nil { return x.ReceiptCredentialResponse } @@ -2677,7 +2677,7 @@ type GetSubscriptionInformationResponse_Subscription struct { CancelAtPeriodEnd bool `protobuf:"varint,5,opt,name=cancel_at_period_end,json=cancelAtPeriodEnd,proto3" json:"cancel_at_period_end,omitempty"` // A three-letter ISO 4217 currency code for currency used in the subscription Currency string `protobuf:"bytes,6,opt,name=currency,proto3" json:"currency,omitempty"` - // The amount paid for the subscription in the currency's smallest unit + // The amount paid for the subscription in the currency's minor unit Amount uint64 `protobuf:"varint,7,opt,name=amount,proto3" json:"amount,omitempty"` // The subscription's status, mapped to Stripe's statuses. trialing will never be returned Status SubscriptionStatus `protobuf:"varint,8,opt,name=status,proto3,enum=org.signal.chat.purchase.SubscriptionStatus" json:"status,omitempty"` @@ -2926,17 +2926,17 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "\x18SetIapSubscriptionResult\x12\x14\n" + "\x05level\x18\x01 \x01(\x04R\x05levelB\n" + "\n" + - "\bresponse\"\x8c\x01\n" + - "\x1cGetReceiptCredentialsRequest\x12)\n" + + "\bresponse\"\x8b\x01\n" + + "\x1bGetReceiptCredentialRequest\x12)\n" + "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12A\n" + - "\x18receiptCredentialRequest\x18\x02 \x01(\fB\x05\xa2\x97\"\x01aR\x18receiptCredentialRequest\"\xb1\x05\n" + - "\x1dGetReceiptCredentialsResponse\x12o\n" + - "\asuccess\x18\x01 \x01(\v2S.org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResultH\x00R\asuccess\x12n\n" + + "\x18receiptCredentialRequest\x18\x02 \x01(\fB\x05\xa2\x97\"\x01aR\x18receiptCredentialRequest\"\xad\x05\n" + + "\x1cGetReceiptCredentialResponse\x12m\n" + + "\asuccess\x18\x01 \x01(\v2Q.org.signal.chat.purchase.GetReceiptCredentialResponse.GetReceiptCredentialResultH\x00R\asuccess\x12n\n" + "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12i\n" + "\x0fno_paid_invoice\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0fno_paid_invoiceH\x00R\rnoPaidInvoice\x12l\n" + "\x10payment_required\x18\x04 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12m\n" + - "\x10already_redeemed\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemed\x1a[\n" + - "\x1bGetReceiptCredentialsResult\x12<\n" + + "\x10already_redeemed\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemed\x1aZ\n" + + "\x1aGetReceiptCredentialResult\x12<\n" + "\x19receiptCredentialResponse\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + "\n" + "\bresponse\"N\n" + @@ -2991,7 +2991,7 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "\x1aSUBSCRIPTION_STATUS_UNPAID\x10\x05*U\n" + "\x10BankTransferType\x12\x1e\n" + "\x1aBANK_TRANSFER_TYPE_UNKNOWN\x10\x00\x12!\n" + - "\x1dBANK_TRANSFER_TYPE_SEPA_DEBIT\x10\x012\xf0\n" + + "\x1dBANK_TRANSFER_TYPE_SEPA_DEBIT\x10\x012\xed\n" + "\n" + "\rSubscriptions\x12{\n" + "\x10UpdateSubscriber\x121.org.signal.chat.purchase.UpdateSubscriberRequest\x1a2.org.signal.chat.purchase.UpdateSubscriberResponse\"\x00\x12{\n" + @@ -3000,8 +3000,8 @@ const file_org_signal_chat_subscriptions_proto_rawDesc = "" + "\x19CreatePayPalPaymentMethod\x12:.org.signal.chat.purchase.CreatePayPalPaymentMethodRequest\x1a;.org.signal.chat.purchase.CreatePayPalPaymentMethodResponse\"\x00\x12\x90\x01\n" + "\x17SetDefaultPaymentMethod\x128.org.signal.chat.purchase.SetDefaultPaymentMethodRequest\x1a9.org.signal.chat.purchase.SetDefaultPaymentMethodResponse\"\x00\x12\x87\x01\n" + "\x14SetSubscriptionLevel\x125.org.signal.chat.purchase.SetSubscriptionLevelRequest\x1a6.org.signal.chat.purchase.SetSubscriptionLevelResponse\"\x00\x12\x99\x01\n" + - "\x1aGetSubscriptionInformation\x12;.org.signal.chat.purchase.GetSubscriptionInformationRequest\x1a<.org.signal.chat.purchase.GetSubscriptionInformationResponse\"\x00\x12\x8a\x01\n" + - "\x15GetReceiptCredentials\x126.org.signal.chat.purchase.GetReceiptCredentialsRequest\x1a7.org.signal.chat.purchase.GetReceiptCredentialsResponse\"\x00\x12\x81\x01\n" + + "\x1aGetSubscriptionInformation\x12;.org.signal.chat.purchase.GetSubscriptionInformationRequest\x1a<.org.signal.chat.purchase.GetSubscriptionInformationResponse\"\x00\x12\x87\x01\n" + + "\x14GetReceiptCredential\x125.org.signal.chat.purchase.GetReceiptCredentialRequest\x1a6.org.signal.chat.purchase.GetReceiptCredentialResponse\"\x00\x12\x81\x01\n" + "\x12SetIapSubscription\x123.org.signal.chat.purchase.SetIapSubscriptionRequest\x1a4.org.signal.chat.purchase.SetIapSubscriptionResponse\"\x00\x12u\n" + "\x0eGetBankMandate\x12/.org.signal.chat.purchase.GetBankMandateRequest\x1a0.org.signal.chat.purchase.GetBankMandateResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" @@ -3040,8 +3040,8 @@ var file_org_signal_chat_subscriptions_proto_goTypes = []any{ (*SetSubscriptionLevelResponse)(nil), // 17: org.signal.chat.purchase.SetSubscriptionLevelResponse (*SetIapSubscriptionRequest)(nil), // 18: org.signal.chat.purchase.SetIapSubscriptionRequest (*SetIapSubscriptionResponse)(nil), // 19: org.signal.chat.purchase.SetIapSubscriptionResponse - (*GetReceiptCredentialsRequest)(nil), // 20: org.signal.chat.purchase.GetReceiptCredentialsRequest - (*GetReceiptCredentialsResponse)(nil), // 21: org.signal.chat.purchase.GetReceiptCredentialsResponse + (*GetReceiptCredentialRequest)(nil), // 20: org.signal.chat.purchase.GetReceiptCredentialRequest + (*GetReceiptCredentialResponse)(nil), // 21: org.signal.chat.purchase.GetReceiptCredentialResponse (*GetSubscriptionInformationRequest)(nil), // 22: org.signal.chat.purchase.GetSubscriptionInformationRequest (*GetSubscriptionInformationResponse)(nil), // 23: org.signal.chat.purchase.GetSubscriptionInformationResponse (*GetBankMandateRequest)(nil), // 24: org.signal.chat.purchase.GetBankMandateRequest @@ -3055,7 +3055,7 @@ var file_org_signal_chat_subscriptions_proto_goTypes = []any{ (*SetIapSubscriptionRequest_AppStorePurchase)(nil), // 32: org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchase (*SetIapSubscriptionRequest_PlayBillingPurchase)(nil), // 33: org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchase (*SetIapSubscriptionResponse_SetIapSubscriptionResult)(nil), // 34: org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResult - (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult)(nil), // 35: org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult + (*GetReceiptCredentialResponse_GetReceiptCredentialResult)(nil), // 35: org.signal.chat.purchase.GetReceiptCredentialResponse.GetReceiptCredentialResult (*GetSubscriptionInformationResponse_Subscription)(nil), // 36: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription (*emptypb.Empty)(nil), // 37: google.protobuf.Empty (*errors.FailedZkAuthentication)(nil), // 38: org.signal.chat.errors.FailedZkAuthentication @@ -3102,11 +3102,11 @@ var file_org_signal_chat_subscriptions_proto_depIdxs = []int32{ 40, // 36: org.signal.chat.purchase.SetIapSubscriptionResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition 40, // 37: org.signal.chat.purchase.SetIapSubscriptionResponse.payment_required:type_name -> org.signal.chat.errors.FailedPrecondition 40, // 38: org.signal.chat.purchase.SetIapSubscriptionResponse.invalid_transaction:type_name -> org.signal.chat.errors.FailedPrecondition - 35, // 39: org.signal.chat.purchase.GetReceiptCredentialsResponse.success:type_name -> org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult - 39, // 40: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 40, // 41: org.signal.chat.purchase.GetReceiptCredentialsResponse.no_paid_invoice:type_name -> org.signal.chat.errors.FailedPrecondition - 16, // 42: org.signal.chat.purchase.GetReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired - 40, // 43: org.signal.chat.purchase.GetReceiptCredentialsResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition + 35, // 39: org.signal.chat.purchase.GetReceiptCredentialResponse.success:type_name -> org.signal.chat.purchase.GetReceiptCredentialResponse.GetReceiptCredentialResult + 39, // 40: org.signal.chat.purchase.GetReceiptCredentialResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound + 40, // 41: org.signal.chat.purchase.GetReceiptCredentialResponse.no_paid_invoice:type_name -> org.signal.chat.errors.FailedPrecondition + 16, // 42: org.signal.chat.purchase.GetReceiptCredentialResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired + 40, // 43: org.signal.chat.purchase.GetReceiptCredentialResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition 36, // 44: org.signal.chat.purchase.GetSubscriptionInformationResponse.success:type_name -> org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription 37, // 45: org.signal.chat.purchase.GetSubscriptionInformationResponse.no_subscription:type_name -> google.protobuf.Empty 39, // 46: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound @@ -3123,7 +3123,7 @@ var file_org_signal_chat_subscriptions_proto_depIdxs = []int32{ 12, // 57: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:input_type -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest 14, // 58: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:input_type -> org.signal.chat.purchase.SetSubscriptionLevelRequest 22, // 59: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:input_type -> org.signal.chat.purchase.GetSubscriptionInformationRequest - 20, // 60: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:input_type -> org.signal.chat.purchase.GetReceiptCredentialsRequest + 20, // 60: org.signal.chat.purchase.Subscriptions.GetReceiptCredential:input_type -> org.signal.chat.purchase.GetReceiptCredentialRequest 18, // 61: org.signal.chat.purchase.Subscriptions.SetIapSubscription:input_type -> org.signal.chat.purchase.SetIapSubscriptionRequest 24, // 62: org.signal.chat.purchase.Subscriptions.GetBankMandate:input_type -> org.signal.chat.purchase.GetBankMandateRequest 5, // 63: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:output_type -> org.signal.chat.purchase.UpdateSubscriberResponse @@ -3133,7 +3133,7 @@ var file_org_signal_chat_subscriptions_proto_depIdxs = []int32{ 13, // 67: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:output_type -> org.signal.chat.purchase.SetDefaultPaymentMethodResponse 17, // 68: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:output_type -> org.signal.chat.purchase.SetSubscriptionLevelResponse 23, // 69: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:output_type -> org.signal.chat.purchase.GetSubscriptionInformationResponse - 21, // 70: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:output_type -> org.signal.chat.purchase.GetReceiptCredentialsResponse + 21, // 70: org.signal.chat.purchase.Subscriptions.GetReceiptCredential:output_type -> org.signal.chat.purchase.GetReceiptCredentialResponse 19, // 71: org.signal.chat.purchase.Subscriptions.SetIapSubscription:output_type -> org.signal.chat.purchase.SetIapSubscriptionResponse 25, // 72: org.signal.chat.purchase.Subscriptions.GetBankMandate:output_type -> org.signal.chat.purchase.GetBankMandateResponse 63, // [63:73] is the sub-list for method output_type @@ -3205,11 +3205,11 @@ func file_org_signal_chat_subscriptions_proto_init() { (*SetIapSubscriptionResponse_InvalidTransaction)(nil), } file_org_signal_chat_subscriptions_proto_msgTypes[17].OneofWrappers = []any{ - (*GetReceiptCredentialsResponse_Success)(nil), - (*GetReceiptCredentialsResponse_SubscriberNotFound)(nil), - (*GetReceiptCredentialsResponse_NoPaidInvoice)(nil), - (*GetReceiptCredentialsResponse_PaymentRequired)(nil), - (*GetReceiptCredentialsResponse_AlreadyRedeemed)(nil), + (*GetReceiptCredentialResponse_Success)(nil), + (*GetReceiptCredentialResponse_SubscriberNotFound)(nil), + (*GetReceiptCredentialResponse_NoPaidInvoice)(nil), + (*GetReceiptCredentialResponse_PaymentRequired)(nil), + (*GetReceiptCredentialResponse_AlreadyRedeemed)(nil), } file_org_signal_chat_subscriptions_proto_msgTypes[19].OneofWrappers = []any{ (*GetSubscriptionInformationResponse_Success)(nil), diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go index 9b2c3b9..8e7bf69 100644 --- a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go +++ b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go @@ -30,7 +30,7 @@ const ( Subscriptions_SetDefaultPaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetDefaultPaymentMethod" Subscriptions_SetSubscriptionLevel_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetSubscriptionLevel" Subscriptions_GetSubscriptionInformation_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetSubscriptionInformation" - Subscriptions_GetReceiptCredentials_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetReceiptCredentials" + Subscriptions_GetReceiptCredential_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetReceiptCredential" Subscriptions_SetIapSubscription_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetIapSubscription" Subscriptions_GetBankMandate_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetBankMandate" ) @@ -81,7 +81,7 @@ type SubscriptionsClient interface { // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same - // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. + // ReceiptCredentialRequest MUST NOT be used again to request a receipt credential. // // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the @@ -91,7 +91,7 @@ type SubscriptionsClient interface { // cannot be redeemed. // // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. - GetReceiptCredentials(ctx context.Context, in *GetReceiptCredentialsRequest, opts ...grpc.CallOption) (*GetReceiptCredentialsResponse, error) + GetReceiptCredential(ctx context.Context, in *GetReceiptCredentialRequest, opts ...grpc.CallOption) (*GetReceiptCredentialResponse, error) // Set a token that represents an IAP subscription made with App Store/Google Play Billing. // // To set up an App Store subscription: @@ -99,7 +99,7 @@ type SubscriptionsClient interface { // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store // directly via StoreKit and obtain a originalTransactionId. // 3. Call this RPC with the originalTransactionId - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the // entitlement // // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. @@ -110,7 +110,7 @@ type SubscriptionsClient interface { // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) // the purchaseToken. // 3. Call this RPC with the purchaseToken - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the // entitlement // // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling @@ -206,10 +206,10 @@ func (c *subscriptionsClient) GetSubscriptionInformation(ctx context.Context, in return out, nil } -func (c *subscriptionsClient) GetReceiptCredentials(ctx context.Context, in *GetReceiptCredentialsRequest, opts ...grpc.CallOption) (*GetReceiptCredentialsResponse, error) { +func (c *subscriptionsClient) GetReceiptCredential(ctx context.Context, in *GetReceiptCredentialRequest, opts ...grpc.CallOption) (*GetReceiptCredentialResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetReceiptCredentialsResponse) - err := c.cc.Invoke(ctx, Subscriptions_GetReceiptCredentials_FullMethodName, in, out, cOpts...) + out := new(GetReceiptCredentialResponse) + err := c.cc.Invoke(ctx, Subscriptions_GetReceiptCredential_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -282,7 +282,7 @@ type SubscriptionsServer interface { // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same - // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. + // ReceiptCredentialRequest MUST NOT be used again to request a receipt credential. // // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the @@ -292,7 +292,7 @@ type SubscriptionsServer interface { // cannot be redeemed. // // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. - GetReceiptCredentials(context.Context, *GetReceiptCredentialsRequest) (*GetReceiptCredentialsResponse, error) + GetReceiptCredential(context.Context, *GetReceiptCredentialRequest) (*GetReceiptCredentialResponse, error) // Set a token that represents an IAP subscription made with App Store/Google Play Billing. // // To set up an App Store subscription: @@ -300,7 +300,7 @@ type SubscriptionsServer interface { // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store // directly via StoreKit and obtain a originalTransactionId. // 3. Call this RPC with the originalTransactionId - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the // entitlement // // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. @@ -311,7 +311,7 @@ type SubscriptionsServer interface { // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) // the purchaseToken. // 3. Call this RPC with the purchaseToken - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the + // 4. Obtain a receipt via GetReceiptCredential which can then be used to obtain the // entitlement // // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling @@ -358,8 +358,8 @@ func (UnimplementedSubscriptionsServer) SetSubscriptionLevel(context.Context, *S func (UnimplementedSubscriptionsServer) GetSubscriptionInformation(context.Context, *GetSubscriptionInformationRequest) (*GetSubscriptionInformationResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetSubscriptionInformation not implemented") } -func (UnimplementedSubscriptionsServer) GetReceiptCredentials(context.Context, *GetReceiptCredentialsRequest) (*GetReceiptCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetReceiptCredentials not implemented") +func (UnimplementedSubscriptionsServer) GetReceiptCredential(context.Context, *GetReceiptCredentialRequest) (*GetReceiptCredentialResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetReceiptCredential not implemented") } func (UnimplementedSubscriptionsServer) SetIapSubscription(context.Context, *SetIapSubscriptionRequest) (*SetIapSubscriptionResponse, error) { return nil, status.Error(codes.Unimplemented, "method SetIapSubscription not implemented") @@ -514,20 +514,20 @@ func _Subscriptions_GetSubscriptionInformation_Handler(srv interface{}, ctx cont return interceptor(ctx, in, info, handler) } -func _Subscriptions_GetReceiptCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetReceiptCredentialsRequest) +func _Subscriptions_GetReceiptCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReceiptCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubscriptionsServer).GetReceiptCredentials(ctx, in) + return srv.(SubscriptionsServer).GetReceiptCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Subscriptions_GetReceiptCredentials_FullMethodName, + FullMethod: Subscriptions_GetReceiptCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).GetReceiptCredentials(ctx, req.(*GetReceiptCredentialsRequest)) + return srv.(SubscriptionsServer).GetReceiptCredential(ctx, req.(*GetReceiptCredentialRequest)) } return interceptor(ctx, in, info, handler) } @@ -604,8 +604,8 @@ var Subscriptions_ServiceDesc = grpc.ServiceDesc{ Handler: _Subscriptions_GetSubscriptionInformation_Handler, }, { - MethodName: "GetReceiptCredentials", - Handler: _Subscriptions_GetReceiptCredentials_Handler, + MethodName: "GetReceiptCredential", + Handler: _Subscriptions_GetReceiptCredential_Handler, }, { MethodName: "SetIapSubscription", diff --git a/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go b/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go index d412d29..131bd84 100644 --- a/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go +++ b/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go @@ -172,21 +172,23 @@ const ( ManifestRecord_Identifier_CALL_LINK ManifestRecord_Identifier_Type = 7 ManifestRecord_Identifier_CHAT_FOLDER ManifestRecord_Identifier_Type = 8 ManifestRecord_Identifier_NOTIFICATION_PROFILE ManifestRecord_Identifier_Type = 9 + ManifestRecord_Identifier_FAVORITE_STICKER ManifestRecord_Identifier_Type = 11 ) // Enum value maps for ManifestRecord_Identifier_Type. var ( ManifestRecord_Identifier_Type_name = map[int32]string{ - 0: "UNKNOWN", - 1: "CONTACT", - 2: "GROUPV1", - 3: "GROUPV2", - 4: "ACCOUNT", - 5: "STORY_DISTRIBUTION_LIST", - 6: "STICKER_PACK", - 7: "CALL_LINK", - 8: "CHAT_FOLDER", - 9: "NOTIFICATION_PROFILE", + 0: "UNKNOWN", + 1: "CONTACT", + 2: "GROUPV1", + 3: "GROUPV2", + 4: "ACCOUNT", + 5: "STORY_DISTRIBUTION_LIST", + 6: "STICKER_PACK", + 7: "CALL_LINK", + 8: "CHAT_FOLDER", + 9: "NOTIFICATION_PROFILE", + 11: "FAVORITE_STICKER", } ManifestRecord_Identifier_Type_value = map[string]int32{ "UNKNOWN": 0, @@ -199,6 +201,7 @@ var ( "CALL_LINK": 7, "CHAT_FOLDER": 8, "NOTIFICATION_PROFILE": 9, + "FAVORITE_STICKER": 11, } ) @@ -539,7 +542,7 @@ func (x ChatFolderRecord_FolderType) Number() protoreflect.EnumNumber { // Deprecated: Use ChatFolderRecord_FolderType.Descriptor instead. func (ChatFolderRecord_FolderType) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17, 0} } type NotificationProfile_DayOfWeek int32 @@ -603,7 +606,7 @@ func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { // Deprecated: Use NotificationProfile_DayOfWeek.Descriptor instead. func (NotificationProfile_DayOfWeek) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{18, 0} } type StorageManifest struct { @@ -947,6 +950,7 @@ type StorageRecord struct { // *StorageRecord_CallLink // *StorageRecord_ChatFolder // *StorageRecord_NotificationProfile + // *StorageRecord_FavoriteSticker Record isStorageRecord_Record `protobuf_oneof:"record"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1070,6 +1074,15 @@ func (x *StorageRecord) GetNotificationProfile() *NotificationProfile { return nil } +func (x *StorageRecord) GetFavoriteSticker() *FavoriteStickerRecord { + if x != nil { + if x, ok := x.Record.(*StorageRecord_FavoriteSticker); ok { + return x.FavoriteSticker + } + } + return nil +} + type isStorageRecord_Record interface { isStorageRecord_Record() } @@ -1110,6 +1123,10 @@ type StorageRecord_NotificationProfile struct { NotificationProfile *NotificationProfile `protobuf:"bytes,9,opt,name=notificationProfile,proto3,oneof"` } +type StorageRecord_FavoriteSticker struct { + FavoriteSticker *FavoriteStickerRecord `protobuf:"bytes,11,opt,name=favoriteSticker,proto3,oneof"` +} + func (*StorageRecord_Contact) isStorageRecord_Record() {} func (*StorageRecord_GroupV1) isStorageRecord_Record() {} @@ -1128,6 +1145,8 @@ func (*StorageRecord_ChatFolder) isStorageRecord_Record() {} func (*StorageRecord_NotificationProfile) isStorageRecord_Record() {} +func (*StorageRecord_FavoriteSticker) isStorageRecord_Record() {} + type ContactRecord struct { state protoimpl.MessageState `protogen:"open.v1"` Aci string `protobuf:"bytes,1,opt,name=aci,proto3" json:"aci,omitempty"` @@ -2322,6 +2341,89 @@ func (x *StickerPackRecord) GetDeletedAtTimestamp() uint64 { return 0 } +type FavoriteStickerRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + PackId []byte `protobuf:"bytes,1,opt,name=packId,proto3" json:"packId,omitempty"` // 16 bytes + PackKey []byte `protobuf:"bytes,2,opt,name=packKey,proto3" json:"packKey,omitempty"` // 32 bytes, used to derive the AES-256 key + // aesKey = HKDF( + // + // input = packKey, + // salt = 32 zero bytes, + // info = "Sticker Pack" + // + // ) + StickerId uint32 `protobuf:"varint,3,opt,name=stickerId,proto3" json:"stickerId,omitempty"` + FavoritedAtTimestamp uint64 `protobuf:"varint,4,opt,name=favoritedAtTimestamp,proto3" json:"favoritedAtTimestamp,omitempty"` // Sorted by newest timestamp first. Can be mutated if sticker is reordered via 'Move to top' + DeletedAtTimestamp uint64 `protobuf:"varint,5,opt,name=deletedAtTimestamp,proto3" json:"deletedAtTimestamp,omitempty"` // Timestamp in milliseconds. When present and + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FavoriteStickerRecord) Reset() { + *x = FavoriteStickerRecord{} + mi := &file_signalpb_StorageService_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FavoriteStickerRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FavoriteStickerRecord) ProtoMessage() {} + +func (x *FavoriteStickerRecord) ProtoReflect() protoreflect.Message { + mi := &file_signalpb_StorageService_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FavoriteStickerRecord.ProtoReflect.Descriptor instead. +func (*FavoriteStickerRecord) Descriptor() ([]byte, []int) { + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{14} +} + +func (x *FavoriteStickerRecord) GetPackId() []byte { + if x != nil { + return x.PackId + } + return nil +} + +func (x *FavoriteStickerRecord) GetPackKey() []byte { + if x != nil { + return x.PackKey + } + return nil +} + +func (x *FavoriteStickerRecord) GetStickerId() uint32 { + if x != nil { + return x.StickerId + } + return 0 +} + +func (x *FavoriteStickerRecord) GetFavoritedAtTimestamp() uint64 { + if x != nil { + return x.FavoritedAtTimestamp + } + return 0 +} + +func (x *FavoriteStickerRecord) GetDeletedAtTimestamp() uint64 { + if x != nil { + return x.DeletedAtTimestamp + } + return 0 +} + type CallLinkRecord struct { state protoimpl.MessageState `protogen:"open.v1"` RootKey []byte `protobuf:"bytes,1,opt,name=rootKey,proto3" json:"rootKey,omitempty"` @@ -2333,7 +2435,7 @@ type CallLinkRecord struct { func (x *CallLinkRecord) Reset() { *x = CallLinkRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[14] + mi := &file_signalpb_StorageService_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2345,7 +2447,7 @@ func (x *CallLinkRecord) String() string { func (*CallLinkRecord) ProtoMessage() {} func (x *CallLinkRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[14] + mi := &file_signalpb_StorageService_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2358,7 +2460,7 @@ func (x *CallLinkRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use CallLinkRecord.ProtoReflect.Descriptor instead. func (*CallLinkRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{14} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{15} } func (x *CallLinkRecord) GetRootKey() []byte { @@ -2396,7 +2498,7 @@ type Recipient struct { func (x *Recipient) Reset() { *x = Recipient{} - mi := &file_signalpb_StorageService_proto_msgTypes[15] + mi := &file_signalpb_StorageService_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2408,7 +2510,7 @@ func (x *Recipient) String() string { func (*Recipient) ProtoMessage() {} func (x *Recipient) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[15] + mi := &file_signalpb_StorageService_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2421,7 +2523,7 @@ func (x *Recipient) ProtoReflect() protoreflect.Message { // Deprecated: Use Recipient.ProtoReflect.Descriptor instead. func (*Recipient) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{15} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16} } func (x *Recipient) GetIdentifier() isRecipient_Identifier { @@ -2499,7 +2601,7 @@ type ChatFolderRecord struct { func (x *ChatFolderRecord) Reset() { *x = ChatFolderRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[16] + mi := &file_signalpb_StorageService_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2511,7 +2613,7 @@ func (x *ChatFolderRecord) String() string { func (*ChatFolderRecord) ProtoMessage() {} func (x *ChatFolderRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[16] + mi := &file_signalpb_StorageService_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2524,7 +2626,7 @@ func (x *ChatFolderRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatFolderRecord.ProtoReflect.Descriptor instead. func (*ChatFolderRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17} } func (x *ChatFolderRecord) GetIdentifier() []byte { @@ -2625,7 +2727,7 @@ type NotificationProfile struct { func (x *NotificationProfile) Reset() { *x = NotificationProfile{} - mi := &file_signalpb_StorageService_proto_msgTypes[17] + mi := &file_signalpb_StorageService_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2637,7 +2739,7 @@ func (x *NotificationProfile) String() string { func (*NotificationProfile) ProtoMessage() {} func (x *NotificationProfile) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[17] + mi := &file_signalpb_StorageService_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2650,7 +2752,7 @@ func (x *NotificationProfile) ProtoReflect() protoreflect.Message { // Deprecated: Use NotificationProfile.ProtoReflect.Descriptor instead. func (*NotificationProfile) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{18} } func (x *NotificationProfile) GetId() []byte { @@ -2754,7 +2856,7 @@ type ManifestRecord_Identifier struct { func (x *ManifestRecord_Identifier) Reset() { *x = ManifestRecord_Identifier{} - mi := &file_signalpb_StorageService_proto_msgTypes[18] + mi := &file_signalpb_StorageService_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2766,7 +2868,7 @@ func (x *ManifestRecord_Identifier) String() string { func (*ManifestRecord_Identifier) ProtoMessage() {} func (x *ManifestRecord_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[18] + mi := &file_signalpb_StorageService_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2806,7 +2908,7 @@ type ContactRecord_Name struct { func (x *ContactRecord_Name) Reset() { *x = ContactRecord_Name{} - mi := &file_signalpb_StorageService_proto_msgTypes[19] + mi := &file_signalpb_StorageService_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2818,7 +2920,7 @@ func (x *ContactRecord_Name) String() string { func (*ContactRecord_Name) ProtoMessage() {} func (x *ContactRecord_Name) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[19] + mi := &file_signalpb_StorageService_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2863,7 +2965,7 @@ type AccountRecord_PinnedConversation struct { func (x *AccountRecord_PinnedConversation) Reset() { *x = AccountRecord_PinnedConversation{} - mi := &file_signalpb_StorageService_proto_msgTypes[20] + mi := &file_signalpb_StorageService_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2875,7 +2977,7 @@ func (x *AccountRecord_PinnedConversation) String() string { func (*AccountRecord_PinnedConversation) ProtoMessage() {} func (x *AccountRecord_PinnedConversation) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[20] + mi := &file_signalpb_StorageService_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2976,7 +3078,7 @@ type AccountRecord_UsernameLink struct { func (x *AccountRecord_UsernameLink) Reset() { *x = AccountRecord_UsernameLink{} - mi := &file_signalpb_StorageService_proto_msgTypes[21] + mi := &file_signalpb_StorageService_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2988,7 +3090,7 @@ func (x *AccountRecord_UsernameLink) String() string { func (*AccountRecord_UsernameLink) ProtoMessage() {} func (x *AccountRecord_UsernameLink) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[21] + mi := &file_signalpb_StorageService_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3039,7 +3141,7 @@ type AccountRecord_IAPSubscriberData struct { func (x *AccountRecord_IAPSubscriberData) Reset() { *x = AccountRecord_IAPSubscriberData{} - mi := &file_signalpb_StorageService_proto_msgTypes[22] + mi := &file_signalpb_StorageService_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3051,7 +3153,7 @@ func (x *AccountRecord_IAPSubscriberData) String() string { func (*AccountRecord_IAPSubscriberData) ProtoMessage() {} func (x *AccountRecord_IAPSubscriberData) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[22] + mi := &file_signalpb_StorageService_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3132,7 +3234,7 @@ type AccountRecord_NotificationProfileManualOverride struct { func (x *AccountRecord_NotificationProfileManualOverride) Reset() { *x = AccountRecord_NotificationProfileManualOverride{} - mi := &file_signalpb_StorageService_proto_msgTypes[23] + mi := &file_signalpb_StorageService_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3144,7 +3246,7 @@ func (x *AccountRecord_NotificationProfileManualOverride) String() string { func (*AccountRecord_NotificationProfileManualOverride) ProtoMessage() {} func (x *AccountRecord_NotificationProfileManualOverride) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[23] + mi := &file_signalpb_StorageService_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3214,7 +3316,7 @@ type AccountRecord_PinnedConversation_Contact struct { func (x *AccountRecord_PinnedConversation_Contact) Reset() { *x = AccountRecord_PinnedConversation_Contact{} - mi := &file_signalpb_StorageService_proto_msgTypes[24] + mi := &file_signalpb_StorageService_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3226,7 +3328,7 @@ func (x *AccountRecord_PinnedConversation_Contact) String() string { func (*AccountRecord_PinnedConversation_Contact) ProtoMessage() {} func (x *AccountRecord_PinnedConversation_Contact) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[24] + mi := &file_signalpb_StorageService_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3271,7 +3373,7 @@ type AccountRecord_PinnedConversation_ReleaseNotes struct { func (x *AccountRecord_PinnedConversation_ReleaseNotes) Reset() { *x = AccountRecord_PinnedConversation_ReleaseNotes{} - mi := &file_signalpb_StorageService_proto_msgTypes[25] + mi := &file_signalpb_StorageService_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3283,7 +3385,7 @@ func (x *AccountRecord_PinnedConversation_ReleaseNotes) String() string { func (*AccountRecord_PinnedConversation_ReleaseNotes) ProtoMessage() {} func (x *AccountRecord_PinnedConversation_ReleaseNotes) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[25] + mi := &file_signalpb_StorageService_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3310,7 +3412,7 @@ type AccountRecord_NotificationProfileManualOverride_ManuallyEnabled struct { func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) Reset() { *x = AccountRecord_NotificationProfileManualOverride_ManuallyEnabled{} - mi := &file_signalpb_StorageService_proto_msgTypes[26] + mi := &file_signalpb_StorageService_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3322,7 +3424,7 @@ func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) String func (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoMessage() {} func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[26] + mi := &file_signalpb_StorageService_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3363,7 +3465,7 @@ type Recipient_Contact struct { func (x *Recipient_Contact) Reset() { *x = Recipient_Contact{} - mi := &file_signalpb_StorageService_proto_msgTypes[27] + mi := &file_signalpb_StorageService_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3375,7 +3477,7 @@ func (x *Recipient_Contact) String() string { func (*Recipient_Contact) ProtoMessage() {} func (x *Recipient_Contact) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[27] + mi := &file_signalpb_StorageService_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3388,7 +3490,7 @@ func (x *Recipient_Contact) ProtoReflect() protoreflect.Message { // Deprecated: Use Recipient_Contact.ProtoReflect.Descriptor instead. func (*Recipient_Contact) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{15, 0} + return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16, 0} } func (x *Recipient_Contact) GetServiceId() string { @@ -3433,16 +3535,16 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "insertItem\x18\x02 \x03(\v2\x1a.signalservice.StorageItemR\n" + "insertItem\x12\x1c\n" + "\tdeleteKey\x18\x03 \x03(\fR\tdeleteKey\x12\x1a\n" + - "\bclearAll\x18\x04 \x01(\bR\bclearAll\"\xcf\x03\n" + + "\bclearAll\x18\x04 \x01(\bR\bclearAll\"\xe5\x03\n" + "\x0eManifestRecord\x12\x18\n" + "\aversion\x18\x01 \x01(\x04R\aversion\x12\"\n" + "\fsourceDevice\x18\x03 \x01(\rR\fsourceDevice\x12J\n" + "\videntifiers\x18\x02 \x03(\v2(.signalservice.ManifestRecord.IdentifierR\videntifiers\x12\x1c\n" + - "\trecordIkm\x18\x04 \x01(\fR\trecordIkm\x1a\x94\x02\n" + + "\trecordIkm\x18\x04 \x01(\fR\trecordIkm\x1a\xaa\x02\n" + "\n" + "Identifier\x12\x10\n" + "\x03raw\x18\x01 \x01(\fR\x03raw\x12A\n" + - "\x04type\x18\x02 \x01(\x0e2-.signalservice.ManifestRecord.Identifier.TypeR\x04type\"\xb0\x01\n" + + "\x04type\x18\x02 \x01(\x0e2-.signalservice.ManifestRecord.Identifier.TypeR\x04type\"\xc6\x01\n" + "\x04Type\x12\v\n" + "\aUNKNOWN\x10\x00\x12\v\n" + "\aCONTACT\x10\x01\x12\v\n" + @@ -3453,7 +3555,8 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\fSTICKER_PACK\x10\x06\x12\r\n" + "\tCALL_LINK\x10\a\x12\x0f\n" + "\vCHAT_FOLDER\x10\b\x12\x18\n" + - "\x14NOTIFICATION_PROFILE\x10\t\"\x83\x05\n" + + "\x14NOTIFICATION_PROFILE\x10\t\x12\x14\n" + + "\x10FAVORITE_STICKER\x10\v\"\xd5\x05\n" + "\rStorageRecord\x128\n" + "\acontact\x18\x01 \x01(\v2\x1c.signalservice.ContactRecordH\x00R\acontact\x128\n" + "\agroupV1\x18\x02 \x01(\v2\x1c.signalservice.GroupV1RecordH\x00R\agroupV1\x128\n" + @@ -3465,7 +3568,8 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\n" + "chatFolder\x18\b \x01(\v2\x1f.signalservice.ChatFolderRecordH\x00R\n" + "chatFolder\x12V\n" + - "\x13notificationProfile\x18\t \x01(\v2\".signalservice.NotificationProfileH\x00R\x13notificationProfileB\b\n" + + "\x13notificationProfile\x18\t \x01(\v2\".signalservice.NotificationProfileH\x00R\x13notificationProfile\x12P\n" + + "\x0ffavoriteSticker\x18\v \x01(\v2$.signalservice.FavoriteStickerRecordH\x00R\x0ffavoriteStickerB\b\n" + "\x06record\"\xee\n" + "\n" + "\rContactRecord\x12\x10\n" + @@ -3680,7 +3784,13 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\x06packId\x18\x01 \x01(\fR\x06packId\x12\x18\n" + "\apackKey\x18\x02 \x01(\fR\apackKey\x12\x1a\n" + "\bposition\x18\x03 \x01(\rR\bposition\x12.\n" + - "\x12deletedAtTimestamp\x18\x04 \x01(\x04R\x12deletedAtTimestamp\"\x88\x01\n" + + "\x12deletedAtTimestamp\x18\x04 \x01(\x04R\x12deletedAtTimestamp\"\xcb\x01\n" + + "\x15FavoriteStickerRecord\x12\x16\n" + + "\x06packId\x18\x01 \x01(\fR\x06packId\x12\x18\n" + + "\apackKey\x18\x02 \x01(\fR\apackKey\x12\x1c\n" + + "\tstickerId\x18\x03 \x01(\rR\tstickerId\x122\n" + + "\x14favoritedAtTimestamp\x18\x04 \x01(\x04R\x14favoritedAtTimestamp\x12.\n" + + "\x12deletedAtTimestamp\x18\x05 \x01(\x04R\x12deletedAtTimestamp\"\x88\x01\n" + "\x0eCallLinkRecord\x12\x18\n" + "\arootKey\x18\x01 \x01(\fR\arootKey\x12\"\n" + "\fadminPasskey\x18\x02 \x01(\fR\fadminPasskey\x122\n" + @@ -3779,7 +3889,7 @@ func file_signalpb_StorageService_proto_rawDescGZIP() []byte { } var file_signalpb_StorageService_proto_enumTypes = make([]protoimpl.EnumInfo, 10) -var file_signalpb_StorageService_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_signalpb_StorageService_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_signalpb_StorageService_proto_goTypes = []any{ (OptionalBool)(0), // 0: signalservice.OptionalBool (AvatarColor)(0), // 1: signalservice.AvatarColor @@ -3805,79 +3915,81 @@ var file_signalpb_StorageService_proto_goTypes = []any{ (*AccountRecord)(nil), // 21: signalservice.AccountRecord (*StoryDistributionListRecord)(nil), // 22: signalservice.StoryDistributionListRecord (*StickerPackRecord)(nil), // 23: signalservice.StickerPackRecord - (*CallLinkRecord)(nil), // 24: signalservice.CallLinkRecord - (*Recipient)(nil), // 25: signalservice.Recipient - (*ChatFolderRecord)(nil), // 26: signalservice.ChatFolderRecord - (*NotificationProfile)(nil), // 27: signalservice.NotificationProfile - (*ManifestRecord_Identifier)(nil), // 28: signalservice.ManifestRecord.Identifier - (*ContactRecord_Name)(nil), // 29: signalservice.ContactRecord.Name - (*AccountRecord_PinnedConversation)(nil), // 30: signalservice.AccountRecord.PinnedConversation - (*AccountRecord_UsernameLink)(nil), // 31: signalservice.AccountRecord.UsernameLink - (*AccountRecord_IAPSubscriberData)(nil), // 32: signalservice.AccountRecord.IAPSubscriberData - (*AccountRecord_NotificationProfileManualOverride)(nil), // 33: signalservice.AccountRecord.NotificationProfileManualOverride - (*AccountRecord_PinnedConversation_Contact)(nil), // 34: signalservice.AccountRecord.PinnedConversation.Contact - (*AccountRecord_PinnedConversation_ReleaseNotes)(nil), // 35: signalservice.AccountRecord.PinnedConversation.ReleaseNotes - (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled)(nil), // 36: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled - (*Recipient_Contact)(nil), // 37: signalservice.Recipient.Contact + (*FavoriteStickerRecord)(nil), // 24: signalservice.FavoriteStickerRecord + (*CallLinkRecord)(nil), // 25: signalservice.CallLinkRecord + (*Recipient)(nil), // 26: signalservice.Recipient + (*ChatFolderRecord)(nil), // 27: signalservice.ChatFolderRecord + (*NotificationProfile)(nil), // 28: signalservice.NotificationProfile + (*ManifestRecord_Identifier)(nil), // 29: signalservice.ManifestRecord.Identifier + (*ContactRecord_Name)(nil), // 30: signalservice.ContactRecord.Name + (*AccountRecord_PinnedConversation)(nil), // 31: signalservice.AccountRecord.PinnedConversation + (*AccountRecord_UsernameLink)(nil), // 32: signalservice.AccountRecord.UsernameLink + (*AccountRecord_IAPSubscriberData)(nil), // 33: signalservice.AccountRecord.IAPSubscriberData + (*AccountRecord_NotificationProfileManualOverride)(nil), // 34: signalservice.AccountRecord.NotificationProfileManualOverride + (*AccountRecord_PinnedConversation_Contact)(nil), // 35: signalservice.AccountRecord.PinnedConversation.Contact + (*AccountRecord_PinnedConversation_ReleaseNotes)(nil), // 36: signalservice.AccountRecord.PinnedConversation.ReleaseNotes + (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled)(nil), // 37: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled + (*Recipient_Contact)(nil), // 38: signalservice.Recipient.Contact } var file_signalpb_StorageService_proto_depIdxs = []int32{ 11, // 0: signalservice.StorageItems.items:type_name -> signalservice.StorageItem 10, // 1: signalservice.WriteOperation.manifest:type_name -> signalservice.StorageManifest 11, // 2: signalservice.WriteOperation.insertItem:type_name -> signalservice.StorageItem - 28, // 3: signalservice.ManifestRecord.identifiers:type_name -> signalservice.ManifestRecord.Identifier + 29, // 3: signalservice.ManifestRecord.identifiers:type_name -> signalservice.ManifestRecord.Identifier 17, // 4: signalservice.StorageRecord.contact:type_name -> signalservice.ContactRecord 18, // 5: signalservice.StorageRecord.groupV1:type_name -> signalservice.GroupV1Record 19, // 6: signalservice.StorageRecord.groupV2:type_name -> signalservice.GroupV2Record 21, // 7: signalservice.StorageRecord.account:type_name -> signalservice.AccountRecord 22, // 8: signalservice.StorageRecord.storyDistributionList:type_name -> signalservice.StoryDistributionListRecord 23, // 9: signalservice.StorageRecord.stickerPack:type_name -> signalservice.StickerPackRecord - 24, // 10: signalservice.StorageRecord.callLink:type_name -> signalservice.CallLinkRecord - 26, // 11: signalservice.StorageRecord.chatFolder:type_name -> signalservice.ChatFolderRecord - 27, // 12: signalservice.StorageRecord.notificationProfile:type_name -> signalservice.NotificationProfile - 3, // 13: signalservice.ContactRecord.identityState:type_name -> signalservice.ContactRecord.IdentityState - 29, // 14: signalservice.ContactRecord.nickname:type_name -> signalservice.ContactRecord.Name - 1, // 15: signalservice.ContactRecord.avatarColor:type_name -> signalservice.AvatarColor - 0, // 16: signalservice.ContactRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 17: signalservice.ContactRecord.showUnreadReminders:type_name -> signalservice.OptionalBool - 29, // 18: signalservice.ContactRecord.sharedName:type_name -> signalservice.ContactRecord.Name - 4, // 19: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode - 1, // 20: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor - 0, // 21: signalservice.GroupV2Record.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 22: signalservice.GroupV2Record.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool - 0, // 23: signalservice.GroupV2Record.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool - 0, // 24: signalservice.GroupV2Record.showUnreadReminders:type_name -> signalservice.OptionalBool - 6, // 25: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode - 30, // 26: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation - 20, // 27: signalservice.AccountRecord.payments:type_name -> signalservice.Payments - 0, // 28: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool - 31, // 29: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink - 32, // 30: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData - 1, // 31: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor - 33, // 32: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride - 5, // 33: signalservice.AccountRecord.unreadBadgeType:type_name -> signalservice.AccountRecord.UnreadBadgeType - 0, // 34: signalservice.AccountRecord.includeMutedChatsInBadge:type_name -> signalservice.OptionalBool - 0, // 35: signalservice.AccountRecord.reactionNotifications:type_name -> signalservice.OptionalBool - 0, // 36: signalservice.AccountRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 37: signalservice.AccountRecord.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool - 0, // 38: signalservice.AccountRecord.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool - 0, // 39: signalservice.AccountRecord.showUnreadReminders:type_name -> signalservice.OptionalBool - 0, // 40: signalservice.AccountRecord.notifyWhenContactJoins:type_name -> signalservice.OptionalBool - 37, // 41: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact - 8, // 42: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType - 25, // 43: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient - 25, // 44: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient - 25, // 45: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient - 9, // 46: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek - 2, // 47: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type - 34, // 48: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact - 35, // 49: signalservice.AccountRecord.PinnedConversation.releaseNotes:type_name -> signalservice.AccountRecord.PinnedConversation.ReleaseNotes - 7, // 50: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color - 36, // 51: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled - 52, // [52:52] is the sub-list for method output_type - 52, // [52:52] is the sub-list for method input_type - 52, // [52:52] is the sub-list for extension type_name - 52, // [52:52] is the sub-list for extension extendee - 0, // [0:52] is the sub-list for field type_name + 25, // 10: signalservice.StorageRecord.callLink:type_name -> signalservice.CallLinkRecord + 27, // 11: signalservice.StorageRecord.chatFolder:type_name -> signalservice.ChatFolderRecord + 28, // 12: signalservice.StorageRecord.notificationProfile:type_name -> signalservice.NotificationProfile + 24, // 13: signalservice.StorageRecord.favoriteSticker:type_name -> signalservice.FavoriteStickerRecord + 3, // 14: signalservice.ContactRecord.identityState:type_name -> signalservice.ContactRecord.IdentityState + 30, // 15: signalservice.ContactRecord.nickname:type_name -> signalservice.ContactRecord.Name + 1, // 16: signalservice.ContactRecord.avatarColor:type_name -> signalservice.AvatarColor + 0, // 17: signalservice.ContactRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 18: signalservice.ContactRecord.showUnreadReminders:type_name -> signalservice.OptionalBool + 30, // 19: signalservice.ContactRecord.sharedName:type_name -> signalservice.ContactRecord.Name + 4, // 20: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode + 1, // 21: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor + 0, // 22: signalservice.GroupV2Record.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 23: signalservice.GroupV2Record.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool + 0, // 24: signalservice.GroupV2Record.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool + 0, // 25: signalservice.GroupV2Record.showUnreadReminders:type_name -> signalservice.OptionalBool + 6, // 26: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode + 31, // 27: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation + 20, // 28: signalservice.AccountRecord.payments:type_name -> signalservice.Payments + 0, // 29: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool + 32, // 30: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink + 33, // 31: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData + 1, // 32: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor + 34, // 33: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride + 5, // 34: signalservice.AccountRecord.unreadBadgeType:type_name -> signalservice.AccountRecord.UnreadBadgeType + 0, // 35: signalservice.AccountRecord.includeMutedChatsInBadge:type_name -> signalservice.OptionalBool + 0, // 36: signalservice.AccountRecord.reactionNotifications:type_name -> signalservice.OptionalBool + 0, // 37: signalservice.AccountRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool + 0, // 38: signalservice.AccountRecord.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool + 0, // 39: signalservice.AccountRecord.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool + 0, // 40: signalservice.AccountRecord.showUnreadReminders:type_name -> signalservice.OptionalBool + 0, // 41: signalservice.AccountRecord.notifyWhenContactJoins:type_name -> signalservice.OptionalBool + 38, // 42: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact + 8, // 43: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType + 26, // 44: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient + 26, // 45: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient + 26, // 46: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient + 9, // 47: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek + 2, // 48: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type + 35, // 49: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact + 36, // 50: signalservice.AccountRecord.PinnedConversation.releaseNotes:type_name -> signalservice.AccountRecord.PinnedConversation.ReleaseNotes + 7, // 51: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color + 37, // 52: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled + 53, // [53:53] is the sub-list for method output_type + 53, // [53:53] is the sub-list for method input_type + 53, // [53:53] is the sub-list for extension type_name + 53, // [53:53] is the sub-list for extension extendee + 0, // [0:53] is the sub-list for field type_name } func init() { file_signalpb_StorageService_proto_init() } @@ -3895,27 +4007,28 @@ func file_signalpb_StorageService_proto_init() { (*StorageRecord_CallLink)(nil), (*StorageRecord_ChatFolder)(nil), (*StorageRecord_NotificationProfile)(nil), + (*StorageRecord_FavoriteSticker)(nil), } file_signalpb_StorageService_proto_msgTypes[7].OneofWrappers = []any{} file_signalpb_StorageService_proto_msgTypes[9].OneofWrappers = []any{} file_signalpb_StorageService_proto_msgTypes[11].OneofWrappers = []any{} - file_signalpb_StorageService_proto_msgTypes[15].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[16].OneofWrappers = []any{ (*Recipient_Contact_)(nil), (*Recipient_LegacyGroupId)(nil), (*Recipient_GroupMasterKey)(nil), } - file_signalpb_StorageService_proto_msgTypes[17].OneofWrappers = []any{} - file_signalpb_StorageService_proto_msgTypes[20].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[18].OneofWrappers = []any{} + file_signalpb_StorageService_proto_msgTypes[21].OneofWrappers = []any{ (*AccountRecord_PinnedConversation_Contact_)(nil), (*AccountRecord_PinnedConversation_LegacyGroupId)(nil), (*AccountRecord_PinnedConversation_GroupMasterKey)(nil), (*AccountRecord_PinnedConversation_ReleaseNotes_)(nil), } - file_signalpb_StorageService_proto_msgTypes[22].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[23].OneofWrappers = []any{ (*AccountRecord_IAPSubscriberData_PurchaseToken)(nil), (*AccountRecord_IAPSubscriberData_OriginalTransactionId)(nil), } - file_signalpb_StorageService_proto_msgTypes[23].OneofWrappers = []any{ + file_signalpb_StorageService_proto_msgTypes[24].OneofWrappers = []any{ (*AccountRecord_NotificationProfileManualOverride_DisabledAtTimestampMs)(nil), (*AccountRecord_NotificationProfileManualOverride_Enabled)(nil), } @@ -3925,7 +4038,7 @@ func file_signalpb_StorageService_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_StorageService_proto_rawDesc), len(file_signalpb_StorageService_proto_rawDesc)), NumEnums: 10, - NumMessages: 28, + NumMessages: 29, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/signalmeow/protobuf/signalpb/StorageService.proto b/pkg/signalmeow/protobuf/signalpb/StorageService.proto index 5d6b77f..7e63a91 100644 --- a/pkg/signalmeow/protobuf/signalpb/StorageService.proto +++ b/pkg/signalmeow/protobuf/signalpb/StorageService.proto @@ -53,6 +53,7 @@ message ManifestRecord { CALL_LINK = 7; CHAT_FOLDER = 8; NOTIFICATION_PROFILE = 9; + FAVORITE_STICKER = 11; } bytes raw = 1; @@ -77,6 +78,7 @@ message StorageRecord { CallLinkRecord callLink = 7; ChatFolderRecord chatFolder = 8; NotificationProfile notificationProfile = 9; + FavoriteStickerRecord favoriteSticker = 11; } } @@ -357,6 +359,21 @@ message StickerPackRecord { // be unset } +message FavoriteStickerRecord { // Can come from uninstalled packs so we must store all relevant information ourselves. If limit is exceeded (500), reject newest one. + bytes packId = 1; // 16 bytes + bytes packKey = 2; // 32 bytes, used to derive the AES-256 key + // aesKey = HKDF( + // input = packKey, + // salt = 32 zero bytes, + // info = "Sticker Pack" + // ) + uint32 stickerId = 3; + uint64 favoritedAtTimestamp = 4; // Sorted by newest timestamp first. Can be mutated if sticker is reordered via 'Move to top' + uint64 deletedAtTimestamp = 5; // Timestamp in milliseconds. When present and + // non-zero - `packKey`, and `favoritedAtTimestamp` should + // be unset +} + message CallLinkRecord { bytes rootKey = 1; bytes adminPasskey = 2; diff --git a/pkg/signalmeow/protobuf/update-protos.sh b/pkg/signalmeow/protobuf/update-protos.sh index 0c07e12..e06c318 100755 --- a/pkg/signalmeow/protobuf/update-protos.sh +++ b/pkg/signalmeow/protobuf/update-protos.sh @@ -2,7 +2,7 @@ cd $(dirname "$0") set -euo pipefail -ANDROID_GIT_REVISION=${1:-d8d36376f480eb4669efe8bfee94b2c196a9f7bd} +ANDROID_GIT_REVISION=${1:-ac1d5938947be53577de6052db55e2c35c41b85a} update_proto() { case "$1" in From e3b168e1d1100cbb7d319f36cf3ff2ca6ac000d8 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 15:19:45 +0300 Subject: [PATCH 14/84] libsignal: update to v0.105.0 --- pkg/libsignalgo/libsignal | 2 +- pkg/libsignalgo/libsignal-ffi.h | 53 +++++++++++++++++++++++- pkg/libsignalgo/signalversion/version.go | 2 +- 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/pkg/libsignalgo/libsignal b/pkg/libsignalgo/libsignal index e8cc2dd..4beb029 160000 --- a/pkg/libsignalgo/libsignal +++ b/pkg/libsignalgo/libsignal @@ -1 +1 @@ -Subproject commit e8cc2dddd578859b4a029c9c94670b24ce2b616a +Subproject commit 4beb029d8a941f81e7d9c6d8af1ed25a677569a8 diff --git a/pkg/libsignalgo/libsignal-ffi.h b/pkg/libsignalgo/libsignal-ffi.h index 6bf2a6e..b8cae20 100644 --- a/pkg/libsignalgo/libsignal-ffi.h +++ b/pkg/libsignalgo/libsignal-ffi.h @@ -2331,6 +2331,22 @@ static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfPairOfCStringPtrOw typedef SignalUuid* SignalType_MutPointer_SignalUuid; static_assert_64bit(sizeof(SignalType_MutPointer_SignalUuid) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalUuid) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray153_uint8_t_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_FixedArray153_uint8_t, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray153_uint8_t_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray153_uint8_t_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray153_uint8_t_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromisec_uchar153; +static_assert_64bit(offsetof(SignalCPromisec_uchar153, complete) == 0); +static_assert_64bit(offsetof(SignalCPromisec_uchar153, context) == 8); +static_assert_64bit(offsetof(SignalCPromisec_uchar153, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromisec_uchar153) == 24); +static_assert_64bit(alignof(SignalCPromisec_uchar153) == 8); +typedef SignalCPromisec_uchar153* SignalType_MutPointer_SignalCPromisec_uchar153; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisec_uchar153) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisec_uchar153) == 8); typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_FixedArray32_uint8_t, SignalType_ConstPointer_void); static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void) == 8); static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void) == 8); @@ -3593,6 +3609,7 @@ typedef enum { SignalErrorCodeMfaNotVerified = 236, SignalErrorCodeMfaKeyNotFound = 237, SignalErrorCodeWebAuthnRegistrationUnsuccessful = 238, + SignalErrorCodeProfileNotFound = 239, } SignalErrorCode; static_assert_64bit(sizeof(SignalErrorCode) == 4); static_assert_64bit(alignof(SignalErrorCode) == 4); @@ -3683,6 +3700,12 @@ static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_telemet static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_id_hash) == 192); static_assert_64bit(sizeof(SignalCallQualitySurveyInternalFfiArg) == 216); static_assert_64bit(alignof(SignalCallQualitySurveyInternalFfiArg) == 8); +typedef enum { + SignalLoginReceiptLevelFfiArgNormal, + SignalLoginReceiptLevelFfiArgSandbox, +} SignalLoginReceiptLevelFfiArg; +static_assert_64bit(sizeof(SignalLoginReceiptLevelFfiArg) == 4); +static_assert_64bit(alignof(SignalLoginReceiptLevelFfiArg) == 4); typedef enum { SignalPaymentProviderFfiArgGooglePlayBilling, SignalPaymentProviderFfiArgAppleAppStore, @@ -4001,6 +4024,14 @@ SignalFfiError* signal_authenticated_chat_connection_remove_mfa_key( SignalConstPointerAuthenticatedChatConnection chat, int32_t key_id ); +SignalFfiError* signal_authenticated_chat_connection_report_message( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + const SignalType_FixedArray17_uint8_t* source, + SignalUuid message_guid, + SignalBorrowedBuffer report_spam_token +); SignalFfiError* signal_authenticated_chat_connection_reserve_username_hash( SignalCPromisec_uchar32* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -4462,6 +4493,10 @@ SignalFfiError* signal_chat_connection_info_ip_version( uint8_t* out, SignalConstPointerChatConnectionInfo connection_info ); +SignalFfiError* signal_chat_connection_info_is_direct( + bool* out, + SignalConstPointerChatConnectionInfo connection_info +); SignalFfiError* signal_chat_connection_info_local_port( uint16_t* out, SignalConstPointerChatConnectionInfo connection_info @@ -6765,7 +6800,8 @@ SignalFfiError* signal_unauthenticated_chat_connection_create_login_receipt_cred const int8_t* purchase_identifier, SignalBorrowedBuffer receipt_credential_request_context, SignalConstPointerServerPublicParams server_params, - uint64_t purchase_time + uint64_t purchase_time, + SignalLoginReceiptLevelFfiArg expected_level ); SignalFfiError* signal_unauthenticated_chat_connection_destroy( SignalMutPointerUnauthenticatedChatConnection p @@ -6798,6 +6834,21 @@ SignalFfiError* signal_unauthenticated_chat_connection_get_pre_keys_unrestricted const SignalType_FixedArray17_uint8_t* target, int32_t device ); +SignalFfiError* signal_unauthenticated_chat_connection_get_profile_key_credential( + SignalCPromisec_uchar153* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerUnauthenticatedChatConnection chat, + const SignalType_FixedArray473_uint8_t* profile_key_request_context, + SignalConstPointerServerPublicParams server_params +); +SignalFfiError* signal_unauthenticated_chat_connection_get_subscription_receipt_credential( + SignalCPromiseOwnedBuffer* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerUnauthenticatedChatConnection chat, + const SignalType_FixedArray32_uint8_t* subscriber_id, + SignalBorrowedBuffer receipt_credential_request_context, + SignalConstPointerServerPublicParams server_params +); SignalFfiError* signal_unauthenticated_chat_connection_info( SignalMutPointerChatConnectionInfo* out, SignalConstPointerUnauthenticatedChatConnection chat diff --git a/pkg/libsignalgo/signalversion/version.go b/pkg/libsignalgo/signalversion/version.go index 0ae11dc..b935b64 100644 --- a/pkg/libsignalgo/signalversion/version.go +++ b/pkg/libsignalgo/signalversion/version.go @@ -2,4 +2,4 @@ package signalversion -const Version = "v0.103.1" +const Version = "v0.105.0" From d9ace4c552f4e550a513de2f1bc65c42e59e42e6 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 16:54:29 +0300 Subject: [PATCH 15/84] signalmeow: add support for phonenumberless accounts --- pkg/connector/handlematrix.go | 2 +- pkg/connector/handlesignal.go | 8 + pkg/connector/login.go | 3 +- pkg/libsignalgo/authcredential.go | 27 ++++ pkg/signalmeow/groups.go | 31 ++-- pkg/signalmeow/keys.go | 31 ++-- pkg/signalmeow/provisioning.go | 115 ++++++++------ pkg/signalmeow/sending.go | 3 +- pkg/signalmeow/store/container.go | 55 ++++--- pkg/signalmeow/store/device.go | 10 +- pkg/signalmeow/store/noop.go | 148 ++++++++++++++++++ pkg/signalmeow/store/upgrades/00-latest.sql | 5 +- .../upgrades/28-auth-credential-salt.sql | 2 + 13 files changed, 337 insertions(+), 103 deletions(-) create mode 100644 pkg/signalmeow/store/noop.go create mode 100644 pkg/signalmeow/store/upgrades/28-auth-credential-salt.sql diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 478c5a3..4e886c1 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -957,7 +957,7 @@ func (s *SignalClient) HandleMatrixAcceptMessageRequest(ctx context.Context, msg return fmt.Errorf("failed to get own profile key: %w", err) } var pniSig *signalpb.PniSignatureMessage - if s.Client.Store.AccountRecord.GetPhoneNumberSharingMode() == signalpb.AccountRecord_EVERYBODY { + if s.Client.Store.PNI != uuid.Nil && s.Client.Store.AccountRecord.GetPhoneNumberSharingMode() == signalpb.AccountRecord_EVERYBODY { sig, err := s.Client.Store.PNIIdentityKeyPair.SignAlternateIdentity(s.Client.Store.ACIIdentityKeyPair.GetIdentityKey()) if err != nil { return fmt.Errorf("failed to generate PNI signature: %w", err) diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index d59c5a6..2d3e65d 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -17,6 +17,7 @@ package connector import ( + "cmp" "context" "encoding/base64" "fmt" @@ -883,6 +884,13 @@ func (s *SignalClient) updateRemoteProfile(ctx context.Context, resendState bool } } changed := false + if s.Client.Store.AccountRecord != nil && s.Client.Store.AccountRecord.Username != s.UserLogin.RemoteProfile.Username { + s.UserLogin.RemoteProfile.Username = s.Client.Store.AccountRecord.Username + if s.Client.Store.PNI == uuid.Nil { + s.UserLogin.RemoteName = cmp.Or(s.Client.Store.AccountRecord.Username, s.Client.Store.ACI.String()) + } + changed = true + } if s.UserLogin.RemoteProfile.Name != s.Ghost.Name { s.UserLogin.RemoteProfile.Name = s.Ghost.Name changed = true diff --git a/pkg/connector/login.go b/pkg/connector/login.go index 60fb936..8c6bdab 100644 --- a/pkg/connector/login.go +++ b/pkg/connector/login.go @@ -17,6 +17,7 @@ package connector import ( + "cmp" "context" "errors" "fmt" @@ -220,7 +221,7 @@ func (qr *QRLogin) loginComplete(ctx context.Context, provData *store.DeviceData defer qr.cancelChan() ul, err := qr.User.NewLogin(ctx, &database.UserLogin{ ID: signalid.MakeUserLoginID(provData.ACI), - RemoteName: provData.Number, + RemoteName: cmp.Or(provData.Number, provData.ACI.String()), RemoteProfile: status.RemoteProfile{ Phone: provData.Number, }, diff --git a/pkg/libsignalgo/authcredential.go b/pkg/libsignalgo/authcredential.go index 0a1edfc..5b8ede5 100644 --- a/pkg/libsignalgo/authcredential.go +++ b/pkg/libsignalgo/authcredential.go @@ -68,6 +68,33 @@ func ReceiveAuthCredentialWithPni( return (*AuthCredentialWithPni)(resultBytes), nil } +func ReceiveAuthCredentialZKC( + serverPublicParams *ServerPublicParams, + aci uuid.UUID, + authCredentialSalt []byte, + redemptionTime uint64, + authCredResponse AuthCredentialWithPniResponse, +) (*AuthCredentialWithPni, error) { + var c_result C.SignalOwnedBuffer = C.SignalOwnedBuffer{} + + signalFfiError := C.signal_server_public_params_receive_auth_credential_zkc_without_pni( + &c_result, + C.SignalConstPointerServerPublicParams{serverPublicParams}, + NewACIServiceID(aci).cConstFixedArray(), + BytesToBuffer(authCredentialSalt), + C.uint64_t(redemptionTime), + BytesToBuffer(authCredResponse[:]), + ) + if signalFfiError != nil { + return nil, wrapError(signalFfiError) + } + resultBytes := CopySignalOwnedBufferToBytes(c_result) + if len(resultBytes) != AuthCredentialWithPniLength { + return nil, fmt.Errorf("invalid response length %d (expected %d)", len(resultBytes), AuthCredentialWithPniLength) + } + return (*AuthCredentialWithPni)(resultBytes), nil +} + func NewAuthCredentialWithPniResponse(b []byte) (*AuthCredentialWithPniResponse, error) { if len(b) != AuthCredentialWithPniResponseLength { return nil, fmt.Errorf("invalid auth credential with pni response length %d (expected %d)", len(b), AuthCredentialWithPniResponseLength) diff --git a/pkg/signalmeow/groups.go b/pkg/signalmeow/groups.go index cafe4d3..20a2821 100644 --- a/pkg/signalmeow/groups.go +++ b/pkg/signalmeow/groups.go @@ -328,7 +328,7 @@ func (cli *Client) fetchNewGroupCreds(ctx context.Context, today time.Time) (*Gr Str("action", "fetch new group creds"). Logger() sevenDaysOut := today.Add(7 * 24 * time.Hour) - path := fmt.Sprintf("/v1/certificate/auth/group?redemptionStartSeconds=%d&redemptionEndSeconds=%d&pniAsServiceId=true", today.Unix(), sevenDaysOut.Unix()) + path := fmt.Sprintf("/v1/certificate/auth/group?redemptionStartSeconds=%d&redemptionEndSeconds=%d&v101=true&zkcCredential=true", today.Unix(), sevenDaysOut.Unix()) resp, err := cli.AuthedWS.SendRequest(ctx, http.MethodGet, path, nil, nil) if err != nil { return nil, fmt.Errorf("SendRequest error: %w", err) @@ -367,14 +367,27 @@ func (cli *Client) GetAuthorizationForToday(ctx context.Context, masterKey libsi return nil, err } - // Receive the auth credential - authCredential, err := libsignalgo.ReceiveAuthCredentialWithPni( - prodServerPublicParams, - cli.Store.ACI, - cli.Store.PNI, - redemptionTime, - *authCredentialResponse, - ) + var authCredential *libsignalgo.AuthCredentialWithPni + if cli.Store.PNI == uuid.Nil { + if cli.Store.AuthCredentialSalt == nil { + return nil, fmt.Errorf("missing auth credential salt for pni-less receive") + } + authCredential, err = libsignalgo.ReceiveAuthCredentialZKC( + prodServerPublicParams, + cli.Store.ACI, + cli.Store.AuthCredentialSalt, + redemptionTime, + *authCredentialResponse, + ) + } else { + authCredential, err = libsignalgo.ReceiveAuthCredentialWithPni( + prodServerPublicParams, + cli.Store.ACI, + cli.Store.PNI, + redemptionTime, + *authCredentialResponse, + ) + } if err != nil { log.Err(err).Msg("ReceiveAuthCredentialWithPni error") return nil, err diff --git a/pkg/signalmeow/keys.go b/pkg/signalmeow/keys.go index 5439755..84a242a 100644 --- a/pkg/signalmeow/keys.go +++ b/pkg/signalmeow/keys.go @@ -27,6 +27,7 @@ import ( "strings" "time" + "github.com/google/uuid" "github.com/rs/zerolog" "go.mau.fi/mautrix-signal/pkg/libsignalgo" @@ -621,22 +622,24 @@ func (cli *Client) keyCheckLoop(ctx context.Context) { windowSize = 25 continue } - err = cli.CheckAndUploadNewPreKeys(ctx, cli.Store.PNIPreKeyStore) - if err != nil { - if errors.Is(err, errPrekeyUpload422) { - log.Err(err).Msg("Got 422 error while uploading PNI prekeys, deleting session") - disconnectErr := cli.ClearKeysAndDisconnect(ctx) - if disconnectErr != nil { - log.Err(disconnectErr).Msg("ClearKeysAndDisconnect error") + if cli.Store.PNI != uuid.Nil { + err = cli.CheckAndUploadNewPreKeys(ctx, cli.Store.PNIPreKeyStore) + if err != nil { + if errors.Is(err, errPrekeyUpload422) { + log.Err(err).Msg("Got 422 error while uploading PNI prekeys, deleting session") + disconnectErr := cli.ClearKeysAndDisconnect(ctx) + if disconnectErr != nil { + log.Err(disconnectErr).Msg("ClearKeysAndDisconnect error") + } + cli.handleEvent(&events.LoggedOut{Error: err}) + return } - cli.handleEvent(&events.LoggedOut{Error: err}) - return + log.Err(err).Msg("Error checking and uploading new prekeys for PNI identity") + // Retry within half an hour + windowStart = 5 + windowSize = 25 + continue } - log.Err(err).Msg("Error checking and uploading new prekeys for PNI identity") - // Retry within half an hour - windowStart = 5 - windowSize = 25 - continue } // After a successful check, check again in 36 to 60 hours windowStart = 36 * 60 diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index 8daf641..ea2c23f 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -125,25 +125,35 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev aciPublicKey := exerrors.Must(libsignalgo.DeserializePublicKey(provisioningMessage.GetAciIdentityKeyPublic())) aciPrivateKey := exerrors.Must(libsignalgo.DeserializePrivateKey(provisioningMessage.GetAciIdentityKeyPrivate())) aciIdentityKeyPair := exerrors.Must(libsignalgo.NewIdentityKeyPair(aciPublicKey, aciPrivateKey)) - pniPublicKey := exerrors.Must(libsignalgo.DeserializePublicKey(provisioningMessage.GetPniIdentityKeyPublic())) - pniPrivateKey := exerrors.Must(libsignalgo.DeserializePrivateKey(provisioningMessage.GetPniIdentityKeyPrivate())) - pniIdentityKeyPair := exerrors.Must(libsignalgo.NewIdentityKeyPair(pniPublicKey, pniPrivateKey)) profileKey := libsignalgo.ProfileKey(provisioningMessage.GetProfileKey()) - username := *provisioningMessage.Number password := random.String(22) code := provisioningMessage.ProvisioningCode aciRegistrationID := mrand.IntN(16383) + 1 - pniRegistrationID := mrand.IntN(16383) + 1 aciSignedPreKey := GenerateSignedPreKey(1, aciIdentityKeyPair) - pniSignedPreKey := GenerateSignedPreKey(1, pniIdentityKeyPair) aciPQLastResortPreKey := GenerateKyberPreKeys(1, 1, aciIdentityKeyPair)[0] - pniPQLastResortPreKey := GenerateKyberPreKeys(1, 1, pniIdentityKeyPair)[0] + var pniIdentityKeyPair *libsignalgo.IdentityKeyPair + var pniRegistrationID int + var pniSignedPreKey *libsignalgo.SignedPreKeyRecord + var pniPQLastResortPreKey *libsignalgo.KyberPreKeyRecord + var hasE164 bool + if provisioningMessage.GetPni() != "" { + hasE164 = true + + pniPublicKey := exerrors.Must(libsignalgo.DeserializePublicKey(provisioningMessage.GetPniIdentityKeyPublic())) + pniPrivateKey := exerrors.Must(libsignalgo.DeserializePrivateKey(provisioningMessage.GetPniIdentityKeyPrivate())) + pniIdentityKeyPair = exerrors.Must(libsignalgo.NewIdentityKeyPair(pniPublicKey, pniPrivateKey)) + + pniRegistrationID = mrand.IntN(16383) + 1 + pniSignedPreKey = GenerateSignedPreKey(1, pniIdentityKeyPair) + pniPQLastResortPreKey = GenerateKyberPreKeys(1, 1, pniIdentityKeyPair)[0] + } deviceResponse, err := confirmDevice( ctx, - username, + provisioningMessage.GetAci(), password, *code, + hasE164, aciRegistrationID, pniRegistrationID, aciSignedPreKey, @@ -172,7 +182,7 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev ACI: deviceResponse.ACI, PNI: deviceResponse.PNI, DeviceID: deviceId, - Number: *provisioningMessage.Number, + Number: provisioningMessage.GetNumber(), Password: password, AccountEntropyPool: libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()), EphemeralBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetEphemeralBackupKey()), @@ -204,7 +214,6 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev return } - // In case this is an existing device, we gotta clear out keys device.ClearDeviceKeys(ctx) // Store identity keys? @@ -216,22 +225,21 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev } return } - _, err = device.IdentityKeyStore.SaveIdentityKey(ctx, device.PNIServiceID(), device.PNIIdentityKeyPair.GetIdentityKey()) - if err != nil { - c <- ProvisioningResponse{ - State: StateProvisioningError, - Err: fmt.Errorf("error saving identity key: %w", err), + device.ACIPreKeyStore.StoreSignedPreKey(ctx, 1, aciSignedPreKey) + device.ACIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, aciPQLastResortPreKey) + if hasE164 { + _, err = device.IdentityKeyStore.SaveIdentityKey(ctx, device.PNIServiceID(), device.PNIIdentityKeyPair.GetIdentityKey()) + if err != nil { + c <- ProvisioningResponse{ + State: StateProvisioningError, + Err: fmt.Errorf("error saving identity key: %w", err), + } + return } - return + device.PNIPreKeyStore.StoreSignedPreKey(ctx, 1, pniSignedPreKey) + device.PNIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, pniPQLastResortPreKey) } - // Store signed prekeys (now that we have a device) - device.ACIPreKeyStore.StoreSignedPreKey(ctx, 1, aciSignedPreKey) - device.PNIPreKeyStore.StoreSignedPreKey(ctx, 1, pniSignedPreKey) - device.ACIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, aciPQLastResortPreKey) - device.PNIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, pniPQLastResortPreKey) - - // Store our profile key _, err = device.RecipientStore.LoadAndUpdateRecipient(ctx, data.ACI, data.PNI, func(recipient *types.Recipient) (bool, error) { recipient.E164 = data.Number recipient.Profile.Key = profileKey @@ -274,9 +282,9 @@ func startProvisioning(ctx context.Context, ws *websocket.Conn, provisioningCiph return "", fmt.Errorf("failed to unmarshal provisioning UUID: %w", err) } - linkCapabilities := []string{"backup5"} + linkCapabilities := []string{"backup5,nopni2"} if !allowBackup { - linkCapabilities = []string{} + linkCapabilities = []string{"nopni2"} } provisioningURL := (&url.URL{ Scheme: "sgnl", @@ -333,16 +341,18 @@ func continueProvisioning(ctx context.Context, ws *websocket.Conn, provisioningC return provisioningMessage, err } -var signalCapabilities = map[string]any{ - "attachmentBackfill": true, - "spqr": true, - "usernameChangeSyncMessage": true, +func getSignalCapabilities(phonenumberless bool) map[string]any { + return map[string]any{ + "attachmentBackfill": true, + "spqr": true, + "usernameChangeSyncMessage": true, + "optionalPhoneNumber": phonenumberless, + } } -var signalCapabilitiesBody = exerrors.Must(json.Marshal(signalCapabilities)) - func (cli *Client) RegisterCapabilities(ctx context.Context) error { - resp, err := cli.AuthedWS.SendRequest(ctx, http.MethodPut, "/v1/devices/capabilities", signalCapabilitiesBody, nil) + body := exerrors.Must(json.Marshal(getSignalCapabilities(cli.Store.PNI == uuid.Nil))) + resp, err := cli.AuthedWS.SendRequest(ctx, http.MethodPut, "/v1/devices/capabilities", body, nil) if err != nil { return err } @@ -362,6 +372,7 @@ func confirmDevice( username string, password string, code string, + hasE164 bool, aciRegistrationID int, pniRegistrationID int, aciSignedPreKey *libsignalgo.SignedPreKeyRecord, @@ -393,33 +404,33 @@ func confirmDevice( if err != nil { return nil, fmt.Errorf("failed to convert signed ACI prekey to JSON: %w", err) } - pniSignedPreKeyJson, err := SignedPreKeyToJSON(pniSignedPreKey) - if err != nil { - return nil, fmt.Errorf("failed to convert signed PNI prekey to JSON: %w", err) - } - aciPQLastResortPreKeyJson, err := KyberPreKeyToJSON(aciPQLastResortPreKey) if err != nil { return nil, fmt.Errorf("failed to convert ACI kyber last resort prekey to JSON: %w", err) } - pniPQLastResortPreKeyJson, err := KyberPreKeyToJSON(pniPQLastResortPreKey) - if err != nil { - return nil, fmt.Errorf("failed to convert PNI kyber last resort prekey to JSON: %w", err) - } + accountAttributes := map[string]any{ + "fetchesMessages": true, + "name": encryptedDeviceName, + "registrationId": aciRegistrationID, + "capabilities": getSignalCapabilities(!hasE164), + } data := map[string]any{ - "verificationCode": code, - "accountAttributes": map[string]any{ - "fetchesMessages": true, - "name": encryptedDeviceName, - "registrationId": aciRegistrationID, - "pniRegistrationId": pniRegistrationID, - "capabilities": signalCapabilities, - }, + "verificationCode": code, + "accountAttributes": accountAttributes, "aciSignedPreKey": aciSignedPreKeyJson, - "pniSignedPreKey": pniSignedPreKeyJson, "aciPqLastResortPreKey": aciPQLastResortPreKeyJson, - "pniPqLastResortPreKey": pniPQLastResortPreKeyJson, + } + if hasE164 { + accountAttributes["pniRegistrationId"] = pniRegistrationID + data["pniSignedPreKey"], err = SignedPreKeyToJSON(pniSignedPreKey) + if err != nil { + return nil, fmt.Errorf("failed to convert signed PNI prekey to JSON: %w", err) + } + data["pniPqLastResortPreKey"], err = KyberPreKeyToJSON(pniPQLastResortPreKey) + if err != nil { + return nil, fmt.Errorf("failed to convert PNI kyber last resort prekey to JSON: %w", err) + } } jsonBytes, err := json.Marshal(data) @@ -446,13 +457,13 @@ func confirmDevice( if err != nil { return nil, fmt.Errorf("failed to read from websocket after devices call: %w", err) } + zerolog.Ctx(ctx).Trace().Any("response", receivedMsg).Msg("Raw confirm device response") status := int(receivedMsg.GetResponse().GetStatus()) if status < 200 || status >= 300 { return nil, DeviceLinkError{StatusCode: status, Message: receivedMsg.GetResponse().GetMessage()} } - // unmarshal JSON response into ConfirmDeviceResponse deviceResp := ConfirmDeviceResponse{} err = json.Unmarshal(receivedMsg.Response.Body, &deviceResp) if err != nil { diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index 81e9842..868328f 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -743,7 +743,8 @@ func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.Serv if content.GetDataMessage().GetFlags() == uint32(signalpb.DataMessage_PROFILE_KEY_UPDATE) { recipientData.Whitelisted = ptr.Ptr(true) } - needsPNISignature := recipientID.Type == libsignalgo.ServiceIDTypeACI && recipientData.NeedsPNISignature + needsPNISignature := recipientID.Type == libsignalgo.ServiceIDTypeACI && recipientData.NeedsPNISignature && + cli.Store.PNI != uuid.Nil if needsPNISignature && !isTypingOrReceipt && content.PniSignatureMessage == nil { zerolog.Ctx(ctx).Debug(). Stringer("recipient", recipientID). diff --git a/pkg/signalmeow/store/container.go b/pkg/signalmeow/store/container.go index d1c670a..45da98f 100644 --- a/pkg/signalmeow/store/container.go +++ b/pkg/signalmeow/store/container.go @@ -38,7 +38,7 @@ SELECT aci_uuid, aci_identity_key_pair, registration_id, pni_uuid, pni_identity_key_pair, pni_registration_id, device_id, number, password, master_key, account_record, - account_entropy_pool, ephemeral_backup_key, media_root_backup_key + account_entropy_pool, ephemeral_backup_key, media_root_backup_key, auth_credential_salt FROM signalmeow_device ` @@ -58,7 +58,7 @@ func (c *Container) scanDevice(row dbutil.Scannable) (*Device, error) { &device.ACI, &aciIdentityKeyPair, &device.ACIRegistrationID, &device.PNI, &pniIdentityKeyPair, &device.PNIRegistrationID, &device.DeviceID, &device.Number, &device.Password, &device.MasterKey, &accountRecordBytes, - &accountEntropyPool, &ephemeralBackupKey, &mediaRootBackupKey, + &accountEntropyPool, &ephemeralBackupKey, &mediaRootBackupKey, &device.AuthCredentialSalt, ) if err != nil { return nil, fmt.Errorf("failed to scan session: %w", err) @@ -67,14 +67,13 @@ func (c *Container) scanDevice(row dbutil.Scannable) (*Device, error) { if err != nil { return nil, fmt.Errorf("failed to deserialize ACI identity key pair: %w", err) } - device.PNIIdentityKeyPair, err = libsignalgo.DeserializeIdentityKeyPair(pniIdentityKeyPair) - if err != nil { - return nil, fmt.Errorf("failed to deserialize PNI identity key pair: %w", err) - } if len(device.MasterKey) == 0 { device.MasterKey = nil } + if len(device.AuthCredentialSalt) == 0 { + device.AuthCredentialSalt = nil + } if len(accountRecordBytes) > 0 { device.AccountRecord = &signalpb.AccountRecord{} err = proto.Unmarshal(accountRecordBytes, device.AccountRecord) @@ -87,20 +86,31 @@ func (c *Container) scanDevice(row dbutil.Scannable) (*Device, error) { device.MediaRootBackupKey = libsignalgo.BytesToBackupKey(mediaRootBackupKey) baseStore := &sqlStore{Container: c, AccountID: device.ACI, blockCache: make(map[uuid.UUID]bool)} aciStore := &scopedSQLStore{Container: c, AccountID: device.ACI, ServiceID: device.ACIServiceID()} - pniStore := &scopedSQLStore{Container: c, AccountID: device.ACI, ServiceID: device.PNIServiceID()} device.ACIPreKeyStore = aciStore - device.PNIPreKeyStore = pniStore device.ACISessionStore = aciStore - device.PNISessionStore = pniStore device.ACIIdentityStore = &sqlIdentityStore{ sqlStore: baseStore, OwnKeyPair: device.ACIIdentityKeyPair, LocalRegistrationID: uint32(device.ACIRegistrationID), } - device.PNIIdentityStore = &sqlIdentityStore{ - sqlStore: baseStore, - OwnKeyPair: device.PNIIdentityKeyPair, - LocalRegistrationID: uint32(device.PNIRegistrationID), + if device.PNI != uuid.Nil { + pniStore := &scopedSQLStore{Container: c, AccountID: device.ACI, ServiceID: device.PNIServiceID()} + device.PNIIdentityKeyPair, err = libsignalgo.DeserializeIdentityKeyPair(pniIdentityKeyPair) + if err != nil { + return nil, fmt.Errorf("failed to deserialize PNI identity key pair: %w", err) + } + device.PNIPreKeyStore = pniStore + device.PNISessionStore = pniStore + device.PNIIdentityStore = &sqlIdentityStore{ + sqlStore: baseStore, + OwnKeyPair: device.PNIIdentityKeyPair, + LocalRegistrationID: uint32(device.PNIRegistrationID), + } + } else { + var errPNIlessAccount = fmt.Errorf("account %s has no PNI identity set", device.ACI) + device.PNIPreKeyStore = &noopStore{Error: errPNIlessAccount} + device.PNISessionStore = &noopStore{Error: errPNIlessAccount} + device.PNIIdentityStore = &noopStore{Error: errPNIlessAccount} } device.IdentityKeyStore = baseStore device.SenderKeyStore = baseStore @@ -156,9 +166,9 @@ const ( aci_uuid, aci_identity_key_pair, registration_id, pni_uuid, pni_identity_key_pair, pni_registration_id, device_id, number, password, master_key, account_record, - account_entropy_pool, ephemeral_backup_key, media_root_backup_key + account_entropy_pool, ephemeral_backup_key, media_root_backup_key, auth_credential_salt ) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) ON CONFLICT (aci_uuid) DO UPDATE SET aci_identity_key_pair=excluded.aci_identity_key_pair, registration_id=excluded.registration_id, @@ -172,7 +182,8 @@ const ( account_record=excluded.account_record, account_entropy_pool=excluded.account_entropy_pool, ephemeral_backup_key=excluded.ephemeral_backup_key, - media_root_backup_key=excluded.media_root_backup_key + media_root_backup_key=excluded.media_root_backup_key, + auth_credential_salt=excluded.auth_credential_salt ` deleteDeviceQuery = `DELETE FROM signalmeow_device WHERE aci_uuid=$1` ) @@ -190,10 +201,13 @@ func (c *Container) PutDevice(ctx context.Context, device *DeviceData) error { zerolog.Ctx(ctx).Err(err).Msg("failed to serialize aci identity key pair") return err } - pniIdentityKeyPair, err := device.PNIIdentityKeyPair.Serialize() - if err != nil { - zerolog.Ctx(ctx).Err(err).Msg("failed to serialize pni identity key pair") - return err + pniIdentityKeyPair := []byte{} + if device.PNIIdentityKeyPair != nil { + pniIdentityKeyPair, err = device.PNIIdentityKeyPair.Serialize() + if err != nil { + zerolog.Ctx(ctx).Err(err).Msg("failed to serialize pni identity key pair") + return err + } } var accountRecordBytes []byte if device.AccountRecord != nil { @@ -208,6 +222,7 @@ func (c *Container) PutDevice(ctx context.Context, device *DeviceData) error { device.DeviceID, device.Number, device.Password, device.MasterKey, accountRecordBytes, device.AccountEntropyPool, device.EphemeralBackupKey.Slice(), device.MediaRootBackupKey.Slice(), + device.AuthCredentialSalt, ) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("failed to insert device") diff --git a/pkg/signalmeow/store/device.go b/pkg/signalmeow/store/device.go index 3b6ebe5..64ee65f 100644 --- a/pkg/signalmeow/store/device.go +++ b/pkg/signalmeow/store/device.go @@ -44,6 +44,7 @@ type DeviceData struct { AccountEntropyPool libsignalgo.AccountEntropyPool EphemeralBackupKey *libsignalgo.BackupKey MediaRootBackupKey *libsignalgo.BackupKey + AuthCredentialSalt []byte } func (d *DeviceData) ACIServiceID() libsignalgo.ServiceID { @@ -51,6 +52,9 @@ func (d *DeviceData) ACIServiceID() libsignalgo.ServiceID { } func (d *DeviceData) PNIServiceID() libsignalgo.ServiceID { + if d.PNI == uuid.Nil { + return libsignalgo.EmptyServiceID + } return libsignalgo.NewPNIServiceID(d.PNI) } @@ -136,7 +140,7 @@ func (d *Device) ClearPassword(ctx context.Context) error { func (d *Device) PreKeyStore(serviceID libsignalgo.ServiceID) PreKeyStore { if serviceID == d.ACIServiceID() { return d.ACIPreKeyStore - } else if serviceID == d.PNIServiceID() { + } else if d.PNI != uuid.Nil && serviceID == d.PNIServiceID() { return d.PNIPreKeyStore } return nil @@ -145,7 +149,7 @@ func (d *Device) PreKeyStore(serviceID libsignalgo.ServiceID) PreKeyStore { func (d *Device) SessionStore(serviceID libsignalgo.ServiceID) SessionStore { if serviceID == d.ACIServiceID() { return d.ACISessionStore - } else if serviceID == d.PNIServiceID() { + } else if d.PNI != uuid.Nil && serviceID == d.PNIServiceID() { return d.PNISessionStore } return nil @@ -154,7 +158,7 @@ func (d *Device) SessionStore(serviceID libsignalgo.ServiceID) SessionStore { func (d *Device) IdentityStore(serviceID libsignalgo.ServiceID) libsignalgo.IdentityKeyStore { if serviceID == d.ACIServiceID() { return d.ACIIdentityStore - } else if serviceID == d.PNIServiceID() { + } else if d.PNI != uuid.Nil && serviceID == d.PNIServiceID() { return d.PNIIdentityStore } return nil diff --git a/pkg/signalmeow/store/noop.go b/pkg/signalmeow/store/noop.go new file mode 100644 index 0000000..1798a30 --- /dev/null +++ b/pkg/signalmeow/store/noop.go @@ -0,0 +1,148 @@ +// mautrix-signal - A Matrix-signal puppeting bridge. +// Copyright (C) 2026 Tulir Asokan +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package store + +import ( + "context" + + "go.mau.fi/mautrix-signal/pkg/libsignalgo" +) + +type noopStore struct { + Error error +} + +var _ PreKeyStore = (*noopStore)(nil) +var _ SessionStore = (*noopStore)(nil) +var _ IdentityKeyStore = (*noopStore)(nil) +var _ libsignalgo.IdentityKeyStore = (*noopStore)(nil) + +func (n *noopStore) LoadPreKey(ctx context.Context, id uint32) (*libsignalgo.PreKeyRecord, error) { + return nil, n.Error +} + +func (n *noopStore) StorePreKey(ctx context.Context, id uint32, preKeyRecord *libsignalgo.PreKeyRecord) error { + return n.Error +} + +func (n *noopStore) RemovePreKey(ctx context.Context, id uint32) error { + return n.Error +} + +func (n *noopStore) LoadSignedPreKey(ctx context.Context, id uint32) (*libsignalgo.SignedPreKeyRecord, error) { + return nil, n.Error +} + +func (n *noopStore) StoreSignedPreKey(ctx context.Context, id uint32, signedPreKeyRecord *libsignalgo.SignedPreKeyRecord) error { + return n.Error +} + +func (n *noopStore) LoadKyberPreKey(ctx context.Context, id uint32) (*libsignalgo.KyberPreKeyRecord, error) { + return nil, n.Error +} + +func (n *noopStore) StoreKyberPreKey(ctx context.Context, id uint32, kyberPreKeyRecord *libsignalgo.KyberPreKeyRecord) error { + return n.Error +} + +func (n *noopStore) MarkKyberPreKeyUsed(ctx context.Context, id uint32) error { + return n.Error +} + +func (n *noopStore) GetServiceID() libsignalgo.ServiceID { + return libsignalgo.EmptyServiceID +} + +func (n *noopStore) StoreLastResortKyberPreKey(ctx context.Context, preKeyID uint32, record *libsignalgo.KyberPreKeyRecord) error { + return n.Error +} + +func (n *noopStore) RemoveSignedPreKey(ctx context.Context, preKeyID uint32) error { + return n.Error +} + +func (n *noopStore) RemoveKyberPreKey(ctx context.Context, preKeyID uint32) error { + return n.Error +} + +func (n *noopStore) GetNextPreKeyID(ctx context.Context) (count, max uint32, err error) { + return 0, 0, n.Error +} + +func (n *noopStore) GetNextKyberPreKeyID(ctx context.Context) (count, max uint32, err error) { + return 0, 0, n.Error +} + +func (n *noopStore) IsKyberPreKeyLastResort(ctx context.Context, preKeyID uint32) (bool, error) { + return false, n.Error +} + +func (n *noopStore) AllPreKeys(ctx context.Context) ([]*libsignalgo.PreKeyRecord, error) { + return nil, n.Error +} + +func (n *noopStore) AllNormalKyberPreKeys(ctx context.Context) ([]*libsignalgo.KyberPreKeyRecord, error) { + return nil, n.Error +} + +func (n *noopStore) DeleteAllPreKeys(ctx context.Context) error { + return n.Error +} + +func (n *noopStore) LoadSession(ctx context.Context, address *libsignalgo.Address) (*libsignalgo.SessionRecord, error) { + return nil, n.Error +} + +func (n *noopStore) StoreSession(ctx context.Context, address *libsignalgo.Address, record *libsignalgo.SessionRecord) error { + return n.Error +} + +func (n *noopStore) AllSessionsForServiceID(ctx context.Context, theirID libsignalgo.ServiceID) ([]SessionAddressTuple, error) { + return nil, n.Error +} + +func (n *noopStore) RemoveSession(ctx context.Context, address *libsignalgo.Address) error { + return n.Error +} + +func (n *noopStore) RemoveAllSessionsForServiceID(ctx context.Context, theirID libsignalgo.ServiceID) error { + return n.Error +} + +func (n *noopStore) RemoveAllSessions(ctx context.Context) error { + return n.Error +} + +func (n *noopStore) SaveIdentityKey(ctx context.Context, theirServiceID libsignalgo.ServiceID, identityKey *libsignalgo.IdentityKey) (bool, error) { + return false, n.Error +} + +func (n *noopStore) GetIdentityKey(ctx context.Context, theirServiceID libsignalgo.ServiceID) (*libsignalgo.IdentityKey, error) { + return nil, n.Error +} + +func (n *noopStore) IsTrustedIdentity(ctx context.Context, theirServiceID libsignalgo.ServiceID, identityKey *libsignalgo.IdentityKey, direction libsignalgo.SignalDirection) (bool, error) { + return true, n.Error +} + +func (n *noopStore) GetIdentityKeyPair(ctx context.Context) (*libsignalgo.IdentityKeyPair, error) { + return nil, n.Error +} + +func (n *noopStore) GetLocalRegistrationID(ctx context.Context) (uint32, error) { + return 0, n.Error +} diff --git a/pkg/signalmeow/store/upgrades/00-latest.sql b/pkg/signalmeow/store/upgrades/00-latest.sql index fbb44ad..91f6967 100644 --- a/pkg/signalmeow/store/upgrades/00-latest.sql +++ b/pkg/signalmeow/store/upgrades/00-latest.sql @@ -1,4 +1,4 @@ --- v0 -> v27 (compatible with v13+): Latest revision +-- v0 -> v28 (compatible with v13+): Latest revision CREATE TABLE signalmeow_device ( aci_uuid TEXT PRIMARY KEY, @@ -17,7 +17,8 @@ CREATE TABLE signalmeow_device ( account_record bytea, account_entropy_pool TEXT, ephemeral_backup_key bytea, - media_root_backup_key bytea + media_root_backup_key bytea, + auth_credential_salt bytea ); CREATE TABLE signalmeow_pre_keys ( diff --git a/pkg/signalmeow/store/upgrades/28-auth-credential-salt.sql b/pkg/signalmeow/store/upgrades/28-auth-credential-salt.sql new file mode 100644 index 0000000..c0be4ac --- /dev/null +++ b/pkg/signalmeow/store/upgrades/28-auth-credential-salt.sql @@ -0,0 +1,2 @@ +-- v28 (compatible with v13+): Store auth credential salt for phonenumberless accounts +ALTER TABLE signalmeow_device ADD COLUMN auth_credential_salt bytea; From 18f645a05dfef94f5c74a5a4323f4f0018466aee Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 17:29:41 +0300 Subject: [PATCH 16/84] startchat,signalmeow,libsignalgo: add support for looking up usernames --- pkg/connector/capabilities.go | 2 +- pkg/connector/chatinfo.go | 109 ++++++++++++++++++++++++---------- pkg/libsignalgo/username.go | 49 +++++++++++++++ pkg/signalmeow/username.go | 96 ++++++++++++++++++++++++++++++ 4 files changed, 222 insertions(+), 34 deletions(-) create mode 100644 pkg/libsignalgo/username.go create mode 100644 pkg/signalmeow/username.go diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index 43e7b58..05c7e60 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -242,7 +242,7 @@ var signalGeneralCaps = &bridgev2.NetworkGeneralCapabilities{ ResolveIdentifier: bridgev2.ResolveIdentifierCapabilities{ CreateDM: true, LookupPhone: true, - LookupUsername: false, // TODO implement + LookupUsername: true, ContactList: true, }, GroupCreation: map[string]bridgev2.GroupTypeCapabilities{ diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index 11af872..7c0f80a 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -195,45 +195,88 @@ func (s *SignalClient) CreateChatWithGhost(ctx context.Context, ghost *bridgev2. return resp.Chat, nil } +func (s *SignalClient) resolvePhone(ctx context.Context, number string) (aci, pni uuid.UUID, e164Number uint64, recipient *types.Recipient, err error) { + number, err = bridgev2.CleanPhoneNumber(number) + if err != nil { + err = bridgev2.WrapRespErr(err, mautrix.MInvalidParam) + return + } + e164Number, err = strconv.ParseUint(strings.TrimPrefix(number, "+"), 10, 64) + if err != nil { + err = bridgev2.WrapRespErr(fmt.Errorf("error parsing phone number: %w", err), mautrix.MInvalidParam) + return + } + e164String := fmt.Sprintf("+%d", e164Number) + if recipient, err = s.Client.ContactByE164(ctx, e164String); err != nil { + err = fmt.Errorf("error looking up number in local contact list: %w", err) + } else if recipient != nil && (recipient.ACI == uuid.Nil || !s.Client.Store.RecipientStore.IsUnregistered(ctx, libsignalgo.NewACIServiceID(recipient.ACI))) { + aci = recipient.ACI + pni = recipient.PNI + } else if resp, lookupErr := s.Client.LookupPhone(ctx, e164Number); lookupErr != nil { + err = fmt.Errorf("error looking up number on server: %w", lookupErr) + } else { + aci = resp[e164Number].ACI + pni = resp[e164Number].PNI + if aci == uuid.Nil && pni == uuid.Nil { + return + } + recipient, err = s.Client.Store.RecipientStore.UpdateRecipientE164(ctx, aci, pni, e164String) + if err != nil { + zerolog.Ctx(ctx).Err(err).Msg("Failed to save recipient entry after looking up phone") + } + aci, pni = recipient.ACI, recipient.PNI + if aci != uuid.Nil { + s.Client.Store.RecipientStore.MarkUnregistered(ctx, libsignalgo.NewACIServiceID(aci), false) + } + } + return +} + +func (s *SignalClient) resolveUsername(ctx context.Context, username string) (aci, pni uuid.UUID, err error) { + serviceID, err := s.Client.ResolveUsername(ctx, username) + if err != nil { + return + } + aci, pni = serviceID.ToACIAndPNI() + return +} + +const signalUserLinkPrefix = "https://signal.me/#eu/" + +func (s *SignalClient) resolveLink(ctx context.Context, linkHandle string) (aci, pni uuid.UUID, err error) { + username, err := s.Client.ResolveUsernameLink(ctx, linkHandle) + if err != nil { + err = bridgev2.WrapRespErr(err, mautrix.MInvalidParam) + return + } else if username == "" { + return + } + return s.resolveUsername(ctx, username) +} + func (s *SignalClient) ResolveIdentifier(ctx context.Context, number string, _ bool) (*bridgev2.ResolveIdentifierResponse, error) { var aci, pni uuid.UUID var e164Number uint64 var recipient *types.Recipient serviceID, err := signalid.ParseUserIDAsServiceID(networkid.UserID(number)) - if err != nil { - number, err = bridgev2.CleanPhoneNumber(number) - if err != nil { - return nil, bridgev2.WrapRespErr(err, mautrix.MInvalidParam) - } - e164Number, err = strconv.ParseUint(strings.TrimPrefix(number, "+"), 10, 64) - if err != nil { - return nil, bridgev2.WrapRespErr(fmt.Errorf("error parsing phone number: %w", err), mautrix.MInvalidParam) - } - e164String := fmt.Sprintf("+%d", e164Number) - if recipient, err = s.Client.ContactByE164(ctx, e164String); err != nil { - return nil, fmt.Errorf("error looking up number in local contact list: %w", err) - } else if recipient != nil && (recipient.ACI == uuid.Nil || !s.Client.Store.RecipientStore.IsUnregistered(ctx, libsignalgo.NewACIServiceID(recipient.ACI))) { - aci = recipient.ACI - pni = recipient.PNI - } else if resp, err := s.Client.LookupPhone(ctx, e164Number); err != nil { - return nil, fmt.Errorf("error looking up number on server: %w", err) - } else { - aci = resp[e164Number].ACI - pni = resp[e164Number].PNI - if aci == uuid.Nil && pni == uuid.Nil { - return nil, nil - } - recipient, err = s.Client.Store.RecipientStore.UpdateRecipientE164(ctx, aci, pni, e164String) - if err != nil { - zerolog.Ctx(ctx).Err(err).Msg("Failed to save recipient entry after looking up phone") - } - aci, pni = recipient.ACI, recipient.PNI - if aci != uuid.Nil { - s.Client.Store.RecipientStore.MarkUnregistered(ctx, libsignalgo.NewACIServiceID(aci), false) - } - } - } else { + if err == nil { aci, pni = serviceID.ToACIAndPNI() + } else if strings.HasPrefix(number, "+") { + aci, pni, e164Number, recipient, err = s.resolvePhone(ctx, number) + } else if signalmeow.SignalUsernameRegex.MatchString(number) { + aci, pni, err = s.resolveUsername(ctx, number) + } else if handle, ok := strings.CutPrefix(number, signalUserLinkPrefix); ok { + aci, pni, err = s.resolveLink(ctx, handle) + } else { + err = bridgev2.RespError(mautrix.MInvalidParam.WithMessage("Input must be an international phone number, username, link or user ID")) + } + if err != nil { + return nil, err + } + if recipient == nil { + if aci == uuid.Nil && pni == uuid.Nil { + return nil, nil + } recipient, err = s.Client.Store.RecipientStore.LoadAndUpdateRecipient(ctx, aci, pni, nil) if err != nil { return nil, fmt.Errorf("error loading recipient: %w", err) diff --git a/pkg/libsignalgo/username.go b/pkg/libsignalgo/username.go new file mode 100644 index 0000000..a17d2f9 --- /dev/null +++ b/pkg/libsignalgo/username.go @@ -0,0 +1,49 @@ +// mautrix-signal - A Matrix-signal puppeting bridge. +// Copyright (C) 2026 Tulir Asokan +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package libsignalgo + +/* +#include "./libsignal-ffi.h" +*/ +import "C" +import ( + "runtime" +) + +type UsernameHash = fixedArray32 + +func DecryptUsernameLink(entropy, encryptedUsername []byte) (string, error) { + var username C.SignalCStringPtr + signalFfiError := C.signal_username_link_decrypt_username(&username, BytesToBuffer(entropy), BytesToBuffer(encryptedUsername)) + runtime.KeepAlive(entropy) + runtime.KeepAlive(encryptedUsername) + if signalFfiError != nil { + return "", wrapError(signalFfiError) + } + return CopyCStringToString(username), nil +} + +func HashUsername(username string) (UsernameHash, error) { + cUsername, free := GoStringToCString(username) + defer free() + var result UsernameHash + signalFfiError := C.signal_username_hash(result.cFixedArray(), cUsername) + if signalFfiError != nil { + return UsernameHash{}, wrapError(signalFfiError) + } + return result, nil +} diff --git a/pkg/signalmeow/username.go b/pkg/signalmeow/username.go new file mode 100644 index 0000000..8bc4c48 --- /dev/null +++ b/pkg/signalmeow/username.go @@ -0,0 +1,96 @@ +// mautrix-signal - A Matrix-signal puppeting bridge. +// Copyright (C) 2026 Tulir Asokan +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package signalmeow + +import ( + "context" + "encoding/base64" + "fmt" + "regexp" + "strings" + + "github.com/google/uuid" + + "go.mau.fi/mautrix-signal/pkg/libsignalgo" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/account" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" +) + +const SignalUserLinkPrefix = "https://signal.me/#eu/" + +var SignalUsernameRegex = regexp.MustCompile(`^@?([a-z0-9_]{3,32})\.(\d{2,9})$`) + +func (cli *Client) ResolveUsernameLink(ctx context.Context, link string) (string, error) { + link = strings.TrimPrefix(link, SignalUserLinkPrefix) + handle, err := base64.RawURLEncoding.DecodeString(link) + if err != nil { + return "", fmt.Errorf("failed to decode link handle: %w", err) + } else if len(handle) != 48 { + return "", fmt.Errorf("invalid link handle length: %d", len(handle)) + } + resp, err := cli.GRPC.AccountsAnonymous.LookupUsernameLink(ctx, &account.LookupUsernameLinkRequest{ + UsernameLinkHandle: handle[32:], + }) + if err != nil { + return "", err + } + switch respData := resp.Response.(type) { + case *account.LookupUsernameLinkResponse_NotFound: + return "", nil + case *account.LookupUsernameLinkResponse_UsernameCiphertext: + return libsignalgo.DecryptUsernameLink(handle[:32], respData.UsernameCiphertext) + default: + return "", fmt.Errorf("unexpected response type %T", respData) + } +} + +func ParseGRPCServiceID(serviceID *common.ServiceIdentifier) libsignalgo.ServiceID { + if serviceID == nil || len(serviceID.GetUuid()) != 16 { + return libsignalgo.EmptyServiceID + } + internalUUID := uuid.UUID(serviceID.GetUuid()) + switch serviceID.GetIdentityType() { + case common.IdentityType_IDENTITY_TYPE_ACI: + return libsignalgo.NewACIServiceID(internalUUID) + case common.IdentityType_IDENTITY_TYPE_PNI: + return libsignalgo.NewPNIServiceID(internalUUID) + default: + return libsignalgo.EmptyServiceID + } +} + +func (cli *Client) ResolveUsername(ctx context.Context, username string) (libsignalgo.ServiceID, error) { + username = strings.TrimPrefix(username, "@") + hash, err := libsignalgo.HashUsername(username) + if err != nil { + return libsignalgo.EmptyServiceID, err + } + resp, err := cli.GRPC.AccountsAnonymous.LookupUsernameHash(ctx, &account.LookupUsernameHashRequest{ + UsernameHash: hash[:], + }) + if err != nil { + return libsignalgo.EmptyServiceID, err + } + switch respData := resp.Response.(type) { + case *account.LookupUsernameHashResponse_NotFound: + return libsignalgo.EmptyServiceID, nil + case *account.LookupUsernameHashResponse_ServiceIdentifier: + return ParseGRPCServiceID(respData.ServiceIdentifier), nil + default: + return libsignalgo.EmptyServiceID, fmt.Errorf("unexpected response type %T", respData) + } +} From e831a77e428afdda8813c8669b94e5c52386127f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 17:34:41 +0300 Subject: [PATCH 17/84] signalmeow/web: fix grpc target --- pkg/signalmeow/web/grpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/signalmeow/web/grpc.go b/pkg/signalmeow/web/grpc.go index fb7cf7c..077f7ce 100644 --- a/pkg/signalmeow/web/grpc.go +++ b/pkg/signalmeow/web/grpc.go @@ -114,7 +114,7 @@ func (gc *GRPCClient) ResetConnectBackoff() { gc.UnauthConn.ResetConnectBackoff() } -const GRPCTarget = "dns://grpc.chat.signal.org:443" +const GRPCTarget = "dns:///grpc.chat.signal.org:443" func NewGRPCClient(username, password string) (*GRPCClient, error) { grpcTLSConfig := credentials.NewTLS(SignalTLSConfig) From 97a5f2d0affe98ab2dd950dd05740db8e37a61fb Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 17:42:14 +0300 Subject: [PATCH 18/84] userinfo: store resolved usernames --- pkg/connector/chatinfo.go | 43 +++++++++++++++++++------------ pkg/connector/config.go | 7 +++-- pkg/connector/example-config.yaml | 3 ++- pkg/connector/handlesignal.go | 2 +- pkg/signalid/dbmeta.go | 1 + 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index 7c0f80a..7f5f43a 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -75,7 +75,7 @@ func (s *SignalClient) GetUserInfoWithRefreshAfter(ctx context.Context, ghost *b if userID.Type != libsignalgo.ServiceIDTypePNI && (!s.Main.Config.UseOutdatedProfiles && meta.ProfileFetchedAt.After(contact.Profile.FetchedAt)) { return nil, nil } - return s.contactToUserInfo(ctx, contact) + return s.contactToUserInfo(ctx, contact, meta.Username, false) } func (s *SignalClient) GetUserInfo(ctx context.Context, ghost *bridgev2.Ghost) (*bridgev2.UserInfo, error) { @@ -99,7 +99,7 @@ func (s *SignalClient) GetChatInfo(ctx context.Context, portal *bridgev2.Portal) } } -func (s *SignalClient) contactToUserInfo(ctx context.Context, contact *types.Recipient) (*bridgev2.UserInfo, error) { +func (s *SignalClient) contactToUserInfo(ctx context.Context, contact *types.Recipient, username string, saveUsername bool) (*bridgev2.UserInfo, error) { isBot := false ui := &bridgev2.UserInfo{ IsBot: &isBot, @@ -110,13 +110,20 @@ func (s *SignalClient) contactToUserInfo(ctx context.Context, contact *types.Rec changed = meta.ProfileFetchedAt.IsZero() && !contact.Profile.FetchedAt.IsZero() meta.ProfileFetchedAt.Time = contact.Profile.FetchedAt } - return false + if saveUsername && username != "" && meta.Username != username { + meta.Username = username + changed = true + } + return }, } if contact.E164 != "" { ui.Identifiers = append(ui.Identifiers, "tel:"+contact.E164) } - name := s.Main.Config.FormatDisplayname(contact) + if username != "" { + ui.Identifiers = append(ui.Identifiers, "signal:"+username) + } + name := s.Main.Config.FormatDisplayname(contact, username) ui.Name = &name if s.Main.Config.UseContactAvatars && contact.ContactAvatar.Hash != "" { ui.Avatar = &bridgev2.Avatar{ @@ -243,30 +250,33 @@ func (s *SignalClient) resolveUsername(ctx context.Context, username string) (ac const signalUserLinkPrefix = "https://signal.me/#eu/" -func (s *SignalClient) resolveLink(ctx context.Context, linkHandle string) (aci, pni uuid.UUID, err error) { - username, err := s.Client.ResolveUsernameLink(ctx, linkHandle) +func (s *SignalClient) resolveLink(ctx context.Context, linkHandle string) (aci, pni uuid.UUID, username string, err error) { + username, err = s.Client.ResolveUsernameLink(ctx, linkHandle) if err != nil { err = bridgev2.WrapRespErr(err, mautrix.MInvalidParam) return } else if username == "" { return } - return s.resolveUsername(ctx, username) + aci, pni, err = s.resolveUsername(ctx, username) + return } func (s *SignalClient) ResolveIdentifier(ctx context.Context, number string, _ bool) (*bridgev2.ResolveIdentifierResponse, error) { var aci, pni uuid.UUID var e164Number uint64 var recipient *types.Recipient + var username string serviceID, err := signalid.ParseUserIDAsServiceID(networkid.UserID(number)) if err == nil { aci, pni = serviceID.ToACIAndPNI() } else if strings.HasPrefix(number, "+") { aci, pni, e164Number, recipient, err = s.resolvePhone(ctx, number) } else if signalmeow.SignalUsernameRegex.MatchString(number) { + username = strings.TrimPrefix(number, "@") aci, pni, err = s.resolveUsername(ctx, number) } else if handle, ok := strings.CutPrefix(number, signalUserLinkPrefix); ok { - aci, pni, err = s.resolveLink(ctx, handle) + aci, pni, username, err = s.resolveLink(ctx, handle) } else { err = bridgev2.RespError(mautrix.MInvalidParam.WithMessage("Input must be an international phone number, username, link or user ID")) } @@ -288,7 +298,7 @@ func (s *SignalClient) ResolveIdentifier(ctx context.Context, number string, _ b Stringer("pni", pni). Msg("Found resolve identifier target user") - userInfo, err := s.contactToUserInfo(ctx, recipient) + userInfo, err := s.contactToUserInfo(ctx, recipient, username, true) if err != nil { return nil, fmt.Errorf("failed to convert contact: %w", err) } @@ -433,14 +443,10 @@ func (s *SignalClient) GetContactList(ctx context.Context) ([]*bridgev2.ResolveI } resp := make([]*bridgev2.ResolveIdentifierResponse, len(recipients)) for i, recipient := range recipients { - userInfo, err := s.contactToUserInfo(ctx, recipient) - if err != nil { - return nil, fmt.Errorf("failed to convert contact: %w", err) - } recipientResp := &bridgev2.ResolveIdentifierResponse{ - UserInfo: userInfo, - Chat: s.makeCreateDMResponse(ctx, recipient, nil), + Chat: s.makeCreateDMResponse(ctx, recipient, nil), } + var username string if recipient.ACI != uuid.Nil { recipientResp.UserID = signalid.MakeUserID(recipient.ACI) ghost, err := s.Main.Bridge.GetGhostByID(ctx, recipientResp.UserID) @@ -448,9 +454,14 @@ func (s *SignalClient) GetContactList(ctx context.Context) ([]*bridgev2.ResolveI return nil, fmt.Errorf("failed to get ghost for %s: %w", recipient.ACI, err) } recipientResp.Ghost = ghost + username = ghost.Metadata.(*signalid.GhostMetadata).Username } else { recipientResp.UserID = signalid.MakeUserIDFromServiceID(libsignalgo.NewPNIServiceID(recipient.PNI)) } + recipientResp.UserInfo, err = s.contactToUserInfo(ctx, recipient, username, false) + if err != nil { + return nil, fmt.Errorf("failed to convert contact: %w", err) + } resp[i] = recipientResp } return resp, nil @@ -484,7 +495,7 @@ func (s *SignalClient) makeCreateDMResponse(ctx context.Context, recipient *type var serviceID libsignalgo.ServiceID var avatar *bridgev2.Avatar if recipient.ACI == uuid.Nil { - namePtr = ptr.Ptr(s.Main.Config.FormatDisplayname(recipient)) + namePtr = ptr.Ptr(s.Main.Config.FormatDisplayname(recipient, "")) serviceID = libsignalgo.NewPNIServiceID(recipient.PNI) } else { if backupChat == nil { diff --git a/pkg/connector/config.go b/pkg/connector/config.go index 7795869..6e9f2e0 100644 --- a/pkg/connector/config.go +++ b/pkg/connector/config.go @@ -74,13 +74,16 @@ type DisplaynameParams struct { AboutEmoji string } -func (c *SignalConfig) FormatDisplayname(contact *types.Recipient) string { +func (c *SignalConfig) FormatDisplayname(contact *types.Recipient, username string) string { + if username != "" && !strings.HasPrefix(username, "@") { + username = "@" + username + } var nameBuf strings.Builder err := c.displaynameTemplate.Execute(&nameBuf, &DisplaynameParams{ ProfileName: contact.Profile.Name, ContactName: contact.ContactName, Nickname: contact.Nickname, - Username: "", + Username: username, PhoneNumber: contact.E164, UUID: contact.ACI.String(), ACI: contact.ACI.String(), diff --git a/pkg/connector/example-config.yaml b/pkg/connector/example-config.yaml index b9b541b..f67fbc8 100644 --- a/pkg/connector/example-config.yaml +++ b/pkg/connector/example-config.yaml @@ -2,10 +2,11 @@ # {{.ProfileName}} - The Signal profile name set by the user. # {{.ContactName}} - The name for the user from your phone's contact list. This is not safe on multi-user instances. # {{.Nickname}} - The nickname set for the user in the native Signal app. This is not safe on multi-user instances. +# {{.Username}} - The username of the user. Only applicable when starting chats. # {{.PhoneNumber}} - The phone number of the user. # {{.UUID}} - The UUID of the Signal user. # {{.AboutEmoji}} - The emoji set by the user in their profile. -displayname_template: '{{or .ProfileName .PhoneNumber "Unknown user"}}' +displayname_template: '{{or .ProfileName .PhoneNumber .Username "Unknown user"}}' # Should avatars from the user's contact list be used? This is not safe on multi-user instances. use_contact_avatars: false # Should the bridge request the user's contact list from the phone on startup? diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index 2d3e65d..b1fc024 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -842,7 +842,7 @@ func (s *SignalClient) handleSignalContactList(evt *events.ContactList) { log.Err(err).Msg("Failed to get ghost to update contact info") continue } - userInfo, err := s.contactToUserInfo(ctx, contact) + userInfo, err := s.contactToUserInfo(ctx, contact, ghost.Metadata.(*signalid.GhostMetadata).Username, false) if err != nil { log.Err(err).Msg("Failed to convert contact info") continue diff --git a/pkg/signalid/dbmeta.go b/pkg/signalid/dbmeta.go index 3a86146..916aec5 100644 --- a/pkg/signalid/dbmeta.go +++ b/pkg/signalid/dbmeta.go @@ -43,4 +43,5 @@ type UserLoginMetadata struct { type GhostMetadata struct { ProfileFetchedAt jsontime.UnixMilli `json:"profile_fetched_at"` + Username string `json:"username"` } From 2bde52712c256241ab93c6c32c72015f4595e0b7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 18:07:39 +0300 Subject: [PATCH 19/84] signalmeow/provisioning: copy auth credential salt on login --- pkg/signalmeow/provisioning.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index ea2c23f..6679cfc 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -187,6 +187,7 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev AccountEntropyPool: libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()), EphemeralBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetEphemeralBackupKey()), MediaRootBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetMediaRootBackupKey()), + AuthCredentialSalt: provisioningMessage.GetAuthCredentialSalt(), } if provisioningMessage.GetAccountEntropyPool() != "" { data.MasterKey, err = libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()).DeriveSVRKey() From 2dfa90bf19d4d460fac0dabd151223e2d927cc86 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 18:08:01 +0300 Subject: [PATCH 20/84] signalmeow/username: allow uppercase letters --- pkg/signalmeow/username.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/signalmeow/username.go b/pkg/signalmeow/username.go index 8bc4c48..1bbd140 100644 --- a/pkg/signalmeow/username.go +++ b/pkg/signalmeow/username.go @@ -32,7 +32,7 @@ import ( const SignalUserLinkPrefix = "https://signal.me/#eu/" -var SignalUsernameRegex = regexp.MustCompile(`^@?([a-z0-9_]{3,32})\.(\d{2,9})$`) +var SignalUsernameRegex = regexp.MustCompile(`^@?([A-Za-z0-9_]{3,32})\.(\d{2,9})$`) func (cli *Client) ResolveUsernameLink(ctx context.Context, link string) (string, error) { link = strings.TrimPrefix(link, SignalUserLinkPrefix) From fc893ce0a3026c982a48702f2d913e63bbc15c58 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 8 Oct 2026 18:09:40 +0300 Subject: [PATCH 21/84] startchat: ensure phone number lookup doesn't use stale cached response --- pkg/connector/chatinfo.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index 7f5f43a..759cdf9 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -225,6 +225,7 @@ func (s *SignalClient) resolvePhone(ctx context.Context, number string) (aci, pn aci = resp[e164Number].ACI pni = resp[e164Number].PNI if aci == uuid.Nil && pni == uuid.Nil { + recipient = nil return } recipient, err = s.Client.Store.RecipientStore.UpdateRecipientE164(ctx, aci, pni, e164String) From e73dca83e722522231fe5bec3511f6e95765e180 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 9 Oct 2026 16:25:40 +0300 Subject: [PATCH 22/84] signalmeow/provisioning: handle binary aci/pni fields --- pkg/signalmeow/provisioning.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index 6679cfc..a100e46 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -137,7 +137,14 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev var pniSignedPreKey *libsignalgo.SignedPreKeyRecord var pniPQLastResortPreKey *libsignalgo.KyberPreKeyRecord var hasE164 bool - if provisioningMessage.GetPni() != "" { + aci, err := ParseStringOrBinaryServiceID(provisioningMessage.GetAci(), provisioningMessage.GetAciBinary()) + if err != nil { + log.Err(err).Msg("error parsing ACI") + c <- ProvisioningResponse{State: StateProvisioningError, Err: fmt.Errorf("failed to parse aci: %w", err)} + return + } + pni, _ := ParseStringOrBinaryUUID(provisioningMessage.GetPni(), provisioningMessage.GetPniBinary()) + if pni != uuid.Nil { hasE164 = true pniPublicKey := exerrors.Must(libsignalgo.DeserializePublicKey(provisioningMessage.GetPniIdentityKeyPublic())) @@ -148,9 +155,10 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev pniSignedPreKey = GenerateSignedPreKey(1, pniIdentityKeyPair) pniPQLastResortPreKey = GenerateKyberPreKeys(1, 1, pniIdentityKeyPair)[0] } + zerolog.Ctx(ctx).Debug().Any("msg", provisioningMessage).Msg("Provisioning message") deviceResponse, err := confirmDevice( ctx, - provisioningMessage.GetAci(), + aci.String(), password, *code, hasE164, From 772b38406191285baed678521b6e8757bb4a5fcf Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 10 Oct 2026 13:11:44 +0300 Subject: [PATCH 23/84] libsignalgo: fix time precision in some calls Fixes #674 --- pkg/libsignalgo/message.go | 2 +- pkg/libsignalgo/prekeybundle.go | 2 +- pkg/libsignalgo/sessionrecord.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/libsignalgo/message.go b/pkg/libsignalgo/message.go index 91aa7f0..14b26c4 100644 --- a/pkg/libsignalgo/message.go +++ b/pkg/libsignalgo/message.go @@ -29,7 +29,7 @@ import ( func Encrypt(ctx context.Context, plaintext []byte, forAddress, localAddress *Address, sessionStore SessionStore, identityKeyStore IdentityKeyStore) (*CiphertextMessage, error) { var ciphertextMessage C.SignalMutPointerCiphertextMessage - var now C.uint64_t = C.uint64_t(time.Now().Unix()) + var now C.uint64_t = C.uint64_t(time.Now().UnixMilli()) callbackCtx := NewCallbackContext(ctx) defer callbackCtx.Unref() signalFfiError := C.signal_encrypt_message( diff --git a/pkg/libsignalgo/prekeybundle.go b/pkg/libsignalgo/prekeybundle.go index d8e2516..0d97baa 100644 --- a/pkg/libsignalgo/prekeybundle.go +++ b/pkg/libsignalgo/prekeybundle.go @@ -30,7 +30,7 @@ import ( func ProcessPreKeyBundle(ctx context.Context, bundle *PreKeyBundle, forAddress, localAddress *Address, sessionStore SessionStore, identityStore IdentityKeyStore) error { callbackCtx := NewCallbackContext(ctx) defer callbackCtx.Unref() - var now C.uint64_t = C.uint64_t(time.Now().Unix()) + var now C.uint64_t = C.uint64_t(time.Now().UnixMilli()) signalFfiError := C.signal_process_prekey_bundle( bundle.constPtr(), forAddress.constPtr(), diff --git a/pkg/libsignalgo/sessionrecord.go b/pkg/libsignalgo/sessionrecord.go index b4f2afb..8b0d8b0 100644 --- a/pkg/libsignalgo/sessionrecord.go +++ b/pkg/libsignalgo/sessionrecord.go @@ -105,7 +105,7 @@ func (sr *SessionRecord) HasCurrentState() (bool, error) { signalFfiError := C.signal_session_record_has_usable_sender_chain( &result, sr.constPtr(), - C.uint64_t(time.Now().Unix()), + C.uint64_t(time.Now().UnixMilli()), ) runtime.KeepAlive(sr) if signalFfiError != nil { From 462e5c615ad5a400d74daf2651aa14ec994b543d Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 12 Oct 2026 12:38:44 +0300 Subject: [PATCH 24/84] signalmeow/receiving: validate sender certificates properly --- pkg/libsignalgo/sendercertificate.go | 54 +++++++++++++++++++++------- pkg/signalmeow/receiving_decrypt.go | 17 ++++++--- 2 files changed, 55 insertions(+), 16 deletions(-) diff --git a/pkg/libsignalgo/sendercertificate.go b/pkg/libsignalgo/sendercertificate.go index cf39fd6..d6a0173 100644 --- a/pkg/libsignalgo/sendercertificate.go +++ b/pkg/libsignalgo/sendercertificate.go @@ -22,13 +22,52 @@ package libsignalgo */ import "C" import ( + "encoding/base64" "runtime" + "sync" "time" "unsafe" "github.com/google/uuid" + "go.mau.fi/util/exerrors" ) +var ProdTrustRoots = NewTrustRoots([]string{ + "BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF", + "BUkY0I+9+oPgDCn4+Ac6Iu813yvqkDr/ga8DzLxFxuk6", +}) + +type TrustRoots struct { + encoded []string + keys []*PublicKey + cKeys []C.SignalConstPointerPublicKey + once sync.Once +} + +func NewTrustRoots(roots []string) *TrustRoots { + return &TrustRoots{ + encoded: roots, + } +} + +func (tr *TrustRoots) decode() { + tr.keys = make([]*PublicKey, len(tr.encoded)) + tr.cKeys = make([]C.SignalConstPointerPublicKey, len(tr.encoded)) + for i, rootString := range tr.encoded { + rootBytes := exerrors.Must(base64.StdEncoding.DecodeString(rootString)) + tr.keys[i] = exerrors.Must(DeserializePublicKey(rootBytes)) + tr.cKeys[i] = tr.keys[i].constPtr() + } +} + +func (tr *TrustRoots) borrowedSlice() C.SignalBorrowedSliceOfConstPointerPublicKey { + tr.once.Do(tr.decode) + return C.SignalBorrowedSliceOfConstPointerPublicKey{ + base: unsafe.SliceData(tr.cKeys), + length: C.size_t(len(tr.cKeys)), + } +} + type SenderCertificate struct { nc noCopy ptr *C.SignalSenderCertificate @@ -191,25 +230,16 @@ func (sc *SenderCertificate) GetKey() (*PublicKey, error) { return wrapPublicKey(key.raw), nil } -func (sc *SenderCertificate) Validate(trustRoots []*PublicKey, ts time.Time) (bool, error) { +func (sc *SenderCertificate) Validate(trustRoots *TrustRoots, serverTS uint64) (bool, error) { var valid C.bool - constRoots := make([]C.SignalConstPointerPublicKey, len(trustRoots)) - for i, root := range trustRoots { - constRoots[i] = root.constPtr() - } signalFfiError := C.signal_sender_certificate_validate( &valid, sc.constPtr(), - // TODO this might not be correct - C.SignalBorrowedSliceOfConstPointerPublicKey{ - base: unsafe.SliceData(constRoots), - length: C.size_t(len(constRoots)), - }, - C.uint64_t(ts.UnixMilli()), + trustRoots.borrowedSlice(), + C.uint64_t(serverTS), ) runtime.KeepAlive(sc) runtime.KeepAlive(trustRoots) - runtime.KeepAlive(constRoots) if signalFfiError != nil { return false, wrapError(signalFfiError) } diff --git a/pkg/signalmeow/receiving_decrypt.go b/pkg/signalmeow/receiving_decrypt.go index 7d3c1a3..f92647c 100644 --- a/pkg/signalmeow/receiving_decrypt.go +++ b/pkg/signalmeow/receiving_decrypt.go @@ -328,14 +328,20 @@ func (cli *Client) decryptUnidentifiedSenderEnvelope(ctx context.Context, destin return result, fmt.Errorf("decrypting to USMC returned nil") } - messageType, err := usmc.GetMessageType() - if err != nil { - return result, fmt.Errorf("failed to get message type: %w", err) - } senderCertificate, err := usmc.GetSenderCertificate() if err != nil { return result, fmt.Errorf("failed to get sender certificate: %w", err) } + valid, err := senderCertificate.Validate(libsignalgo.ProdTrustRoots, envelope.GetServerTimestamp()) + if err != nil { + return result, fmt.Errorf("failed to validate sender certificate: %w", err) + } else if !valid { + return result, fmt.Errorf("sender certificate is not valid") + } + messageType, err := usmc.GetMessageType() + if err != nil { + return result, fmt.Errorf("failed to get message type: %w", err) + } contentHint, err := usmc.GetContentHint() if err != nil { return result, fmt.Errorf("failed to get content hint: %w", err) @@ -353,6 +359,9 @@ func (cli *Client) decryptUnidentifiedSenderEnvelope(ctx context.Context, destin if err != nil { return result, fmt.Errorf("failed to get sender device ID: %w", err) } + if senderUUID == cli.Store.ACI && senderDeviceID == uint32(cli.Store.DeviceID) { + return result, fmt.Errorf("received unidentified sender envelope from self") + } senderAddress, err := libsignalgo.NewACIServiceID(senderUUID).Address(uint(senderDeviceID)) if err != nil { return result, fmt.Errorf("failed to create sender address: %w", err) From 2ed2d006947525640b1154662c1305448f9424e2 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 12 Oct 2026 13:33:14 +0300 Subject: [PATCH 25/84] signalmeow/receiving: add various length checks and other fixes --- pkg/connector/handlesignal.go | 2 ++ pkg/libsignalgo/groupsecretparams.go | 3 ++ pkg/signalmeow/attachments.go | 7 ++++- pkg/signalmeow/groups.go | 44 ++++++++++++++++++--------- pkg/signalmeow/provisioning.go | 2 +- pkg/signalmeow/provisioning_cipher.go | 2 ++ pkg/signalmeow/receiving.go | 18 ++++++++++- 7 files changed, 61 insertions(+), 17 deletions(-) diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index b1fc024..c6fd80f 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -214,6 +214,8 @@ func (evt *Bv2ChatEvent) GetChatInfoChange(ctx context.Context) (*bridgev2.ChatI groupChange, err := evt.s.Client.DecryptGroupChange(ctx, gv2) if err != nil { return nil, fmt.Errorf("failed to decrypt group change: %w", err) + } else if groupChange.Revision != gv2.GetRevision() { + return nil, fmt.Errorf("group change revision mismatch: got %d, want %d", groupChange.Revision, gv2.GetRevision()) } // XXX: is this ID compatible with types.GroupIdentifier? return evt.s.groupChangeToChatInfoChange(ctx, types.GroupIdentifier(evt.Info.ChatID), gv2.GetRevision(), groupChange) diff --git a/pkg/libsignalgo/groupsecretparams.go b/pkg/libsignalgo/groupsecretparams.go index eee983f..90149b4 100644 --- a/pkg/libsignalgo/groupsecretparams.go +++ b/pkg/libsignalgo/groupsecretparams.go @@ -84,6 +84,9 @@ func (gid *GroupIdentifier) String() string { return base64.StdEncoding.EncodeToString(gid[:]) } +const UUIDCiphertextLength = 65 +const ProfileKeyCiphertextLength = 65 + type UUIDCiphertext = fixedArray65 type ProfileKeyCiphertext = fixedArray65 diff --git a/pkg/signalmeow/attachments.go b/pkg/signalmeow/attachments.go index de89fb2..0b5f7e2 100644 --- a/pkg/signalmeow/attachments.go +++ b/pkg/signalmeow/attachments.go @@ -138,6 +138,9 @@ const MACLength = 32 const IVLength = 16 func macAndAESDecrypt(body, key []byte) ([]byte, error) { + if len(key) != 64 { + return nil, fmt.Errorf("invalid key length (%d bytes)", len(key)) + } l := len(body) - MACLength if !verifyMAC(key[MACLength:], body[:l], body[l:]) { return nil, ErrInvalidMACForAttachment @@ -474,7 +477,9 @@ func aesDecrypt(key, ciphertext []byte) ([]byte, error) { return nil, err } - if len(ciphertext)%aes.BlockSize != 0 { + if len(ciphertext) < IVLength { + return nil, fmt.Errorf("ciphertext too short to contain IV (%d bytes)", len(ciphertext)) + } else if len(ciphertext)%aes.BlockSize != 0 { return nil, fmt.Errorf("ciphertext not multiple of AES blocksize (%d extra bytes)", len(ciphertext)%aes.BlockSize) } diff --git a/pkg/signalmeow/groups.go b/pkg/signalmeow/groups.go index 20a2821..493ecbb 100644 --- a/pkg/signalmeow/groups.go +++ b/pkg/signalmeow/groups.go @@ -534,7 +534,7 @@ func decryptGroup(ctx context.Context, encryptedGroup *signalpb.Group, groupMast } for _, bannedMember := range encryptedGroup.MembersBanned { - if bannedMember == nil { + if bannedMember == nil || len(bannedMember.UserId) != libsignalgo.UUIDCiphertextLength { continue } encryptedUserID := libsignalgo.UUIDCiphertext(bannedMember.UserId) @@ -754,6 +754,9 @@ func (cli *Client) StoreMasterKey(ctx context.Context, groupMasterKey types.Seri } func (cli *Client) DecryptGroupChange(ctx context.Context, groupContext *signalpb.GroupContextV2) (*GroupChange, error) { + if len(groupContext.MasterKey) != libsignalgo.GroupMasterKeyLength { + return nil, fmt.Errorf("invalid group master key size: %d", len(groupContext.MasterKey)) + } masterKeyBytes := libsignalgo.GroupMasterKey(groupContext.MasterKey) groupMasterKey := masterKeyFromBytes(masterKeyBytes) @@ -800,6 +803,9 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange log.Err(err).Msg("DeriveGroupSecretParamsFromMasterKey error") return nil, err } + if len(encryptedActions.SourceUserId) != libsignalgo.UUIDCiphertextLength { + return nil, fmt.Errorf("invalid source user ID length: %d", len(encryptedActions.SourceUserId)) + } sourceServiceID, err := groupSecretParams.DecryptServiceID(libsignalgo.UUIDCiphertext(encryptedActions.SourceUserId)) if err != nil { @@ -853,7 +859,7 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange } for _, deleteMember := range encryptedActions.DeleteMembers { - if deleteMember == nil { + if deleteMember == nil || len(deleteMember.DeletedUserId) != libsignalgo.UUIDCiphertextLength { continue } encryptedUserID := libsignalgo.UUIDCiphertext(deleteMember.DeletedUserId) @@ -869,6 +875,9 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange } for _, modifyMemberRole := range encryptedActions.ModifyMemberRoles { + if len(modifyMemberRole.UserId) != libsignalgo.UUIDCiphertextLength { + continue + } encryptedUserID := libsignalgo.UUIDCiphertext(modifyMemberRole.UserId) serviceID, err := groupSecretParams.DecryptServiceID(encryptedUserID) if err != nil { @@ -917,7 +926,7 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange } for _, deletePendingMember := range encryptedActions.DeleteMembersPendingProfileKey { - if deletePendingMember == nil { + if deletePendingMember == nil || len(deletePendingMember.DeletedUserId) != libsignalgo.UUIDCiphertextLength { continue } encryptedUserID := libsignalgo.UUIDCiphertext(deletePendingMember.DeletedUserId) @@ -950,7 +959,7 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange for _, promotePendingPniAciMember := range encryptedActions.PromoteMembersPendingPniAciProfileKey { // TODO: pretending this is a PendingMember should do for mautrix-signal, but we probably want to treat them separately at some point - if promotePendingPniAciMember == nil { + if promotePendingPniAciMember == nil || len(promotePendingPniAciMember.Pni) != libsignalgo.UUIDCiphertextLength { continue } aci, profileKey, err := decryptPKeyAndIDorPresentation(ctx, promotePendingPniAciMember.UserId, promotePendingPniAciMember.ProfileKey, promotePendingPniAciMember.Presentation, groupSecretParams) @@ -995,7 +1004,7 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange } for _, deleteRequestingMember := range encryptedActions.DeleteMembersPendingAdminApproval { - if deleteRequestingMember == nil { + if deleteRequestingMember == nil || len(deleteRequestingMember.DeletedUserId) != libsignalgo.UUIDCiphertextLength { continue } encryptedUserID := libsignalgo.UUIDCiphertext(deleteRequestingMember.DeletedUserId) @@ -1008,7 +1017,7 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange } for _, promoteRequestingMember := range encryptedActions.PromoteMembersPendingAdminApproval { - if promoteRequestingMember == nil { + if promoteRequestingMember == nil || len(promoteRequestingMember.UserId) != libsignalgo.UUIDCiphertextLength { continue } encryptedUserID := libsignalgo.UUIDCiphertext(promoteRequestingMember.UserId) @@ -1024,11 +1033,10 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange } for _, addBannedMember := range encryptedActions.AddMembersBanned { - if addBannedMember == nil { + if addBannedMember == nil || addBannedMember.Added == nil || len(addBannedMember.Added.UserId) != libsignalgo.UUIDCiphertextLength { continue } - bannedMember := addBannedMember.Added - encryptedUserID := libsignalgo.UUIDCiphertext(bannedMember.UserId) + encryptedUserID := libsignalgo.UUIDCiphertext(addBannedMember.Added.UserId) serviceID, err := groupSecretParams.DecryptServiceID(encryptedUserID) if err != nil { log.Err(err).Msg("DecryptUUID UserId error for addBannedMember") @@ -1036,12 +1044,12 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange } decryptedGroupChange.AddBannedMembers = append(decryptedGroupChange.AddBannedMembers, &BannedMember{ ServiceID: serviceID, - Timestamp: bannedMember.Timestamp, + Timestamp: addBannedMember.Added.Timestamp, }) } for _, deleteBannedMember := range encryptedActions.DeleteMembersBanned { - if deleteBannedMember == nil { + if deleteBannedMember == nil || len(deleteBannedMember.DeletedUserId) != libsignalgo.UUIDCiphertextLength { continue } encryptedUserID := libsignalgo.UUIDCiphertext(deleteBannedMember.DeletedUserId) @@ -1094,7 +1102,10 @@ func decryptPKeyAndIDorPresentation(ctx context.Context, userID []byte, profileK log := zerolog.Ctx(ctx) var encryptedUserID libsignalgo.UUIDCiphertext var encryptedProfileKey libsignalgo.ProfileKeyCiphertext - if len(userID) == 0 || len(profileKeyBytes) == 0 { + if len(userID) == libsignalgo.UUIDCiphertextLength && len(profileKeyBytes) == libsignalgo.ProfileKeyCiphertextLength { + encryptedUserID = libsignalgo.UUIDCiphertext(userID) + encryptedProfileKey = libsignalgo.ProfileKeyCiphertext(profileKeyBytes) + } else if len(presentationBytes) > 0 { presentation := libsignalgo.ProfileKeyCredentialPresentation(presentationBytes) err := presentation.CheckValidContents() if err != nil { @@ -1112,8 +1123,7 @@ func decryptPKeyAndIDorPresentation(ctx context.Context, userID []byte, profileK return nil, nil, err } } else { - encryptedUserID = libsignalgo.UUIDCiphertext(userID) - encryptedProfileKey = libsignalgo.ProfileKeyCiphertext(profileKeyBytes) + return nil, nil, fmt.Errorf("invalid member: missing profile key and presentation") } serviceID, err := groupSecretParams.DecryptServiceID(encryptedUserID) if err != nil { @@ -1145,6 +1155,9 @@ func decryptMember(ctx context.Context, member *signalpb.Member, groupSecretPara } func decryptPendingMember(ctx context.Context, pendingMember *signalpb.MemberPendingProfileKey, groupSecretParams libsignalgo.GroupSecretParams) (*PendingMember, error) { + if len(pendingMember.Member.UserId) != libsignalgo.UUIDCiphertextLength { + return nil, fmt.Errorf("invalid pending member user ID length: %d", len(pendingMember.Member.UserId)) + } log := zerolog.Ctx(ctx) encryptedUserID := libsignalgo.UUIDCiphertext(pendingMember.Member.UserId) userID, err := groupSecretParams.DecryptServiceID(encryptedUserID) @@ -1154,6 +1167,9 @@ func decryptPendingMember(ctx context.Context, pendingMember *signalpb.MemberPen } // pendingMembers don't have profile keys encryptedAddedByUserID := pendingMember.AddedByUserId + if len(encryptedAddedByUserID) != libsignalgo.UUIDCiphertextLength { + return nil, fmt.Errorf("invalid pending member addedByUserId length: %d", len(encryptedAddedByUserID)) + } addedByServiceId, err := groupSecretParams.DecryptServiceID(libsignalgo.UUIDCiphertext(encryptedAddedByUserID)) if err != nil { log.Err(err).Msg("DecryptUUID addedByUserId error for pendingMember") diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index a100e46..0b8a32c 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -155,7 +155,7 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev pniSignedPreKey = GenerateSignedPreKey(1, pniIdentityKeyPair) pniPQLastResortPreKey = GenerateKyberPreKeys(1, 1, pniIdentityKeyPair)[0] } - zerolog.Ctx(ctx).Debug().Any("msg", provisioningMessage).Msg("Provisioning message") + zerolog.Ctx(ctx).Trace().Any("msg", provisioningMessage).Msg("Provisioning message") deviceResponse, err := confirmDevice( ctx, aci.String(), diff --git a/pkg/signalmeow/provisioning_cipher.go b/pkg/signalmeow/provisioning_cipher.go index b20beb0..23a23dc 100644 --- a/pkg/signalmeow/provisioning_cipher.go +++ b/pkg/signalmeow/provisioning_cipher.go @@ -72,6 +72,8 @@ func (c *ProvisioningCipher) Decrypt(env *signalpb.ProvisionEnvelope) (*signalpb body := env.GetBody() if body == nil { return nil, fmt.Errorf("no body: %v", env) + } else if len(body) < int(CIPHERTEXT_OFFSET+CIPHER_KEY_SIZE+MAC_SIZE) { + return nil, fmt.Errorf("body too short: %d", len(body)) } if body[0] != 1 { return nil, fmt.Errorf("invalid ProvisionMessage version: %v", body[0]) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index b02c70d..1dde3ea 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -948,6 +948,12 @@ func (cli *Client) incomingEditMessage( if editMessage.GetDataMessage().GetGroupV2() != nil { // Pull out the master key then store it ASAP - we should pass around GroupIdentifier groupMasterKeyBytes := editMessage.GetDataMessage().GetGroupV2().GetMasterKey() + if len(groupMasterKeyBytes) != libsignalgo.GroupMasterKeyLength { + zerolog.Ctx(ctx).Warn(). + Int("group_master_key_length", len(groupMasterKeyBytes)). + Msg("Unexpected group master key length") + return true, false + } masterKey := masterKeyFromBytes(libsignalgo.GroupMasterKey(groupMasterKeyBytes)) var err error groupID, err = cli.StoreMasterKey(ctx, masterKey) @@ -981,13 +987,17 @@ func (cli *Client) incomingDataMessage( envelope *signalpb.Envelope, ) (handlerSuccess, sendDeliveryReceipt bool) { // If there's a profile key, save it - if dataMessage.ProfileKey != nil { + if len(dataMessage.ProfileKey) == libsignalgo.ProfileKeyLength { profileKey := libsignalgo.ProfileKey(dataMessage.ProfileKey) err := cli.Store.RecipientStore.StoreProfileKey(ctx, messageSenderACI, profileKey) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("StoreProfileKey error") return } + } else if dataMessage.ProfileKey != nil { + zerolog.Ctx(ctx).Warn(). + Int("profile_key_length", len(dataMessage.ProfileKey)). + Msg("Unexpected profile key length") } // If it's a group message, get the ID and invalidate cache if necessary @@ -996,6 +1006,12 @@ func (cli *Client) incomingDataMessage( if dataMessage.GetGroupV2() != nil { // Pull out the master key then store it ASAP - we should pass around GroupIdentifier groupMasterKeyBytes := dataMessage.GetGroupV2().GetMasterKey() + if len(groupMasterKeyBytes) != libsignalgo.GroupMasterKeyLength { + zerolog.Ctx(ctx).Warn(). + Int("group_master_key_length", len(groupMasterKeyBytes)). + Msg("Unexpected group master key length") + return true, false + } masterKey := masterKeyFromBytes(libsignalgo.GroupMasterKey(groupMasterKeyBytes)) var err error groupID, err = cli.StoreMasterKey(ctx, masterKey) From 11b854b7d5ad1666e8032e22b693d6608f424222 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 12 Oct 2026 13:45:58 +0300 Subject: [PATCH 26/84] handlesignal: don't fail group info changes entirely --- go.mod | 2 +- go.sum | 4 ++-- pkg/connector/handlesignal.go | 16 +++++++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 5f888c7..65f7fa3 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.31.1-0.20261005141226-f14e6b5fc009 + maunium.net/go/mautrix v0.31.1-0.20261012105425-21d7e51f1444 ) require ( diff --git a/go.sum b/go.sum index 18a799c..9d3fcc0 100644 --- a/go.sum +++ b/go.sum @@ -113,5 +113,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.31.1-0.20261005141226-f14e6b5fc009 h1:PSQyac5CVEVOFRjyXrqFMs9SZByQvi7DrVZZxiG40hg= -maunium.net/go/mautrix v0.31.1-0.20261005141226-f14e6b5fc009/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= +maunium.net/go/mautrix v0.31.1-0.20261012105425-21d7e51f1444 h1:Tu5prJ6RCmNDX/uBFUDFUgLZB5gpB7kXAefkyEQIhJ4= +maunium.net/go/mautrix v0.31.1-0.20261012105425-21d7e51f1444/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index c6fd80f..9ec4e23 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -205,19 +205,25 @@ func (evt *Bv2ChatEvent) GetType() bridgev2.RemoteEventType { return bridgev2.RemoteEventUnknown } -func (evt *Bv2ChatEvent) GetChatInfoChange(ctx context.Context) (*bridgev2.ChatInfoChange, error) { +func (evt *Bv2ChatEvent) GetChatInfoChange(ctx context.Context, portal *bridgev2.Portal) (*bridgev2.ChatInfoChange, error) { dm, _ := evt.Event.(*signalpb.DataMessage) gv2 := dm.GetGroupV2() if gv2 == nil || gv2.GroupChange == nil { return nil, fmt.Errorf("GetChatInfoChange() called for non-GroupChange event") } + portalRevision := portal.Metadata.(*signalid.PortalMetadata).Revision groupChange, err := evt.s.Client.DecryptGroupChange(ctx, gv2) if err != nil { - return nil, fmt.Errorf("failed to decrypt group change: %w", err) - } else if groupChange.Revision != gv2.GetRevision() { - return nil, fmt.Errorf("group change revision mismatch: got %d, want %d", groupChange.Revision, gv2.GetRevision()) + zerolog.Ctx(ctx).Err(err).Msg("Failed to decrypt group change") + return nil, nil + } else if groupChange.Revision != gv2.GetRevision() || groupChange.Revision != portalRevision+1 { + zerolog.Ctx(ctx).Warn(). + Uint32("decrypted_revision", groupChange.Revision). + Uint32("envelope_revision", gv2.GetRevision()). + Uint32("portal_revision", portalRevision). + Msg("Group change revision mismatch, ignoring event") + return nil, nil } - // XXX: is this ID compatible with types.GroupIdentifier? return evt.s.groupChangeToChatInfoChange(ctx, types.GroupIdentifier(evt.Info.ChatID), gv2.GetRevision(), groupChange) } From 4d3b54d3f9fbd0d685c9c74b5ea0c7229ef7b85e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 12 Oct 2026 14:40:06 +0300 Subject: [PATCH 27/84] signalmeow/store: dispatch events for identity changes --- pkg/connector/handlesignal.go | 2 + pkg/libsignalgo/identitykey.go | 4 +- pkg/libsignalgo/prekeybundle.go | 2 +- pkg/libsignalgo/session_test.go | 3 +- pkg/signalmeow/client.go | 6 ++- pkg/signalmeow/events/message.go | 5 +++ pkg/signalmeow/store/container.go | 10 ++++- pkg/signalmeow/store/device.go | 12 ++++++ pkg/signalmeow/store/identity_store.go | 54 +++++++++++++++++++------- pkg/signalmeow/store/noop.go | 4 ++ pkg/signalmeow/store/session_store.go | 33 +++++++++++++++- 11 files changed, 113 insertions(+), 22 deletions(-) diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index 9ec4e23..6777c7b 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -75,6 +75,8 @@ func (s *SignalClient) handleSignalEvent(rawEvt events.SignalEvent) bool { s.queueEmptyWaiter.Set() case *events.LoggedOut: s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: evt.Error.Error()}) + case *events.IdentityChange: + // TODO send notice default: s.UserLogin.Log.Warn().Type("event_type", evt).Msg("Unrecognized signalmeow event type") } diff --git a/pkg/libsignalgo/identitykey.go b/pkg/libsignalgo/identitykey.go index 0226e11..6e5cf14 100644 --- a/pkg/libsignalgo/identitykey.go +++ b/pkg/libsignalgo/identitykey.go @@ -29,8 +29,8 @@ type IdentityKey struct { publicKey *PublicKey } -func NewIdentityKeyFromPublicKey(publicKey *PublicKey) (*IdentityKey, error) { - return &IdentityKey{publicKey: publicKey}, nil +func NewIdentityKeyFromPublicKey(publicKey *PublicKey) *IdentityKey { + return &IdentityKey{publicKey: publicKey} } func NewIdentityKeyFromBytes(bytes []byte) (*IdentityKey, error) { diff --git a/pkg/libsignalgo/prekeybundle.go b/pkg/libsignalgo/prekeybundle.go index 0d97baa..7dae47e 100644 --- a/pkg/libsignalgo/prekeybundle.go +++ b/pkg/libsignalgo/prekeybundle.go @@ -142,5 +142,5 @@ func (pkb *PreKeyBundle) GetIdentityKey() (*IdentityKey, error) { if signalFfiError != nil { return nil, wrapError(signalFfiError) } - return NewIdentityKeyFromPublicKey(wrapPublicKey(pk.raw)) + return NewIdentityKeyFromPublicKey(wrapPublicKey(pk.raw)), nil } diff --git a/pkg/libsignalgo/session_test.go b/pkg/libsignalgo/session_test.go index dd05718..7c25da2 100644 --- a/pkg/libsignalgo/session_test.go +++ b/pkg/libsignalgo/session_test.go @@ -61,8 +61,7 @@ func initializeSessions(t *testing.T, aliceStore, bobStore *InMemorySignalProtoc assert.NoError(t, err) bobPublicIdentityKey := bobIdentityKeyPair.GetPublicKey() - bobIdentityKey, err := libsignalgo.NewIdentityKeyFromPublicKey(bobPublicIdentityKey) - assert.NoError(t, err) + bobIdentityKey := libsignalgo.NewIdentityKeyFromPublicKey(bobPublicIdentityKey) var prekeyID uint32 = 4570 var signedPreKeyID uint32 = 3006 diff --git a/pkg/signalmeow/client.go b/pkg/signalmeow/client.go index e6a03f4..c8898e3 100644 --- a/pkg/signalmeow/client.go +++ b/pkg/signalmeow/client.go @@ -82,7 +82,7 @@ type Client struct { var InMemorySendCacheSize = 2048 func NewClient(device *store.Device, log zerolog.Logger, evtHandler func(events.SignalEvent) bool) *Client { - return &Client{ + c := &Client{ Store: device, Log: log, EventHandler: evtHandler, @@ -94,6 +94,10 @@ func NewClient(device *store.Device, log zerolog.Logger, evtHandler func(events. }, sendCache: exsync.NewRingBuffer[sendCacheKey, *signalpb.Content](InMemorySendCacheSize), } + device.SetIdentityChangeCallback(func(id libsignalgo.ServiceID) { + c.handleEvent(&events.IdentityChange{ServiceID: id}) + }) + return c } func (cli *Client) handleEvent(evt events.SignalEvent) bool { diff --git a/pkg/signalmeow/events/message.go b/pkg/signalmeow/events/message.go index f9d02b5..fdc82f0 100644 --- a/pkg/signalmeow/events/message.go +++ b/pkg/signalmeow/events/message.go @@ -40,6 +40,7 @@ func (*DeleteForMe) isSignalEvent() {} func (*MessageRequestResponse) isSignalEvent() {} func (*QueueEmpty) isSignalEvent() {} func (*LoggedOut) isSignalEvent() {} +func (*IdentityChange) isSignalEvent() {} type MessageInfo struct { Sender uuid.UUID @@ -108,3 +109,7 @@ type MessageRequestResponse struct { type QueueEmpty struct{} type LoggedOut struct{ Error error } + +type IdentityChange struct { + ServiceID libsignalgo.ServiceID +} diff --git a/pkg/signalmeow/store/container.go b/pkg/signalmeow/store/container.go index 45da98f..ed66300 100644 --- a/pkg/signalmeow/store/container.go +++ b/pkg/signalmeow/store/container.go @@ -84,8 +84,14 @@ func (c *Container) scanDevice(row dbutil.Scannable) (*Device, error) { device.AccountEntropyPool = libsignalgo.AccountEntropyPool(accountEntropyPool.String) device.EphemeralBackupKey = libsignalgo.BytesToBackupKey(ephemeralBackupKey) device.MediaRootBackupKey = libsignalgo.BytesToBackupKey(mediaRootBackupKey) - baseStore := &sqlStore{Container: c, AccountID: device.ACI, blockCache: make(map[uuid.UUID]bool)} + baseStore := &sqlStore{ + Container: c, + AccountID: device.ACI, + aciIdentity: libsignalgo.NewIdentityKeyFromPublicKey(device.ACIIdentityKeyPair.GetPublicKey()), + blockCache: make(map[uuid.UUID]bool), + } aciStore := &scopedSQLStore{Container: c, AccountID: device.ACI, ServiceID: device.ACIServiceID()} + baseStore.aciStore = aciStore device.ACIPreKeyStore = aciStore device.ACISessionStore = aciStore device.ACIIdentityStore = &sqlIdentityStore{ @@ -106,6 +112,8 @@ func (c *Container) scanDevice(row dbutil.Scannable) (*Device, error) { OwnKeyPair: device.PNIIdentityKeyPair, LocalRegistrationID: uint32(device.PNIRegistrationID), } + baseStore.pniStore = pniStore + baseStore.pniIdentity = libsignalgo.NewIdentityKeyFromPublicKey(device.PNIIdentityKeyPair.GetPublicKey()) } else { var errPNIlessAccount = fmt.Errorf("account %s has no PNI identity set", device.ACI) device.PNIPreKeyStore = &noopStore{Error: errPNIlessAccount} diff --git a/pkg/signalmeow/store/device.go b/pkg/signalmeow/store/device.go index 64ee65f..dd8d6f9 100644 --- a/pkg/signalmeow/store/device.go +++ b/pkg/signalmeow/store/device.go @@ -21,6 +21,14 @@ type sqlStore struct { blockCacheLock sync.RWMutex blockCache map[uuid.UUID]bool + + aciStore *scopedSQLStore + pniStore *scopedSQLStore + + aciIdentity *libsignalgo.IdentityKey + pniIdentity *libsignalgo.IdentityKey + + identityChangeCallback func(libsignalgo.ServiceID) } type scopedSQLStore struct { @@ -111,6 +119,10 @@ func (d *Device) DoDecryptionTxn(ctx context.Context, fn func(context.Context) e return d.db.DoTxn(ctx, nil, fn) } +func (d *Device) SetIdentityChangeCallback(callback func(libsignalgo.ServiceID)) { + d.sqlStore.identityChangeCallback = callback +} + func (d *Device) ClearDeviceKeys(ctx context.Context) error { // We need to clear out keys associated with the Signal device that no longer has valid credentials if d == nil { diff --git a/pkg/signalmeow/store/identity_store.go b/pkg/signalmeow/store/identity_store.go index 3b2435d..6336f74 100644 --- a/pkg/signalmeow/store/identity_store.go +++ b/pkg/signalmeow/store/identity_store.go @@ -22,6 +22,7 @@ import ( "errors" "fmt" + "github.com/rs/zerolog" "go.mau.fi/util/dbutil" "go.mau.fi/mautrix-signal/pkg/libsignalgo" @@ -78,28 +79,53 @@ func (s *sqlStore) SaveIdentityKey(ctx context.Context, theirServiceID libsignal if err != nil { return false, fmt.Errorf("failed to serialize identity key: %w", err) } - oldKey, err := scanIdentityKey(s.db.QueryRow(ctx, getIdentityKeyQuery, s.AccountID, theirServiceID)) - if err != nil { - return false, fmt.Errorf("failed to get old identity key: %w", err) - } var replacing bool - if oldKey != nil { - equal, err := oldKey.Equal(identityKey) + err = s.db.DoTxn(ctx, nil, func(ctx context.Context) error { + oldKey, err := scanIdentityKey(s.db.QueryRow(ctx, getIdentityKeyQuery, s.AccountID, theirServiceID)) if err != nil { - return false, fmt.Errorf("failed to compare new and old identity keys: %w", err) + return fmt.Errorf("failed to get old identity key: %w", err) } - // We are replacing the old key if the old key exists, and it is not equal to the new key - replacing = !equal - } - _, err = s.db.Exec(ctx, insertIdentityKeyQuery, s.AccountID, theirServiceID, serialized, trustLevel) - if err != nil { - return replacing, fmt.Errorf("failed to insert new identity key: %w", err) + if oldKey != nil { + equal, err := oldKey.Equal(identityKey) + if err != nil { + return fmt.Errorf("failed to compare new and old identity keys: %w", err) + } + // We are replacing the old key if the old key exists, and it is not equal to the new key + replacing = !equal + } + _, err = s.db.Exec(ctx, insertIdentityKeyQuery, s.AccountID, theirServiceID, serialized, trustLevel) + if err != nil { + return fmt.Errorf("failed to insert new identity key: %w", err) + } + if replacing { + zerolog.Ctx(ctx).Debug(). + Stringer("their_service_id", theirServiceID). + Msg("Identity key changed, archiving sessions") + err = s.aciStore.ArchiveAllSessionsForServiceID(ctx, theirServiceID) + if err != nil { + return fmt.Errorf("failed to archive sessions for ACI store: %w", err) + } + if s.pniStore != nil { + err = s.pniStore.ArchiveAllSessionsForServiceID(ctx, theirServiceID) + if err != nil { + return fmt.Errorf("failed to archive sessions for PNI store: %w", err) + } + } + } + return nil + }) + if err == nil && replacing && s.identityChangeCallback != nil { + go s.identityChangeCallback(theirServiceID) } return replacing, err } func (s *sqlStore) IsTrustedIdentity(ctx context.Context, theirServiceID libsignalgo.ServiceID, identityKey *libsignalgo.IdentityKey, direction libsignalgo.SignalDirection) (bool, error) { - // TODO: this should check direction, and probably some other stuff (though whisperfish is pretty basic) + if theirServiceID == s.aciStore.ServiceID { + return identityKey.Equal(s.aciIdentity) + } else if s.pniStore != nil && theirServiceID == s.pniStore.ServiceID { + return identityKey.Equal(s.pniIdentity) + } var trustLevel string err := s.db.QueryRow(ctx, getIdentityKeyTrustLevelQuery, s.AccountID, theirServiceID).Scan(&trustLevel) if errors.Is(err, sql.ErrNoRows) { diff --git a/pkg/signalmeow/store/noop.go b/pkg/signalmeow/store/noop.go index 1798a30..25090cc 100644 --- a/pkg/signalmeow/store/noop.go +++ b/pkg/signalmeow/store/noop.go @@ -123,6 +123,10 @@ func (n *noopStore) RemoveAllSessionsForServiceID(ctx context.Context, theirID l return n.Error } +func (n *noopStore) ArchiveAllSessionsForServiceID(ctx context.Context, theirID libsignalgo.ServiceID) error { + return n.Error +} + func (n *noopStore) RemoveAllSessions(ctx context.Context) error { return n.Error } diff --git a/pkg/signalmeow/store/session_store.go b/pkg/signalmeow/store/session_store.go index 3956714..df312ee 100644 --- a/pkg/signalmeow/store/session_store.go +++ b/pkg/signalmeow/store/session_store.go @@ -53,6 +53,7 @@ type SessionStore interface { // RemoveSession removes the session for the given address. RemoveSession(ctx context.Context, address *libsignalgo.Address) error RemoveAllSessionsForServiceID(ctx context.Context, theirID libsignalgo.ServiceID) error + ArchiveAllSessionsForServiceID(ctx context.Context, theirID libsignalgo.ServiceID) error // RemoveAllSessions removes all sessions for our ACI UUID RemoveAllSessions(ctx context.Context) error } @@ -93,7 +94,37 @@ func (s *scopedSQLStore) AllSessionsForServiceID(ctx context.Context, theirID li if err != nil { return nil, err } - return dbutil.NewRowIterWithError(rows, scanSessionRecord, err).AsList() + var out []SessionAddressTuple + err = dbutil.NewRowIterWithError(rows, scanSessionRecord, err).Iter(func(tuple SessionAddressTuple) (bool, error) { + hasState, err := tuple.Record.HasCurrentState() + if err != nil { + return false, fmt.Errorf("failed to check if session record has current state: %w", err) + } else if hasState { + out = append(out, tuple) + } + return true, nil + }) + return out, err +} + +func (s *scopedSQLStore) ArchiveAllSessionsForServiceID(ctx context.Context, theirID libsignalgo.ServiceID) error { + return s.db.DoTxn(ctx, nil, func(ctx context.Context) error { + rows, err := s.AllSessionsForServiceID(ctx, theirID) + if err != nil { + return err + } + for _, row := range rows { + err = row.Record.ArchiveCurrentState() + if err != nil { + return fmt.Errorf("failed to archive session record for device %d: %w", row.DeviceID, err) + } + err = s.StoreSession(ctx, row.Address, row.Record) + if err != nil { + return fmt.Errorf("failed to store archived session record for device %d: %w", row.DeviceID, err) + } + } + return nil + }) } func (s *scopedSQLStore) RemoveAllSessionsForServiceID(ctx context.Context, theirID libsignalgo.ServiceID) error { From d1f74685c8c0fb8d95be710b7b0c7336b24fb187 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 12 Oct 2026 15:05:46 +0300 Subject: [PATCH 28/84] signalmeow/senderkey: reset shared with list on device removals --- pkg/signalmeow/senderkey.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/signalmeow/senderkey.go b/pkg/signalmeow/senderkey.go index 6e2c2da..344bacf 100644 --- a/pkg/signalmeow/senderkey.go +++ b/pkg/signalmeow/senderkey.go @@ -96,8 +96,14 @@ func (cli *Client) sendToGroupWithSenderKey( SuccessfullySentTo: make([]SuccessfulSendResult, 0), FailedToSendTo: make([]FailedSendResult, 0), } - groupIDStr := types.GroupIdentifier(groupID.String()) + + if retries == 0 { + for _, recipientID := range allRecipients { + cli.addSendCache(recipientID, groupIDStr, messageTimestamp, content) + } + } + deviceIDs, senderKeyRecipients, fallbackRecipients := cli.getDevicesIDs(ctx, allRecipients, sec, result) if len(senderKeyRecipients) == 0 { doUnlock() @@ -130,6 +136,7 @@ func (cli *Client) sendToGroupWithSenderKey( log.Debug(). Any("removed_devices", removedDevices). Msg("Resetting sender key due to recipient device changes") + ski.SharedWith = make(map[libsignalgo.ServiceID][]int) devicesAddedTo = slices.Collect(maps.Keys(deviceIDs)) err = cli.Store.SenderKeyStore.DeleteSenderKey(ctx, myAddress, ski.DistributionID) if err != nil { @@ -190,9 +197,6 @@ func (cli *Client) sendToGroupWithSenderKey( } return nil, err } - for recipientID := range ski.SharedWith { - cli.addSendCache(recipientID, groupIDStr, messageTimestamp, content) - } header := http.Header{} header.Set("Content-Type", string(web.ContentTypeMultiRecipientMessage)) if sec.SendEndorsement != nil { From 4772cdf8b27a168d1b291ad9e5de755d34c93399 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 12 Oct 2026 16:32:33 +0300 Subject: [PATCH 29/84] msgconv/from-signal: use old view-once media behavior if view limited is disabled --- go.mod | 2 +- go.sum | 4 ++-- pkg/msgconv/from-signal.go | 22 ++++++++++++++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 65f7fa3..d6f05b0 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.31.1-0.20261012105425-21d7e51f1444 + maunium.net/go/mautrix v0.31.1-0.20261012132636-34107524d2ab ) require ( diff --git a/go.sum b/go.sum index 9d3fcc0..5f4f15e 100644 --- a/go.sum +++ b/go.sum @@ -113,5 +113,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.31.1-0.20261012105425-21d7e51f1444 h1:Tu5prJ6RCmNDX/uBFUDFUgLZB5gpB7kXAefkyEQIhJ4= -maunium.net/go/mautrix v0.31.1-0.20261012105425-21d7e51f1444/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= +maunium.net/go/mautrix v0.31.1-0.20261012132636-34107524d2ab h1:rCv0s8QwcLeb9Vl68UGIr28jkJkmXE6XLp1Mje0iOYU= +maunium.net/go/mautrix v0.31.1-0.20261012132636-34107524d2ab/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 73f4843..68f5558 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -152,10 +152,24 @@ func (mc *MessageConverter) ToMatrix( return cm } if dm.GetIsViewOnce() { - cm.Disappear.DisappearAt = time.UnixMilli(int64(dm.GetTimestamp())).Add(45 * 24 * time.Hour) - if cm.Disappear.Timer == 0 { - cm.Disappear.Type = event.DisappearingTypeAfterSend - cm.Disappear.Timer = 45 * 24 * time.Hour + if !mc.Bridge.Config.ViewLimitedMedia && (cm.Disappear.Timer == 0 || cm.Disappear.Timer > 5*time.Minute) { + cm.Disappear = database.DisappearingSetting{ + Type: event.DisappearingTypeAfterRead, + Timer: 5 * time.Minute, + } + cm.Parts = append(cm.Parts, &bridgev2.ConvertedMessagePart{ + Type: event.EventMessage, + Content: &event.MessageEventContent{ + MsgType: event.MsgText, + Body: "This is a view-once message. It will disappear in 5 minutes.", + }, + }) + } else { + cm.Disappear.DisappearAt = time.UnixMilli(int64(dm.GetTimestamp())).Add(45 * 24 * time.Hour) + if cm.Disappear.Timer == 0 { + cm.Disappear.Type = event.DisappearingTypeAfterSend + cm.Disappear.Timer = 45 * 24 * time.Hour + } } } for i, att := range dm.GetAttachments() { From 2901b2a60a3d0cff7eea94869c8186c9d9cb7e24 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 13 Oct 2026 14:35:00 +0300 Subject: [PATCH 30/84] signalmeow/provisioning: clean up PerformProvisioning flow --- pkg/signalmeow/provisioning.go | 349 ++++++++++++++------------ pkg/signalmeow/provisioning_cipher.go | 7 +- 2 files changed, 187 insertions(+), 169 deletions(-) diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index 0b8a32c..dc37585 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -87,6 +87,7 @@ func (dle DeviceLinkError) Error() string { func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, deviceName string, allowBackup bool) chan ProvisioningResponse { log := zerolog.Ctx(ctx).With().Str("action", "perform provisioning").Logger() + ctx = log.WithContext(ctx) c := make(chan ProvisioningResponse, 4) go func() { defer close(c) @@ -99,7 +100,7 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev Path: web.WebsocketProvisioningPath, }).String()) if err != nil { - log.Err(err).Any("resp", resp).Msg("error opening provisioning websocket") + log.Err(err).Any("resp", resp).Msg("Failed to open websocket for provisioning") c <- ProvisioningResponse{State: StateProvisioningError, Err: err} return } @@ -108,7 +109,7 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev provisioningURL, err := startProvisioning(timeoutCtx, ws, provisioningCipher, allowBackup) if err != nil { - log.Err(err).Msg("startProvisioning error") + log.Err(err).Msg("Failed to send provisioning start request") c <- ProvisioningResponse{State: StateProvisioningError, Err: err} return } @@ -116,168 +117,192 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev provisioningMessage, err := continueProvisioning(timeoutCtx, ws, provisioningCipher) if err != nil { - log.Err(err).Msg("continueProvisioning error") + log.Err(err).Msg("Failed to send provisioning continue request") c <- ProvisioningResponse{State: StateProvisioningError, Err: err} return } - ws.Close(websocket.StatusNormalClosure, "") + _ = ws.Close(websocket.StatusNormalClosure, "") - aciPublicKey := exerrors.Must(libsignalgo.DeserializePublicKey(provisioningMessage.GetAciIdentityKeyPublic())) - aciPrivateKey := exerrors.Must(libsignalgo.DeserializePrivateKey(provisioningMessage.GetAciIdentityKeyPrivate())) - aciIdentityKeyPair := exerrors.Must(libsignalgo.NewIdentityKeyPair(aciPublicKey, aciPrivateKey)) - profileKey := libsignalgo.ProfileKey(provisioningMessage.GetProfileKey()) - - password := random.String(22) - code := provisioningMessage.ProvisioningCode - aciRegistrationID := mrand.IntN(16383) + 1 - aciSignedPreKey := GenerateSignedPreKey(1, aciIdentityKeyPair) - aciPQLastResortPreKey := GenerateKyberPreKeys(1, 1, aciIdentityKeyPair)[0] - var pniIdentityKeyPair *libsignalgo.IdentityKeyPair - var pniRegistrationID int - var pniSignedPreKey *libsignalgo.SignedPreKeyRecord - var pniPQLastResortPreKey *libsignalgo.KyberPreKeyRecord - var hasE164 bool - aci, err := ParseStringOrBinaryServiceID(provisioningMessage.GetAci(), provisioningMessage.GetAciBinary()) + data, err := finishProvisioning(ctx, deviceStore, provisioningMessage, deviceName) if err != nil { - log.Err(err).Msg("error parsing ACI") - c <- ProvisioningResponse{State: StateProvisioningError, Err: fmt.Errorf("failed to parse aci: %w", err)} - return - } - pni, _ := ParseStringOrBinaryUUID(provisioningMessage.GetPni(), provisioningMessage.GetPniBinary()) - if pni != uuid.Nil { - hasE164 = true - - pniPublicKey := exerrors.Must(libsignalgo.DeserializePublicKey(provisioningMessage.GetPniIdentityKeyPublic())) - pniPrivateKey := exerrors.Must(libsignalgo.DeserializePrivateKey(provisioningMessage.GetPniIdentityKeyPrivate())) - pniIdentityKeyPair = exerrors.Must(libsignalgo.NewIdentityKeyPair(pniPublicKey, pniPrivateKey)) - - pniRegistrationID = mrand.IntN(16383) + 1 - pniSignedPreKey = GenerateSignedPreKey(1, pniIdentityKeyPair) - pniPQLastResortPreKey = GenerateKyberPreKeys(1, 1, pniIdentityKeyPair)[0] - } - zerolog.Ctx(ctx).Trace().Any("msg", provisioningMessage).Msg("Provisioning message") - deviceResponse, err := confirmDevice( - ctx, - aci.String(), - password, - *code, - hasE164, - aciRegistrationID, - pniRegistrationID, - aciSignedPreKey, - pniSignedPreKey, - aciPQLastResortPreKey, - pniPQLastResortPreKey, - aciIdentityKeyPair, - deviceName, - ) - if err != nil { - log.Err(err).Msg("confirmDevice error") + log.Err(err).Msg("Failed to finish provisioning") c <- ProvisioningResponse{State: StateProvisioningError, Err: err} - return - } - - deviceId := 1 - if deviceResponse.DeviceID != 0 { - deviceId = deviceResponse.DeviceID - } - - data := &store.DeviceData{ - ACIIdentityKeyPair: aciIdentityKeyPair, - PNIIdentityKeyPair: pniIdentityKeyPair, - ACIRegistrationID: aciRegistrationID, - PNIRegistrationID: pniRegistrationID, - ACI: deviceResponse.ACI, - PNI: deviceResponse.PNI, - DeviceID: deviceId, - Number: provisioningMessage.GetNumber(), - Password: password, - AccountEntropyPool: libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()), - EphemeralBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetEphemeralBackupKey()), - MediaRootBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetMediaRootBackupKey()), - AuthCredentialSalt: provisioningMessage.GetAuthCredentialSalt(), - } - if provisioningMessage.GetAccountEntropyPool() != "" { - data.MasterKey, err = libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()).DeriveSVRKey() - if err != nil { - log.Err(err).Msg("Failed to derive master key from account entropy pool") - } else { - log.Debug().Msg("Derived master key from account entropy pool") - } } else { - log.Warn().Msg("No account entropy pool in provisioning message") + c <- ProvisioningResponse{State: StateProvisioningDataReceived, ProvisioningData: data} } - - // Store the provisioning data - err = deviceStore.PutDevice(ctx, data) - if err != nil { - log.Err(err).Msg("error storing new device") - c <- ProvisioningResponse{State: StateProvisioningError, Err: err} - return - } - - device, err := deviceStore.DeviceByACI(ctx, data.ACI) - if err != nil { - log.Err(err).Msg("error retrieving new device") - c <- ProvisioningResponse{State: StateProvisioningError, Err: err} - return - } - - device.ClearDeviceKeys(ctx) - - // Store identity keys? - _, err = device.IdentityKeyStore.SaveIdentityKey(ctx, device.ACIServiceID(), device.ACIIdentityKeyPair.GetIdentityKey()) - if err != nil { - c <- ProvisioningResponse{ - State: StateProvisioningError, - Err: fmt.Errorf("error saving identity key: %w", err), - } - return - } - device.ACIPreKeyStore.StoreSignedPreKey(ctx, 1, aciSignedPreKey) - device.ACIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, aciPQLastResortPreKey) - if hasE164 { - _, err = device.IdentityKeyStore.SaveIdentityKey(ctx, device.PNIServiceID(), device.PNIIdentityKeyPair.GetIdentityKey()) - if err != nil { - c <- ProvisioningResponse{ - State: StateProvisioningError, - Err: fmt.Errorf("error saving identity key: %w", err), - } - return - } - device.PNIPreKeyStore.StoreSignedPreKey(ctx, 1, pniSignedPreKey) - device.PNIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, pniPQLastResortPreKey) - } - - _, err = device.RecipientStore.LoadAndUpdateRecipient(ctx, data.ACI, data.PNI, func(recipient *types.Recipient) (bool, error) { - recipient.E164 = data.Number - recipient.Profile.Key = profileKey - return true, nil - }) - if err != nil { - c <- ProvisioningResponse{ - State: StateProvisioningError, - Err: fmt.Errorf("error storing profile key: %w", err), - } - return - } - - // Return the provisioning data - c <- ProvisioningResponse{State: StateProvisioningDataReceived, ProvisioningData: data} }() return c } +func finishProvisioning( + ctx context.Context, + deviceStore store.DeviceStore, + provisioningMessage *signalpb.ProvisionMessage, + deviceName string, +) (*store.DeviceData, error) { + aciPublicKey, err := libsignalgo.DeserializePublicKey(provisioningMessage.GetAciIdentityKeyPublic()) + if err != nil { + return nil, fmt.Errorf("failed to deserialize aci public key: %w", err) + } + aciPrivateKey, err := libsignalgo.DeserializePrivateKey(provisioningMessage.GetAciIdentityKeyPrivate()) + if err != nil { + return nil, fmt.Errorf("failed to deserialize aci private key: %w", err) + } + aciIdentityKeyPair, err := libsignalgo.NewIdentityKeyPair(aciPublicKey, aciPrivateKey) + if err != nil { + return nil, fmt.Errorf("failed to create aci identity key pair: %w", err) + } + profileKey := libsignalgo.ProfileKey(provisioningMessage.GetProfileKey()) + + password := random.String(22) + code := provisioningMessage.ProvisioningCode + aciRegistrationID := mrand.IntN(16383) + 1 + aciSignedPreKey := GenerateSignedPreKey(1, aciIdentityKeyPair) + aciPQLastResortPreKey := GenerateKyberPreKeys(1, 1, aciIdentityKeyPair)[0] + var pniIdentityKeyPair *libsignalgo.IdentityKeyPair + var pniRegistrationID int + var pniSignedPreKey *libsignalgo.SignedPreKeyRecord + var pniPQLastResortPreKey *libsignalgo.KyberPreKeyRecord + var hasE164 bool + aci, err := ParseStringOrBinaryServiceID(provisioningMessage.GetAci(), provisioningMessage.GetAciBinary()) + if err != nil { + return nil, fmt.Errorf("failed to parse aci: %w", err) + } + pni, _ := ParseStringOrBinaryUUID(provisioningMessage.GetPni(), provisioningMessage.GetPniBinary()) + if pni != uuid.Nil { + hasE164 = true + + pniPublicKey, err := libsignalgo.DeserializePublicKey(provisioningMessage.GetPniIdentityKeyPublic()) + if err != nil { + return nil, fmt.Errorf("failed to deserialize pni public key: %w", err) + } + pniPrivateKey, err := libsignalgo.DeserializePrivateKey(provisioningMessage.GetPniIdentityKeyPrivate()) + if err != nil { + return nil, fmt.Errorf("failed to deserialize pni private key: %w", err) + } + pniIdentityKeyPair, err = libsignalgo.NewIdentityKeyPair(pniPublicKey, pniPrivateKey) + if err != nil { + return nil, fmt.Errorf("failed to create pni identity key pair: %w", err) + } + + pniRegistrationID = mrand.IntN(16383) + 1 + pniSignedPreKey = GenerateSignedPreKey(1, pniIdentityKeyPair) + pniPQLastResortPreKey = GenerateKyberPreKeys(1, 1, pniIdentityKeyPair)[0] + } + zerolog.Ctx(ctx).Trace().Any("msg", provisioningMessage).Msg("Provisioning message") + deviceResponse, err := confirmDevice( + ctx, + aci.String(), + password, + *code, + hasE164, + aciRegistrationID, + pniRegistrationID, + aciSignedPreKey, + pniSignedPreKey, + aciPQLastResortPreKey, + pniPQLastResortPreKey, + aciIdentityKeyPair, + deviceName, + ) + if err != nil { + return nil, fmt.Errorf("failed to confirm device: %w", err) + } + + deviceId := 1 + if deviceResponse.DeviceID != 0 { + deviceId = deviceResponse.DeviceID + } + + data := &store.DeviceData{ + ACIIdentityKeyPair: aciIdentityKeyPair, + PNIIdentityKeyPair: pniIdentityKeyPair, + ACIRegistrationID: aciRegistrationID, + PNIRegistrationID: pniRegistrationID, + ACI: deviceResponse.ACI, + PNI: deviceResponse.PNI, + DeviceID: deviceId, + Number: provisioningMessage.GetNumber(), + Password: password, + AccountEntropyPool: libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()), + EphemeralBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetEphemeralBackupKey()), + MediaRootBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetMediaRootBackupKey()), + AuthCredentialSalt: provisioningMessage.GetAuthCredentialSalt(), + } + if provisioningMessage.GetAccountEntropyPool() != "" { + data.MasterKey, err = libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()).DeriveSVRKey() + if err != nil { + zerolog.Ctx(ctx).Err(err).Msg("Failed to derive master key from account entropy pool") + } else { + zerolog.Ctx(ctx).Debug().Msg("Derived master key from account entropy pool") + } + } else { + zerolog.Ctx(ctx).Warn().Msg("No account entropy pool in provisioning message") + } + + // Store the provisioning data + err = deviceStore.PutDevice(ctx, data) + if err != nil { + return nil, fmt.Errorf("failed to store new device: %w", err) + } + + device, err := deviceStore.DeviceByACI(ctx, data.ACI) + if err != nil { + return nil, fmt.Errorf("failed to retrieve stored device: %w", err) + } + + err = device.ClearDeviceKeys(ctx) + if err != nil { + zerolog.Ctx(ctx).Warn().Err(err).Msg("Failed to clear device keys") + } + + _, err = device.IdentityKeyStore.SaveIdentityKey(ctx, device.ACIServiceID(), device.ACIIdentityKeyPair.GetIdentityKey()) + if err != nil { + return nil, fmt.Errorf("failed to save aci identity key: %w", err) + } + err = device.ACIPreKeyStore.StoreSignedPreKey(ctx, 1, aciSignedPreKey) + if err != nil { + return nil, fmt.Errorf("failed to save signed prekey for aci: %w", err) + } + err = device.ACIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, aciPQLastResortPreKey) + if err != nil { + return nil, fmt.Errorf("failed to save last resort kyber prekey for aci: %w", err) + } + if hasE164 { + _, err = device.IdentityKeyStore.SaveIdentityKey(ctx, device.PNIServiceID(), device.PNIIdentityKeyPair.GetIdentityKey()) + if err != nil { + return nil, fmt.Errorf("failed to save pni identity key: %w", err) + } + err = device.PNIPreKeyStore.StoreSignedPreKey(ctx, 1, pniSignedPreKey) + if err != nil { + return nil, fmt.Errorf("failed to save signed prekey for pni: %w", err) + } + err = device.PNIPreKeyStore.StoreLastResortKyberPreKey(ctx, 1, pniPQLastResortPreKey) + if err != nil { + return nil, fmt.Errorf("failed to save last resort kyber prekey for pni: %w", err) + } + } + + _, err = device.RecipientStore.LoadAndUpdateRecipient(ctx, data.ACI, data.PNI, func(recipient *types.Recipient) (bool, error) { + recipient.E164 = data.Number + recipient.Profile.Key = profileKey + return true, nil + }) + if err != nil { + return nil, fmt.Errorf("failed to save profile key: %w", err) + } + + return data, nil +} + // Returns the provisioningUrl and an error func startProvisioning(ctx context.Context, ws *websocket.Conn, provisioningCipher *ProvisioningCipher, allowBackup bool) (string, error) { - log := zerolog.Ctx(ctx).With().Str("action", "start provisioning").Logger() pubKey := provisioningCipher.GetPublicKey() msg := &signalpb.WebSocketMessage{} err := wspb.Read(ctx, ws, msg) if err != nil { - log.Err(err).Msg("error reading websocket message") - return "", err + return "", fmt.Errorf("failed to read websocket message: %w", err) } // Ensure the message is a request and has a valid verb and path @@ -309,20 +334,17 @@ func startProvisioning(ctx context.Context, ws *websocket.Conn, provisioningCiph response := web.CreateWSResponse(ctx, msg.GetRequest().GetId(), 200) err = wspb.Write(ctx, ws, response) if err != nil { - log.Err(err).Msg("error writing websocket message") - return "", err + return "", fmt.Errorf("failed to write websocket message: %w", err) } return provisioningURL, nil } func continueProvisioning(ctx context.Context, ws *websocket.Conn, provisioningCipher *ProvisioningCipher) (*signalpb.ProvisionMessage, error) { - log := zerolog.Ctx(ctx).With().Str("action", "continue provisioning").Logger() envelope := &signalpb.ProvisionEnvelope{} msg := &signalpb.WebSocketMessage{} err := wspb.Read(ctx, ws, msg) if err != nil { - log.Err(err).Msg("error reading websocket message") - return nil, err + return nil, fmt.Errorf("failed to read websocket message: %w", err) } // Wait for provisioning message in a request, then send a response @@ -332,22 +354,22 @@ func continueProvisioning(ctx context.Context, ws *websocket.Conn, provisioningC err = proto.Unmarshal(msg.Request.Body, envelope) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to unmarshal provisioning message: %w", err) } response := web.CreateWSResponse(ctx, *msg.Request.Id, 200) err = wspb.Write(ctx, ws, response) if err != nil { - log.Err(err).Msg("error writing websocket message") - return nil, err + return nil, fmt.Errorf("failed to write websocket message: %w", err) } } else { - err = fmt.Errorf("invalid provisioning message, type: %v, verb: %v, path: %v", *msg.Type, *msg.Request.Verb, *msg.Request.Path) - log.Err(err).Msg("problem reading websocket message") - return nil, err + return nil, fmt.Errorf("invalid provisioning message, type: %v, verb: %v, path: %v", *msg.Type, *msg.Request.Verb, *msg.Request.Path) } provisioningMessage, err := provisioningCipher.Decrypt(envelope) - return provisioningMessage, err + if err != nil { + return nil, fmt.Errorf("failed to decrypt provisioning message: %w", err) + } + return provisioningMessage, nil } func getSignalCapabilities(phonenumberless bool) map[string]any { @@ -398,22 +420,21 @@ func confirmDevice( return nil, fmt.Errorf("failed to encrypt device name: %w", err) } - ws, resp, err := web.OpenWebsocket(ctx, (&url.URL{ + ws, _, err := web.OpenWebsocket(ctx, (&url.URL{ Scheme: "wss", Host: web.APIHostname, Path: web.WebsocketPath, }).String()) if err != nil { - log.Err(err).Any("resp", resp).Msg("error opening websocket") - return nil, err + return nil, fmt.Errorf("failed to open websocket: %w", err) } defer ws.Close(websocket.StatusInternalError, "Websocket StatusInternalError") - aciSignedPreKeyJson, err := SignedPreKeyToJSON(aciSignedPreKey) + aciSignedPreKeyJSON, err := SignedPreKeyToJSON(aciSignedPreKey) if err != nil { return nil, fmt.Errorf("failed to convert signed ACI prekey to JSON: %w", err) } - aciPQLastResortPreKeyJson, err := KyberPreKeyToJSON(aciPQLastResortPreKey) + aciPQLastResortPreKeyJSON, err := KyberPreKeyToJSON(aciPQLastResortPreKey) if err != nil { return nil, fmt.Errorf("failed to convert ACI kyber last resort prekey to JSON: %w", err) } @@ -427,8 +448,8 @@ func confirmDevice( data := map[string]any{ "verificationCode": code, "accountAttributes": accountAttributes, - "aciSignedPreKey": aciSignedPreKeyJson, - "aciPqLastResortPreKey": aciPQLastResortPreKeyJson, + "aciSignedPreKey": aciSignedPreKeyJSON, + "aciPqLastResortPreKey": aciPQLastResortPreKeyJSON, } if hasE164 { accountAttributes["pniRegistrationId"] = pniRegistrationID diff --git a/pkg/signalmeow/provisioning_cipher.go b/pkg/signalmeow/provisioning_cipher.go index 23a23dc..6ffde84 100644 --- a/pkg/signalmeow/provisioning_cipher.go +++ b/pkg/signalmeow/provisioning_cipher.go @@ -25,6 +25,7 @@ import ( "fmt" "io" + "go.mau.fi/util/exerrors" "golang.org/x/crypto/hkdf" "google.golang.org/protobuf/proto" @@ -42,11 +43,7 @@ func NewProvisioningCipher() *ProvisioningCipher { func (c *ProvisioningCipher) GetPublicKey() *libsignalgo.PublicKey { if c.keyPair == nil { - keyPair, err := libsignalgo.GenerateIdentityKeyPair() - if err != nil { - panic(fmt.Errorf("unable to generate key pair: %w", err)) - } - c.keyPair = keyPair + c.keyPair = exerrors.Must(libsignalgo.GenerateIdentityKeyPair()) } return c.keyPair.GetPublicKey() } From bb1cb86343ccf1e9ba0f5fbf160b2ea5a811eac5 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 13 Oct 2026 12:29:32 +0000 Subject: [PATCH 31/84] handlesignal: don't count storage service updates as contact syncs (#676) --- pkg/connector/handlesignal.go | 3 +++ pkg/signalmeow/receiving.go | 2 +- pkg/signalmeow/sending.go | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index 6777c7b..a25b77a 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -877,6 +877,9 @@ func (s *SignalClient) handleSignalContactList(evt *events.ContactList) { }) } } + if evt.IsFromDB { + return + } s.UserLogin.Metadata.(*signalid.UserLoginMetadata).LastContactSync = jsontime.UnixMilliNow() err := s.UserLogin.Save(ctx) if err != nil { diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 1dde3ea..f0d69df 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -262,7 +262,7 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection case <-loopCtx.Done(): return case <-initialConnectChan: - log.Info().Msg("Both websockets connected, sending contacts sync request") + log.Info().Msg("Both websockets connected") err = cli.RegisterCapabilities(loopCtx) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to register capabilities") diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index 868328f..f48a252 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -430,6 +430,7 @@ func (cli *Client) SendContactSyncRequest(ctx context.Context) error { } cli.LastContactRequestTime = time.Now() + log.Info().Msg("Sending contact sync request") _, err := cli.sendContent(ctx, cli.Store.ACIServiceID(), uint64(time.Now().UnixMilli()), WrapSyncMessage(&signalpb.SyncMessage{ Content: &signalpb.SyncMessage_Request_{ Request: &signalpb.SyncMessage_Request{ From 20d192a7ac3bad151b5ccd0c64bd6aa0f4458438 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 13 Oct 2026 13:23:52 +0000 Subject: [PATCH 32/84] handlematrix: leave groups when deleting them (#675) --- pkg/connector/handlematrix.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 4e886c1..7360d67 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -763,6 +763,24 @@ func (s *SignalClient) HandleMatrixDeleteChat(ctx context.Context, msg *bridgev2 return fmt.Errorf("failed to parse portal ID: %w", err) } + if groupID != "" { + memberInfo, err := s.Main.Bridge.Matrix.GetMemberInfo(ctx, msg.Portal.MXID, s.UserLogin.UserMXID) + if err != nil { + return fmt.Errorf("failed to get own member info: %w", err) + } else if memberInfo.Membership == event.MembershipJoin { + portalMeta := msg.Portal.Metadata.(*signalid.PortalMetadata) + ownACI := s.Client.Store.ACI + revision, err := s.Client.UpdateGroup(ctx, &signalmeow.GroupChange{ + DeleteMembers: []*uuid.UUID{&ownACI}, + Revision: portalMeta.Revision + 1, + }, groupID) + if err != nil { + return fmt.Errorf("failed to leave group before deleting chat: %w", err) + } + portalMeta.Revision = revision + } + } + if msg.Content.FromMessageRequest { // TODO block and delete support? err = s.syncMessageRequestResponse(ctx, msg.Portal, signalpb.SyncMessage_MessageRequestResponse_DELETE) From cbd299ee64f60e952b7323519cf388857f73f92b Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Wed, 14 Oct 2026 10:59:36 +0000 Subject: [PATCH 33/84] connector: don't generate duplicate transaction IDs (#677) --- pkg/connector/connector.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go index e87fcb0..392a100 100644 --- a/pkg/connector/connector.go +++ b/pkg/connector/connector.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "strconv" + "sync" "time" "github.com/google/uuid" @@ -44,6 +45,9 @@ type SignalConnector struct { Store *store.Container Bridge *bridgev2.Bridge Config SignalConfig + + lastTxnTS int64 + lastTxnTSLock sync.Mutex } var _ bridgev2.NetworkConnector = (*SignalConnector)(nil) @@ -133,5 +137,8 @@ func (s *SignalConnector) LoadUserLogin(ctx context.Context, login *bridgev2.Use } func (s *SignalConnector) GenerateTransactionID(userID id.UserID, roomID id.RoomID, eventType event.Type) networkid.RawTransactionID { - return networkid.RawTransactionID(strconv.FormatInt(time.Now().UnixMilli(), 10)) + s.lastTxnTSLock.Lock() + defer s.lastTxnTSLock.Unlock() + s.lastTxnTS = max(time.Now().UnixMilli(), s.lastTxnTS+1) + return networkid.RawTransactionID(strconv.FormatInt(s.lastTxnTS, 10)) } From d737b89d3d370231f7620801d1c6be38cbb30e60 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 16 Oct 2026 12:17:30 +0300 Subject: [PATCH 34/84] libsignalgo: add custom build tag to opt into clang mode --- pkg/libsignalgo/fixedarray_clang.go | 2 +- pkg/libsignalgo/fixedarray_gcc.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/libsignalgo/fixedarray_clang.go b/pkg/libsignalgo/fixedarray_clang.go index 3dc0cd2..a364eb5 100644 --- a/pkg/libsignalgo/fixedarray_clang.go +++ b/pkg/libsignalgo/fixedarray_clang.go @@ -1,4 +1,4 @@ -//go:build darwin || android || ios || (windows && arm64) +//go:build darwin || android || ios || (windows && arm64) || clang package libsignalgo diff --git a/pkg/libsignalgo/fixedarray_gcc.go b/pkg/libsignalgo/fixedarray_gcc.go index 6490494..14bd230 100644 --- a/pkg/libsignalgo/fixedarray_gcc.go +++ b/pkg/libsignalgo/fixedarray_gcc.go @@ -1,4 +1,4 @@ -//go:build !(darwin || android || ios || (windows && arm64)) +//go:build !(darwin || android || ios || (windows && arm64) || clang) package libsignalgo From d129f0ecc6bd29cfb5e54b18e025bd0c8a20a4bf Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 16 Oct 2026 18:03:24 +0300 Subject: [PATCH 35/84] Bump version to v26.10 --- CHANGELOG.md | 19 +++++++++++ cmd/mautrix-signal/main.go | 2 +- go.mod | 28 +++++++-------- go.sum | 70 ++++++++++++++------------------------ 4 files changed, 60 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94898c8..54ba2ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +# v26.10 + +* Updated libsignal to v0.105.0. +* Added support for phonenumberless accounts. +* Added support for starting chats with usernames and username links. +* Added support for blocking and unblocking users on Signal. +* Added support for new view-limited media interface in bridgev2. +* Added proper sender certificate validation. +* Changed storage sync to only sync once if repeated fetch latest notices are + received. +* Fixed contact syncs not happening even when `sync_contacts_on_startup` was + set to true. +* Fixed Signal encryption using wrong timestamp precision for session expiry. +* Fixed sender key sharing not handling removed users properly. +* Fixed handling retry receipts with no sender key info. +* Fixed deadlock in prekey upload loop if the client gets logged out. +* Fixed infinite loop when importing sticker packs with duplicate emoji + shortcuts. + # v26.09 * Bumped minimum Go version to 1.26. diff --git a/cmd/mautrix-signal/main.go b/cmd/mautrix-signal/main.go index 0baeb27..b5eda11 100644 --- a/cmd/mautrix-signal/main.go +++ b/cmd/mautrix-signal/main.go @@ -37,7 +37,7 @@ var m = mxmain.BridgeMain{ Name: "mautrix-signal", URL: "https://github.com/mautrix/signal", Description: "A Matrix-Signal puppeting bridge.", - Version: "26.09", + Version: "26.10", SemCalVer: true, Connector: &connector.SignalConnector{}, diff --git a/go.mod b/go.mod index d6f05b0..89ed63d 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module go.mau.fi/mautrix-signal go 1.26.0 -toolchain go1.27.1 +toolchain go1.27.2 tool go.mau.fi/util/cmd/maubuild @@ -13,16 +13,16 @@ require ( github.com/mattn/go-pointer v0.0.1 github.com/rs/zerolog v1.35.1 github.com/stretchr/testify v1.12.0 - github.com/tidwall/gjson v1.19.0 - go.mau.fi/util v0.10.2-0.20260918225449-a4c0d5b86aa8 - golang.org/x/crypto v0.57.0 - golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba - golang.org/x/net v0.59.0 - golang.org/x/sync v0.23.0 - google.golang.org/grpc v1.83.2 + github.com/tidwall/gjson v1.20.0 + go.mau.fi/util v0.11.0 + golang.org/x/crypto v0.58.0 + golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e + golang.org/x/net v0.61.0 + golang.org/x/sync v0.24.0 + google.golang.org/grpc v1.84.0 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.31.1-0.20261012132636-34107524d2ab + maunium.net/go/mautrix v0.32.0 ) require ( @@ -33,7 +33,7 @@ require ( github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-sqlite3 v1.14.52 // indirect - github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 // indirect + github.com/petermattis/goid v0.0.0-20260918085751-abfca077860b // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/rs/xid v1.6.0 // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect @@ -42,10 +42,10 @@ require ( github.com/tidwall/sjson v1.2.5 // indirect github.com/yuin/goldmark v1.8.6 // indirect go.mau.fi/zeroconfig v0.2.0 // indirect - golang.org/x/mod v0.41.0 // indirect - golang.org/x/sys v0.48.0 // indirect - golang.org/x/text v0.42.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect + golang.org/x/mod v0.42.0 // indirect + golang.org/x/sys v0.49.0 // indirect + golang.org/x/text v0.43.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260706201446-f0a921348800 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect maunium.net/go/mauflag v1.0.0 // indirect diff --git a/go.sum b/go.sum index 5f4f15e..e5a7857 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA= github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= @@ -11,10 +9,6 @@ github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff h1:4N8wnS3f1hNHSmFD5zgFkWCyA4L1kCDkImPAtK7D6tg= github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff/go.mod h1:HMJKR5wlh/ziNp+sHEDV2ltblO4JD2+IdDOWtGcQBTM= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -38,8 +32,8 @@ github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= github.com/mattn/go-sqlite3 v1.14.52 h1:wVbm2Qnf4OXkqhBTSPuCRZDRnxfbVrrmiCEroVdog8U= github.com/mattn/go-sqlite3 v1.14.52/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= -github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 h1:lcWAnrqr2nNfDiArwFNHCE4787Mw2tCdVSOXCru0/0E= -github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20260918085751-abfca077860b h1:OzNsuVdSWGwXvWKTtChx9ve89k4cFJ6NxYM4Aw4/f+E= +github.com/petermattis/goid v0.0.0-20260918085751-abfca077860b/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= @@ -53,8 +47,8 @@ github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDq github.com/stretchr/testify v1.12.0 h1:K6Mr6jO9JICuend/5xzTM03ydSV3vdNRYAdPSukj8uI= github.com/stretchr/testify v1.12.0/go.mod h1:bOYBZb5qJ00vPzWfIqBUZPaxK8jWiXc6d3ErP4Ca9Gw= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.19.0 h1:xwxm7n691Uf3u5OFjzngavjGTh55KX5q/9w9xHW88JU= -github.com/tidwall/gjson v1.19.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc= +github.com/tidwall/gjson v1.20.0 h1:+agJ3rEzKcCXKDKo0ml26UROcpcAlnZyjq+TjbY5Fto= +github.com/tidwall/gjson v1.20.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= @@ -65,43 +59,31 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/yuin/goldmark v1.8.6 h1:d0VcaP1sx9GkFVkoW+KtggpGi2KZ965i14b0+bDQST4= github.com/yuin/goldmark v1.8.6/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -go.mau.fi/util v0.10.2-0.20260918225449-a4c0d5b86aa8 h1:PxaO4u8ti7Eef1WKPAINXrcUkqKshE+n239UtbbJOn4= -go.mau.fi/util v0.10.2-0.20260918225449-a4c0d5b86aa8/go.mod h1:40TDo7/ekSeOjgr8KAmX31Yf4zrOF94j83WQB+u5ZPc= +go.mau.fi/util v0.11.0 h1:JNEpkVRxfTdJUC0DIGKiRlLKzl4G/qLX/eVzoP7QuwY= +go.mau.fi/util v0.11.0/go.mod h1:04AEFVsc4zNdIkDC1gkdqbg/nZFolHY50pyXh2DSy7s= go.mau.fi/zeroconfig v0.2.0 h1:e/OGEERqVRRKlgaro7E6bh8xXiKFSXB3eNNIud7FUjU= go.mau.fi/zeroconfig v0.2.0/go.mod h1:J0Vn0prHNOm493oZoQ84kq83ZaNCYZnq+noI1b1eN8w= -go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= -go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= -go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= -go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= -golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= -golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= -golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba h1:Ck8QetSgk912qxWLMCKxd0in+aiyBQyDSMae6e/xmpU= -golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba/go.mod h1:50RgIsmK7OwqzTTeqcSXQW8SswW0o8fRcDxmqGluJ8E= -golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= -golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= -golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= -golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= -golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= -golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= +golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= +golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e h1:HgI6W1OolKK6tcV74is+rl9SMT0njsHlp0TbQiGXI/A= +golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e/go.mod h1:DBoxwWhjaW8DJJw/YeM4zpeOKMC1FMXSblsYy+1mFSw= +golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg= +golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs= +golang.org/x/net v0.61.0 h1:RR+6j/BTBCrggOLugxa+66R8FvoN6MHlzDlZIbN9YFw= +golang.org/x/net v0.61.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= +golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA= +golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= -golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= -golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= -golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= +golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= +golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= +golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= -google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= -google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260706201446-f0a921348800 h1:qEHAMpSaUhtD0p3NbEEI83HwNGFxEwaSJ1G9PLnCBZE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260706201446-f0a921348800/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.84.0 h1:soMyaPJ8pAak5PIQ0DGBUir0XRo2fRoMqhNWMLlLxO0= +google.golang.org/grpc v1.84.0/go.mod h1:ljCht0DrxQrXBDRTZp52Qxh3Ffk8CdYm2sj4O2QN2C0= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -113,5 +95,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.31.1-0.20261012132636-34107524d2ab h1:rCv0s8QwcLeb9Vl68UGIr28jkJkmXE6XLp1Mje0iOYU= -maunium.net/go/mautrix v0.31.1-0.20261012132636-34107524d2ab/go.mod h1:t97J+6KmbmeoepWOunBgpu1xIvuBpI36ebBqIbYT8Jk= +maunium.net/go/mautrix v0.32.0 h1:xuAZzzyWce0pFkBhV/MCLFiJdVs2rFkY3Eep7hNng4I= +maunium.net/go/mautrix v0.32.0/go.mod h1:tZSwPzw+/0pa0dxGufkh0uJqM84BNxB6e2I0+S0UyjU= From 0915c775cf8244df19fb68d64fc8895639a0dce1 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Fri, 16 Oct 2026 18:42:29 -0400 Subject: [PATCH 36/84] msgconv/from-matrix: send bodies over 2 KiB as long text attachments (#680) --- pkg/connector/capabilities.go | 8 ++++---- pkg/connector/handlematrix.go | 5 +++-- pkg/msgconv/from-matrix.go | 25 +++++++++++++++++++++++++ pkg/msgconv/from-signal.go | 4 ++-- pkg/msgconv/msgconv.go | 10 ++++++++++ 5 files changed, 44 insertions(+), 8 deletions(-) diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index 05c7e60..b62d34f 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -40,7 +40,7 @@ func supportedIfFFmpeg() event.CapabilitySupportLevel { } func capID() string { - base := "fi.mau.signal.capabilities.2026_10_06" + base := "fi.mau.signal.capabilities.2026_10_16" if ffmpeg.Supported() { return base + "+ffmpeg" } @@ -48,7 +48,7 @@ func capID() string { } const MaxFileSize = 100 * 1024 * 1024 -const MaxTextLength = 2000 +const MaxTextLength = 64 * 1024 var signalCaps = &event.RoomFeatures{ ID: capID(), @@ -158,7 +158,7 @@ var signalCaps = &event.RoomFeatures{ event.MemberActionBan: event.CapLevelFullySupported, event.MemberActionKick: event.CapLevelFullySupported, }, - MaxTextLength: MaxTextLength, // TODO support arbitrary sized text messages with files + MaxTextLength: MaxTextLength, LocationMessage: event.CapLevelPartialSupport, Poll: event.CapLevelFullySupported, PollEnd: event.CapLevelUnsupported, @@ -263,5 +263,5 @@ func (s *SignalConnector) GetCapabilities() *bridgev2.NetworkGeneralCapabilities } func (s *SignalConnector) GetBridgeInfoVersion() (info, capabilities int) { - return 1, 13 + return 1, 14 } diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 7360d67..8812447 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -37,6 +37,7 @@ import ( "maunium.net/go/mautrix/event" "go.mau.fi/mautrix-signal/pkg/libsignalgo" + "go.mau.fi/mautrix-signal/pkg/msgconv" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" @@ -126,7 +127,7 @@ func (s *SignalClient) HandleMatrixMessage(ctx context.Context, msg *bridgev2.Ma return nil, err } return s.doSendMessage(ctx, msg, converted, &signalid.MessageMetadata{ - ContainsAttachments: len(converted.Attachments) > 0, + ContainsAttachments: msgconv.ContainsAttachments(converted), ViewOnce: converted.GetIsViewOnce(), }) } @@ -211,7 +212,7 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri } prevID := msg.EditTarget.ID msg.EditTarget.ID = signalid.MakeMessageID(s.Client.Store.ACI, ts) - msg.EditTarget.Metadata = &signalid.MessageMetadata{ContainsAttachments: len(converted.Attachments) > 0} + msg.EditTarget.Metadata = &signalid.MessageMetadata{ContainsAttachments: msgconv.ContainsAttachments(converted)} msg.EditTarget.EditCount++ if prevID != msg.EditTarget.ID { err = s.Main.Bridge.DB.DoTxn(ctx, nil, func(ctx context.Context) error { diff --git a/pkg/msgconv/from-matrix.go b/pkg/msgconv/from-matrix.go index c54654c..0aab1f1 100644 --- a/pkg/msgconv/from-matrix.go +++ b/pkg/msgconv/from-matrix.go @@ -21,6 +21,7 @@ import ( "fmt" "net/http" "strings" + "unicode/utf8" "github.com/rs/zerolog" "go.mau.fi/util/exmime" @@ -152,9 +153,33 @@ func (mc *MessageConverter) ToSignal( dm.BodyRanges = nil dm.Preview = nil } + if err := mc.uploadLongText(ctx, dm); err != nil { + return nil, err + } return dm, nil } +const maxInlineBodySize = 2 * 1024 + +func (mc *MessageConverter) uploadLongText(ctx context.Context, dm *signalpb.DataMessage) error { + body := dm.GetBody() + if len(body) <= maxInlineBodySize { + return nil + } + att, err := getClient(ctx).UploadAttachment(ctx, []byte(body)) + if err != nil { + return fmt.Errorf("%w (long text): %w", bridgev2.ErrMediaReuploadFailed, err) + } + att.ContentType = proto.String(LongTextContentType) + dm.Attachments = append([]*signalpb.AttachmentPointer{att}, dm.Attachments...) + cut := maxInlineBodySize + for !utf8.RuneStart(body[cut]) { + cut-- + } + dm.Body = proto.String(body[:cut]) + return nil +} + func maybeInt[T constraints.Integer](v T) *T { if v == 0 { return nil diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 68f5558..7c8a7a6 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -173,7 +173,7 @@ func (mc *MessageConverter) ToMatrix( } } for i, att := range dm.GetAttachments() { - if att.GetContentType() != "text/x-signal-plain" || att.GetSize() > matrixTextMaxLength { + if att.GetContentType() != LongTextContentType || att.GetSize() > matrixTextMaxLength { part := mc.convertAttachmentToMatrix(ctx, i, att, attMap) if dm.GetIsViewOnce() { if part.Content.MsgType == event.MsgImage || part.Content.MsgType == event.MsgVideo { @@ -217,7 +217,7 @@ func (mc *MessageConverter) ToMatrix( for i, part := range cm.Parts { part.ID = signalid.MakeMessagePartID(i) meta := &signalid.MessageMetadata{ - ContainsAttachments: len(dm.GetAttachments()) > 0, + ContainsAttachments: ContainsAttachments(dm), ViewOnce: dm.GetIsViewOnce(), } if meta.ViewOnce { diff --git a/pkg/msgconv/msgconv.go b/pkg/msgconv/msgconv.go index 03bf621..2ec6ad0 100644 --- a/pkg/msgconv/msgconv.go +++ b/pkg/msgconv/msgconv.go @@ -18,6 +18,7 @@ package msgconv import ( "context" + "slices" "github.com/google/uuid" "maunium.net/go/mautrix/bridgev2" @@ -28,6 +29,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" + "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) type contextKey int @@ -96,6 +98,14 @@ func NewMessageConverter(br *bridgev2.Bridge) *MessageConverter { } } +const LongTextContentType = "text/x-signal-plain" + +func ContainsAttachments(dm *signalpb.DataMessage) bool { + return slices.ContainsFunc(dm.GetAttachments(), func(att *signalpb.AttachmentPointer) bool { + return att.GetContentType() != LongTextContentType + }) +} + func getClient(ctx context.Context) *signalmeow.Client { return ctx.Value(contextKeyClient).(*signalmeow.Client) } From 82299a169e3da9ab84caac0835b86d0e0089f655 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 17 Oct 2026 13:49:45 +0300 Subject: [PATCH 37/84] libsignalgo: remove gcc const pointer hack by using typedefs from libsignal headers --- pkg/libsignalgo/backupkey.go | 4 +- pkg/libsignalgo/fixedarray.go | 60 ++++++++++++++-------------- pkg/libsignalgo/fixedarray_clang.go | 24 ----------- pkg/libsignalgo/fixedarray_gcc.go | 26 ------------ pkg/libsignalgo/groupsecretparams.go | 12 +++--- pkg/libsignalgo/profilekey.go | 16 ++++---- pkg/libsignalgo/serviceid.go | 4 +- 7 files changed, 48 insertions(+), 98 deletions(-) delete mode 100644 pkg/libsignalgo/fixedarray_clang.go delete mode 100644 pkg/libsignalgo/fixedarray_gcc.go diff --git a/pkg/libsignalgo/backupkey.go b/pkg/libsignalgo/backupkey.go index b5f53f2..47cce90 100644 --- a/pkg/libsignalgo/backupkey.go +++ b/pkg/libsignalgo/backupkey.go @@ -49,8 +49,8 @@ func (bk *BackupKey) cFixedArray() *C.SignalType_FixedArray32_uint8_t { return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(bk)) } -func (bk *BackupKey) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(bk.cFixedArray()) +func (bk *BackupKey) cConstFixedArray() C.SignalType_ConstPointer_FixedArray32_uint8_t { + return (C.SignalType_ConstPointer_FixedArray32_uint8_t)(unsafe.Pointer(bk)) } func GenerateRandomBackupKey() *BackupKey { diff --git a/pkg/libsignalgo/fixedarray.go b/pkg/libsignalgo/fixedarray.go index 949e808..ad94514 100644 --- a/pkg/libsignalgo/fixedarray.go +++ b/pkg/libsignalgo/fixedarray.go @@ -42,118 +42,118 @@ func (a *fixedArray15) cFixedArray() *C.SignalType_FixedArray15_uint8_t { return (*C.SignalType_FixedArray15_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray15) cConstFixedArray() cFixedArray15Compat { - return cFixedArray15Compat(a.cFixedArray()) +func (a *fixedArray15) cConstFixedArray() C.SignalType_ConstPointer_FixedArray15_uint8_t { + return (C.SignalType_ConstPointer_FixedArray15_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray16) cFixedArray() *C.SignalType_FixedArray16_uint8_t { return (*C.SignalType_FixedArray16_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray16) cConstFixedArray() cFixedArray16Compat { - return cFixedArray16Compat(a.cFixedArray()) +func (a *fixedArray16) cConstFixedArray() C.SignalType_ConstPointer_FixedArray16_uint8_t { + return (C.SignalType_ConstPointer_FixedArray16_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray17) cFixedArray() *C.SignalType_FixedArray17_uint8_t { return (*C.SignalType_FixedArray17_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray17) cConstFixedArray() cFixedArray17Compat { - return cFixedArray17Compat(a.cFixedArray()) +func (a *fixedArray17) cConstFixedArray() C.SignalType_ConstPointer_FixedArray17_uint8_t { + return (C.SignalType_ConstPointer_FixedArray17_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray32) cFixedArray() *C.SignalType_FixedArray32_uint8_t { return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray32) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(a.cFixedArray()) +func (a *fixedArray32) cConstFixedArray() C.SignalType_ConstPointer_FixedArray32_uint8_t { + return (C.SignalType_ConstPointer_FixedArray32_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray64) cFixedArray() *C.SignalType_FixedArray64_uint8_t { return (*C.SignalType_FixedArray64_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray64) cConstFixedArray() cFixedArray64Compat { - return cFixedArray64Compat(a.cFixedArray()) +func (a *fixedArray64) cConstFixedArray() C.SignalType_ConstPointer_FixedArray64_uint8_t { + return (C.SignalType_ConstPointer_FixedArray64_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray65) cFixedArray() *C.SignalType_FixedArray65_uint8_t { return (*C.SignalType_FixedArray65_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray65) cConstFixedArray() cFixedArray65Compat { - return cFixedArray65Compat(a.cFixedArray()) +func (a *fixedArray65) cConstFixedArray() C.SignalType_ConstPointer_FixedArray65_uint8_t { + return (C.SignalType_ConstPointer_FixedArray65_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray97) cFixedArray() *C.SignalType_FixedArray97_uint8_t { return (*C.SignalType_FixedArray97_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray97) cConstFixedArray() cFixedArray97Compat { - return cFixedArray97Compat(a.cFixedArray()) +func (a *fixedArray97) cConstFixedArray() C.SignalType_ConstPointer_FixedArray97_uint8_t { + return (C.SignalType_ConstPointer_FixedArray97_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray129) cFixedArray() *C.SignalType_FixedArray129_uint8_t { return (*C.SignalType_FixedArray129_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray129) cConstFixedArray() cFixedArray129Compat { - return cFixedArray129Compat(a.cFixedArray()) +func (a *fixedArray129) cConstFixedArray() C.SignalType_ConstPointer_FixedArray129_uint8_t { + return (C.SignalType_ConstPointer_FixedArray129_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray153) cFixedArray() *C.SignalType_FixedArray153_uint8_t { return (*C.SignalType_FixedArray153_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray153) cConstFixedArray() cFixedArray153Compat { - return cFixedArray153Compat(a.cFixedArray()) +func (a *fixedArray153) cConstFixedArray() C.SignalType_ConstPointer_FixedArray153_uint8_t { + return (C.SignalType_ConstPointer_FixedArray153_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray177) cFixedArray() *C.SignalType_FixedArray177_uint8_t { return (*C.SignalType_FixedArray177_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray177) cConstFixedArray() cFixedArray177Compat { - return cFixedArray177Compat(a.cFixedArray()) +func (a *fixedArray177) cConstFixedArray() C.SignalType_ConstPointer_FixedArray177_uint8_t { + return (C.SignalType_ConstPointer_FixedArray177_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray289) cFixedArray() *C.SignalType_FixedArray289_uint8_t { return (*C.SignalType_FixedArray289_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray289) cConstFixedArray() cFixedArray289Compat { - return cFixedArray289Compat(a.cFixedArray()) +func (a *fixedArray289) cConstFixedArray() C.SignalType_ConstPointer_FixedArray289_uint8_t { + return (C.SignalType_ConstPointer_FixedArray289_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray329) cFixedArray() *C.SignalType_FixedArray329_uint8_t { return (*C.SignalType_FixedArray329_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray329) cConstFixedArray() cFixedArray329Compat { - return cFixedArray329Compat(a.cFixedArray()) +func (a *fixedArray329) cConstFixedArray() C.SignalType_ConstPointer_FixedArray329_uint8_t { + return (C.SignalType_ConstPointer_FixedArray329_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray409) cFixedArray() *C.SignalType_FixedArray409_uint8_t { return (*C.SignalType_FixedArray409_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray409) cConstFixedArray() cFixedArray409Compat { - return cFixedArray409Compat(a.cFixedArray()) +func (a *fixedArray409) cConstFixedArray() C.SignalType_ConstPointer_FixedArray409_uint8_t { + return (C.SignalType_ConstPointer_FixedArray409_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray473) cFixedArray() *C.SignalType_FixedArray473_uint8_t { return (*C.SignalType_FixedArray473_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray473) cConstFixedArray() cFixedArray473Compat { - return cFixedArray473Compat(a.cFixedArray()) +func (a *fixedArray473) cConstFixedArray() C.SignalType_ConstPointer_FixedArray473_uint8_t { + return (C.SignalType_ConstPointer_FixedArray473_uint8_t)(unsafe.Pointer(a)) } func (a *fixedArray497) cFixedArray() *C.SignalType_FixedArray497_uint8_t { return (*C.SignalType_FixedArray497_uint8_t)(unsafe.Pointer(a)) } -func (a *fixedArray497) cConstFixedArray() cFixedArray497Compat { - return cFixedArray497Compat(a.cFixedArray()) +func (a *fixedArray497) cConstFixedArray() C.SignalType_ConstPointer_FixedArray497_uint8_t { + return (C.SignalType_ConstPointer_FixedArray497_uint8_t)(unsafe.Pointer(a)) } diff --git a/pkg/libsignalgo/fixedarray_clang.go b/pkg/libsignalgo/fixedarray_clang.go deleted file mode 100644 index a364eb5..0000000 --- a/pkg/libsignalgo/fixedarray_clang.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build darwin || android || ios || (windows && arm64) || clang - -package libsignalgo - -/* -#include "./libsignal-ffi.h" -*/ -import "C" - -type cFixedArray15Compat = *C.SignalType_FixedArray15_uint8_t -type cFixedArray16Compat = *C.SignalType_FixedArray16_uint8_t -type cFixedArray17Compat = *C.SignalType_FixedArray17_uint8_t -type cFixedArray32Compat = *C.SignalType_FixedArray32_uint8_t -type cFixedArray64Compat = *C.SignalType_FixedArray64_uint8_t -type cFixedArray65Compat = *C.SignalType_FixedArray65_uint8_t -type cFixedArray97Compat = *C.SignalType_FixedArray97_uint8_t -type cFixedArray129Compat = *C.SignalType_FixedArray129_uint8_t -type cFixedArray153Compat = *C.SignalType_FixedArray153_uint8_t -type cFixedArray177Compat = *C.SignalType_FixedArray177_uint8_t -type cFixedArray289Compat = *C.SignalType_FixedArray289_uint8_t -type cFixedArray329Compat = *C.SignalType_FixedArray329_uint8_t -type cFixedArray409Compat = *C.SignalType_FixedArray409_uint8_t -type cFixedArray473Compat = *C.SignalType_FixedArray473_uint8_t -type cFixedArray497Compat = *C.SignalType_FixedArray497_uint8_t diff --git a/pkg/libsignalgo/fixedarray_gcc.go b/pkg/libsignalgo/fixedarray_gcc.go deleted file mode 100644 index 14bd230..0000000 --- a/pkg/libsignalgo/fixedarray_gcc.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build !(darwin || android || ios || (windows && arm64) || clang) - -package libsignalgo - -/* -#include "./libsignal-ffi.h" -*/ -import "C" - -// Hack for https://github.com/golang/go/issues/7270 -// The clang version is more correct, but doesn't work with gcc. -type cFixedArray15Compat = *[15]C.uint8_t -type cFixedArray16Compat = *[16]C.uint8_t -type cFixedArray17Compat = *[17]C.uint8_t -type cFixedArray32Compat = *[32]C.uint8_t -type cFixedArray64Compat = *[64]C.uint8_t -type cFixedArray65Compat = *[65]C.uint8_t -type cFixedArray97Compat = *[97]C.uint8_t -type cFixedArray129Compat = *[129]C.uint8_t -type cFixedArray153Compat = *[153]C.uint8_t -type cFixedArray177Compat = *[177]C.uint8_t -type cFixedArray289Compat = *[289]C.uint8_t -type cFixedArray329Compat = *[329]C.uint8_t -type cFixedArray409Compat = *[409]C.uint8_t -type cFixedArray473Compat = *[473]C.uint8_t -type cFixedArray497Compat = *[497]C.uint8_t diff --git a/pkg/libsignalgo/groupsecretparams.go b/pkg/libsignalgo/groupsecretparams.go index 90149b4..9402d0c 100644 --- a/pkg/libsignalgo/groupsecretparams.go +++ b/pkg/libsignalgo/groupsecretparams.go @@ -57,24 +57,24 @@ func (gmk *GroupMasterKey) cFixedArray() *C.SignalType_FixedArray32_uint8_t { return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(gmk)) } -func (gmk *GroupMasterKey) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(gmk.cFixedArray()) +func (gmk *GroupMasterKey) cConstFixedArray() C.SignalType_ConstPointer_FixedArray32_uint8_t { + return (C.SignalType_ConstPointer_FixedArray32_uint8_t)(unsafe.Pointer(gmk)) } func (gsp *GroupSecretParams) cFixedArray() *C.SignalType_FixedArray289_uint8_t { return (*C.SignalType_FixedArray289_uint8_t)(unsafe.Pointer(gsp)) } -func (gsp *GroupSecretParams) cConstFixedArray() cFixedArray289Compat { - return cFixedArray289Compat(gsp.cFixedArray()) +func (gsp *GroupSecretParams) cConstFixedArray() C.SignalType_ConstPointer_FixedArray289_uint8_t { + return (C.SignalType_ConstPointer_FixedArray289_uint8_t)(unsafe.Pointer(gsp)) } func (gid *GroupIdentifier) cFixedArray() *C.SignalType_FixedArray32_uint8_t { return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(gid)) } -func (gid *GroupIdentifier) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(gid.cFixedArray()) +func (gid *GroupIdentifier) cConstFixedArray() C.SignalType_ConstPointer_FixedArray32_uint8_t { + return (C.SignalType_ConstPointer_FixedArray32_uint8_t)(unsafe.Pointer(gid)) } func (gid *GroupIdentifier) String() string { diff --git a/pkg/libsignalgo/profilekey.go b/pkg/libsignalgo/profilekey.go index 0c21aff..a39eaa5 100644 --- a/pkg/libsignalgo/profilekey.go +++ b/pkg/libsignalgo/profilekey.go @@ -46,24 +46,24 @@ func (pk *ProfileKey) cFixedArray() *C.SignalType_FixedArray32_uint8_t { return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(pk)) } -func (pk *ProfileKey) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(pk.cFixedArray()) +func (pk *ProfileKey) cConstFixedArray() C.SignalType_ConstPointer_FixedArray32_uint8_t { + return (C.SignalType_ConstPointer_FixedArray32_uint8_t)(unsafe.Pointer(pk)) } func (pkv *ProfileKeyVersion) cFixedArray() *C.SignalType_FixedArray64_uint8_t { return (*C.SignalType_FixedArray64_uint8_t)(unsafe.Pointer(pkv)) } -func (pkv *ProfileKeyVersion) cConstFixedArray() cFixedArray64Compat { - return cFixedArray64Compat(pkv.cFixedArray()) +func (pkv *ProfileKeyVersion) cConstFixedArray() C.SignalType_ConstPointer_FixedArray64_uint8_t { + return (C.SignalType_ConstPointer_FixedArray64_uint8_t)(unsafe.Pointer(pkv)) } func (ak *AccessKey) cFixedArray() *C.SignalType_FixedArray16_uint8_t { return (*C.SignalType_FixedArray16_uint8_t)(unsafe.Pointer(ak)) } -func (ak *AccessKey) cConstFixedArray() cFixedArray16Compat { - return cFixedArray16Compat(ak.cFixedArray()) +func (ak *AccessKey) cConstFixedArray() C.SignalType_ConstPointer_FixedArray16_uint8_t { + return (C.SignalType_ConstPointer_FixedArray16_uint8_t)(unsafe.Pointer(ak)) } func DeserializeProfileKey(bytes []byte) (*ProfileKey, error) { @@ -177,8 +177,8 @@ func (p *ProfileKeyCredentialRequestContext) cFixedArray() *C.SignalType_FixedAr return (*C.SignalType_FixedArray473_uint8_t)(unsafe.Pointer(p)) } -func (p *ProfileKeyCredentialRequestContext) cConstFixedArray() cFixedArray473Compat { - return cFixedArray473Compat(p.cFixedArray()) +func (p *ProfileKeyCredentialRequestContext) cConstFixedArray() C.SignalType_ConstPointer_FixedArray473_uint8_t { + return (C.SignalType_ConstPointer_FixedArray473_uint8_t)(unsafe.Pointer(p)) } func CreateProfileKeyCredentialRequestContext(serverPublicParams *ServerPublicParams, u uuid.UUID, profileKey ProfileKey) (*ProfileKeyCredentialRequestContext, error) { diff --git a/pkg/libsignalgo/serviceid.go b/pkg/libsignalgo/serviceid.go index 38631ee..a320319 100644 --- a/pkg/libsignalgo/serviceid.go +++ b/pkg/libsignalgo/serviceid.go @@ -188,6 +188,6 @@ func (s ServiceID) cFixedArray() *C.SignalType_FixedArray17_uint8_t { return s.FixedBytes().cFixedArray() } -func (s ServiceID) cConstFixedArray() cFixedArray17Compat { - return cFixedArray17Compat(s.cFixedArray()) +func (s ServiceID) cConstFixedArray() C.SignalType_ConstPointer_FixedArray17_uint8_t { + return s.FixedBytes().cConstFixedArray() } From 46aff24f80816f10dae5ceff210b3dacb588a094 Mon Sep 17 00:00:00 2001 From: Toni Spets Date: Mon, 19 Oct 2026 17:51:23 +0300 Subject: [PATCH 38/84] libsignalgo: free records and addresses owned by store callbacks (#682) --- pkg/libsignalgo/identitykeystore.go | 17 +++++++---------- pkg/libsignalgo/kyberprekeystore.go | 9 +++------ pkg/libsignalgo/prekeystore.go | 8 ++------ pkg/libsignalgo/senderkeystore.go | 13 +++++-------- pkg/libsignalgo/sessionstore.go | 12 +++++------- pkg/libsignalgo/signedprekeystore.go | 8 ++------ 6 files changed, 24 insertions(+), 43 deletions(-) diff --git a/pkg/libsignalgo/identitykeystore.go b/pkg/libsignalgo/identitykeystore.go index ba26f06..eb80056 100644 --- a/pkg/libsignalgo/identitykeystore.go +++ b/pkg/libsignalgo/identitykeystore.go @@ -90,12 +90,8 @@ func signal_get_local_registration_id_callback(storeCtx unsafe.Pointer, idp *C.u //export signal_save_identity_key_callback func signal_save_identity_key_callback(storeCtx unsafe.Pointer, out *C.uint8_t, address C.SignalMutPointerProtocolAddress, publicKey C.SignalMutPointerPublicKey) C.int { return wrapStoreCallback(storeCtx, func(store IdentityKeyStore, ctx context.Context) error { - publicKeyStruct := PublicKey{ptr: publicKey.raw} - cloned, err := publicKeyStruct.Clone() - if err != nil { - return err - } - addr := &Address{ptr: address.raw} + addr := wrapAddress(address.raw) + pub := wrapPublicKey(publicKey.raw) theirServiceID, err := addr.NameServiceID() if err != nil { return err @@ -103,7 +99,7 @@ func signal_save_identity_key_callback(storeCtx unsafe.Pointer, out *C.uint8_t, replaced, err := store.SaveIdentityKey( ctx, theirServiceID, - &IdentityKey{cloned}, + &IdentityKey{pub}, ) if err != nil { return err @@ -120,7 +116,7 @@ func signal_save_identity_key_callback(storeCtx unsafe.Pointer, out *C.uint8_t, //export signal_get_identity_key_callback func signal_get_identity_key_callback(storeCtx unsafe.Pointer, public_keyp *C.SignalMutPointerPublicKey, address C.SignalMutPointerProtocolAddress) C.int { return wrapStoreCallback(storeCtx, func(store IdentityKeyStore, ctx context.Context) error { - addr := &Address{ptr: address.raw} + addr := wrapAddress(address.raw) theirServiceID, err := addr.NameServiceID() if err != nil { return err @@ -137,12 +133,13 @@ func signal_get_identity_key_callback(storeCtx unsafe.Pointer, public_keyp *C.Si //export signal_is_trusted_identity_callback func signal_is_trusted_identity_callback(storeCtx unsafe.Pointer, out *C.bool, address C.SignalMutPointerProtocolAddress, public_key C.SignalMutPointerPublicKey, direction C.uint32_t) C.int { return wrapStoreCallback(storeCtx, func(store IdentityKeyStore, ctx context.Context) error { - addr := &Address{ptr: address.raw} + addr := wrapAddress(address.raw) + pub := wrapPublicKey(public_key.raw) theirServiceID, err := addr.NameServiceID() if err != nil { return err } - trusted, err := store.IsTrustedIdentity(ctx, theirServiceID, &IdentityKey{&PublicKey{ptr: public_key.raw}}, SignalDirection(direction)) + trusted, err := store.IsTrustedIdentity(ctx, theirServiceID, &IdentityKey{pub}, SignalDirection(direction)) if err != nil { return err } diff --git a/pkg/libsignalgo/kyberprekeystore.go b/pkg/libsignalgo/kyberprekeystore.go index 9deea17..78ec925 100644 --- a/pkg/libsignalgo/kyberprekeystore.go +++ b/pkg/libsignalgo/kyberprekeystore.go @@ -52,18 +52,15 @@ func signal_load_kyber_pre_key_callback(storeCtx unsafe.Pointer, keyp *C.SignalM //export signal_store_kyber_pre_key_callback func signal_store_kyber_pre_key_callback(storeCtx unsafe.Pointer, id C.uint32_t, preKeyRecord C.SignalMutPointerKyberPreKeyRecord) C.int { return wrapStoreCallback(storeCtx, func(store KyberPreKeyStore, ctx context.Context) error { - record := KyberPreKeyRecord{ptr: preKeyRecord.raw} - cloned, err := record.Clone() - if err != nil { - return err - } - return store.StoreKyberPreKey(ctx, uint32(id), cloned) + record := wrapKyberPreKeyRecord(preKeyRecord.raw) + return store.StoreKyberPreKey(ctx, uint32(id), record) }) } //export signal_mark_kyber_pre_key_used_callback func signal_mark_kyber_pre_key_used_callback(storeCtx unsafe.Pointer, id C.uint32_t, ecPrekeyID C.uint32_t, baseKey C.SignalMutPointerPublicKey) C.int { return wrapStoreCallback(storeCtx, func(store KyberPreKeyStore, ctx context.Context) error { + _ = wrapPublicKey(baseKey.raw) // TODO use ecPrekeyID and baseKey? return store.MarkKyberPreKeyUsed(ctx, uint32(id)) }) diff --git a/pkg/libsignalgo/prekeystore.go b/pkg/libsignalgo/prekeystore.go index 8c3c36f..00ee50f 100644 --- a/pkg/libsignalgo/prekeystore.go +++ b/pkg/libsignalgo/prekeystore.go @@ -52,12 +52,8 @@ func signal_load_pre_key_callback(storeCtx unsafe.Pointer, keyp *C.SignalMutPoin //export signal_store_pre_key_callback func signal_store_pre_key_callback(storeCtx unsafe.Pointer, id C.uint32_t, preKeyRecord C.SignalMutPointerPreKeyRecord) C.int { return wrapStoreCallback(storeCtx, func(store PreKeyStore, ctx context.Context) error { - record := PreKeyRecord{ptr: preKeyRecord.raw} - cloned, err := record.Clone() - if err != nil { - return err - } - return store.StorePreKey(ctx, uint32(id), cloned) + record := wrapPreKeyRecord(preKeyRecord.raw) + return store.StorePreKey(ctx, uint32(id), record) }) } diff --git a/pkg/libsignalgo/senderkeystore.go b/pkg/libsignalgo/senderkeystore.go index 1649216..fc51571 100644 --- a/pkg/libsignalgo/senderkeystore.go +++ b/pkg/libsignalgo/senderkeystore.go @@ -40,7 +40,8 @@ type SenderKeyStore interface { //export signal_load_sender_key_callback func signal_load_sender_key_callback(storeCtx unsafe.Pointer, recordp *C.SignalMutPointerSenderKeyRecord, address C.SignalMutPointerProtocolAddress, distributionID C.SignalUuid) C.int { return wrapStoreCallback(storeCtx, func(store SenderKeyStore, ctx context.Context) error { - record, err := store.LoadSenderKey(ctx, &Address{ptr: address.raw}, *(*uuid.UUID)(unsafe.Pointer(&distributionID))) + addr := wrapAddress(address.raw) + record, err := store.LoadSenderKey(ctx, addr, *(*uuid.UUID)(unsafe.Pointer(&distributionID))) if err == nil && record != nil { record.CancelFinalizer() recordp.raw = record.ptr @@ -52,13 +53,9 @@ func signal_load_sender_key_callback(storeCtx unsafe.Pointer, recordp *C.SignalM //export signal_store_sender_key_callback func signal_store_sender_key_callback(storeCtx unsafe.Pointer, address C.SignalMutPointerProtocolAddress, distributionID C.SignalUuid, senderKeyRecord C.SignalMutPointerSenderKeyRecord) C.int { return wrapStoreCallback(storeCtx, func(store SenderKeyStore, ctx context.Context) error { - record := SenderKeyRecord{ptr: senderKeyRecord.raw} - cloned, err := record.Clone() - if err != nil { - return err - } - - return store.StoreSenderKey(ctx, &Address{ptr: address.raw}, *(*uuid.UUID)(unsafe.Pointer(&distributionID)), cloned) + addr := wrapAddress(address.raw) + record := wrapSenderKeyRecord(senderKeyRecord.raw) + return store.StoreSenderKey(ctx, addr, *(*uuid.UUID)(unsafe.Pointer(&distributionID)), record) }) } diff --git a/pkg/libsignalgo/sessionstore.go b/pkg/libsignalgo/sessionstore.go index 99000e5..c33a899 100644 --- a/pkg/libsignalgo/sessionstore.go +++ b/pkg/libsignalgo/sessionstore.go @@ -38,7 +38,8 @@ type SessionStore interface { //export signal_load_session_callback func signal_load_session_callback(storeCtx unsafe.Pointer, recordp *C.SignalMutPointerSessionRecord, address C.SignalMutPointerProtocolAddress) C.int { return wrapStoreCallback(storeCtx, func(store SessionStore, ctx context.Context) error { - record, err := store.LoadSession(ctx, &Address{ptr: address.raw}) + addr := wrapAddress(address.raw) + record, err := store.LoadSession(ctx, addr) if err == nil && record != nil { record.CancelFinalizer() recordp.raw = record.ptr @@ -50,12 +51,9 @@ func signal_load_session_callback(storeCtx unsafe.Pointer, recordp *C.SignalMutP //export signal_store_session_callback func signal_store_session_callback(storeCtx unsafe.Pointer, address C.SignalMutPointerProtocolAddress, sessionRecord C.SignalMutPointerSessionRecord) C.int { return wrapStoreCallback(storeCtx, func(store SessionStore, ctx context.Context) error { - record := SessionRecord{ptr: sessionRecord.raw} - cloned, err := record.Clone() - if err != nil { - return err - } - return store.StoreSession(ctx, &Address{ptr: address.raw}, cloned) + addr := wrapAddress(address.raw) + record := wrapSessionRecord(sessionRecord.raw) + return store.StoreSession(ctx, addr, record) }) } diff --git a/pkg/libsignalgo/signedprekeystore.go b/pkg/libsignalgo/signedprekeystore.go index b1306e2..a66b9f4 100644 --- a/pkg/libsignalgo/signedprekeystore.go +++ b/pkg/libsignalgo/signedprekeystore.go @@ -50,12 +50,8 @@ func signal_load_signed_pre_key_callback(storeCtx unsafe.Pointer, keyp *C.Signal //export signal_store_signed_pre_key_callback func signal_store_signed_pre_key_callback(storeCtx unsafe.Pointer, id C.uint32_t, preKeyRecord C.SignalMutPointerSignedPreKeyRecord) C.int { return wrapStoreCallback(storeCtx, func(store SignedPreKeyStore, ctx context.Context) error { - record := SignedPreKeyRecord{ptr: preKeyRecord.raw} - cloned, err := record.Clone() - if err != nil { - return err - } - return store.StoreSignedPreKey(ctx, uint32(id), cloned) + record := wrapSignedPreKeyRecord(preKeyRecord.raw) + return store.StoreSignedPreKey(ctx, uint32(id), record) }) } From 887a0d1c338a4ef4bbefb81c53f0f99e19ef2c00 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 21 Oct 2026 23:40:25 +0200 Subject: [PATCH 39/84] capabilities: allow m4a and wav audio files (#678) --- pkg/connector/capabilities.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index b62d34f..4ff4b3c 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -40,7 +40,7 @@ func supportedIfFFmpeg() event.CapabilitySupportLevel { } func capID() string { - base := "fi.mau.signal.capabilities.2026_10_16" + base := "fi.mau.signal.capabilities.2026_10_21" if ffmpeg.Supported() { return base + "+ffmpeg" } @@ -105,6 +105,8 @@ var signalCaps = &event.RoomFeatures{ "audio/mpeg": event.CapLevelFullySupported, "audio/mp3": event.CapLevelFullySupported, "audio/flac": event.CapLevelFullySupported, + "audio/mp4": event.CapLevelFullySupported, + "audio/wav": event.CapLevelFullySupported, }, MaxSize: MaxFileSize, }, @@ -263,5 +265,5 @@ func (s *SignalConnector) GetCapabilities() *bridgev2.NetworkGeneralCapabilities } func (s *SignalConnector) GetBridgeInfoVersion() (info, capabilities int) { - return 1, 14 + return 1, 15 } From 2ef3d656867b13950339967496d24c6fbf587c5f Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Thu, 22 Oct 2026 22:10:10 +0200 Subject: [PATCH 40/84] connector: map errors to message statuses, resperrors and bridge states (#683) --- pkg/connector/chatinfo.go | 7 +- pkg/connector/client.go | 32 +++-- pkg/connector/errors.go | 171 ++++++++++++++++++++++++++ pkg/connector/handlematrix.go | 58 ++++----- pkg/connector/handlesignal.go | 3 +- pkg/connector/login.go | 2 +- pkg/msgconv/from-matrix.go | 6 +- pkg/signalmeow/keys.go | 1 + pkg/signalmeow/senderkey.go | 4 +- pkg/signalmeow/sending.go | 21 +++- pkg/signalmeow/web/signalwebsocket.go | 35 ++++-- pkg/signalmeow/web/web.go | 10 ++ 12 files changed, 280 insertions(+), 70 deletions(-) create mode 100644 pkg/connector/errors.go diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index 759cdf9..4668cd7 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -220,7 +220,7 @@ func (s *SignalClient) resolvePhone(ctx context.Context, number string) (aci, pn aci = recipient.ACI pni = recipient.PNI } else if resp, lookupErr := s.Client.LookupPhone(ctx, e164Number); lookupErr != nil { - err = fmt.Errorf("error looking up number on server: %w", lookupErr) + err = wrapRespError(fmt.Errorf("error looking up number on server: %w", lookupErr)) } else { aci = resp[e164Number].ACI pni = resp[e164Number].PNI @@ -243,6 +243,7 @@ func (s *SignalClient) resolvePhone(ctx context.Context, number string) (aci, pn func (s *SignalClient) resolveUsername(ctx context.Context, username string) (aci, pni uuid.UUID, err error) { serviceID, err := s.Client.ResolveUsername(ctx, username) if err != nil { + err = wrapRespError(fmt.Errorf("error looking up username on server: %w", err)) return } aci, pni = serviceID.ToACIAndPNI() @@ -388,7 +389,7 @@ func (s *SignalClient) CreateGroup(ctx context.Context, params *bridgev2.GroupCr } group.AvatarPath, err = s.Client.UploadGroupAvatar(ctx, avatarBytes, group.GroupIdentifier, group.GroupMasterKey) if err != nil { - return nil, fmt.Errorf("failed to upload avatar: %w", err) + return nil, wrapRespError(fmt.Errorf("failed to upload avatar: %w", err)) } } portal, err := s.Main.Bridge.GetPortalByKey(ctx, s.makePortalKey(string(group.GroupIdentifier))) @@ -418,7 +419,7 @@ func (s *SignalClient) CreateGroup(ctx context.Context, params *bridgev2.GroupCr } resp, err := s.Client.CreateGroup(ctx, group) if err != nil { - return nil, fmt.Errorf("failed to create group: %w", err) + return nil, wrapRespError(fmt.Errorf("failed to create group: %w", err)) } if params.RoomID != "" { // UpdateMatrixRoomID could do this for us if we passed ChatInfoSource to it, diff --git a/pkg/connector/client.go b/pkg/connector/client.go index d915576..61cc282 100644 --- a/pkg/connector/client.go +++ b/pkg/connector/client.go @@ -182,9 +182,9 @@ func (s *SignalClient) bridgeStateLoop(statusChan <-chan signalmeow.SignalConnec peekedConnectionStatus.Event == signalmeow.SignalConnectionEventNone { s.UserLogin.Log.Debug().Msg("Sending TransientDisconnect BridgeState") if err == nil { - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateTransientDisconnect}) + s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateTransientDisconnect, Error: "signal-disconnected"}) } else { - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateTransientDisconnect, Error: "unknown-websocket-error", Message: err.Error()}) + s.UserLogin.BridgeState.Send(connectionErrorState(err)) } } } @@ -192,11 +192,7 @@ func (s *SignalClient) bridgeStateLoop(statusChan <-chan signalmeow.SignalConnec case signalmeow.SignalConnectionEventLoggedOut: s.stopChatSync() s.UserLogin.Log.Debug().Msg("Sending BadCredentials BridgeState") - if err == nil { - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: "You have been logged out of Signal, please reconnect"}) - } else { - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: err.Error()}) - } + s.sendLoggedOutState(err) err = s.Client.ClearKeysAndDisconnect(context.TODO()) if err != nil { s.UserLogin.Log.Error().Err(err).Msg("Failed to clear keys and disconnect") @@ -204,18 +200,24 @@ func (s *SignalClient) bridgeStateLoop(statusChan <-chan signalmeow.SignalConnec case signalmeow.SignalConnectionEventError: s.UserLogin.Log.Debug().Msg("Sending TransientDisconnect BridgeState") - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateTransientDisconnect, Error: "unknown-websocket-error", Message: err.Error()}) + s.UserLogin.BridgeState.Send(connectionErrorState(err)) case signalmeow.SignalConnectionEventFatalError: - s.UserLogin.Log.Debug().Msg("Sending UnknownError BridgeState") - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateUnknownError, Error: "unknown-websocket-error", Message: err.Error()}) + if isUnauthorized(err) { + s.stopChatSync() + s.UserLogin.Log.Debug().Msg("Sending BadCredentials BridgeState") + s.sendLoggedOutState(err) + } else { + s.UserLogin.Log.Debug().Msg("Sending UnknownError BridgeState") + s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateUnknownError, Error: "signal-connection-failed", Info: map[string]any{"go_error": err.Error()}}) + } case signalmeow.SignalConnectionCleanShutdown: if s.Client.IsLoggedIn() { s.UserLogin.Log.Debug().Msg("Clean Shutdown - sending no BridgeState") } else { s.UserLogin.Log.Debug().Msg("Clean Shutdown, but logged out - Sending BadCredentials BridgeState") - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: "You have been logged out of Signal, please reconnect"}) + s.sendLoggedOutState(nil) } } } @@ -223,7 +225,7 @@ func (s *SignalClient) bridgeStateLoop(statusChan <-chan signalmeow.SignalConnec func (s *SignalClient) Connect(ctx context.Context) { if s.Client == nil { - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: "You're not logged into Signal"}) + s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Error: "signal-not-logged-in", UserAction: status.UserActionRelogin}) return } s.updateRemoteProfile(ctx, false) @@ -251,9 +253,13 @@ func (s *SignalClient) ConnectBackground(ctx context.Context, _ *bridgev2.Connec log.Err(status.Err).Msg("Authed websocket disconnected") case web.SignalWebsocketConnectionEventLoggedOut: log.Err(status.Err).Msg("Authed websocket logged out") + s.sendLoggedOutState(status.Err) return fmt.Errorf("authed websocket logged out: %w", status.Err) case web.SignalWebsocketConnectionEventError, web.SignalWebsocketConnectionEventFatalError: log.Err(status.Err).Msg("Authed websocket error") + if isUnauthorized(status.Err) { + s.sendLoggedOutState(status.Err) + } return fmt.Errorf("authed websocket errored: %w", status.Err) case web.SignalWebsocketConnectionEventCleanShutdown: log.Info().Msg("Authed websocket clean shutdown") @@ -315,7 +321,7 @@ func (s *SignalClient) tryConnect(ctx context.Context, retryCount int, noLoginSy ch, err := s.Client.StartReceiveLoops(ctx) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to start receive loops") - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateTransientDisconnect, Error: "unknown-websocket-error", Message: err.Error()}) + s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateTransientDisconnect, Error: "signal-connect-failed", Info: map[string]any{"go_error": err.Error()}}) retryInSeconds := 2 << retryCount if retryInSeconds > 150 { retryInSeconds = 150 diff --git a/pkg/connector/errors.go b/pkg/connector/errors.go new file mode 100644 index 0000000..25092ff --- /dev/null +++ b/pkg/connector/errors.go @@ -0,0 +1,171 @@ +// mautrix-signal - A Matrix-Signal puppeting bridge. +// Copyright (C) 2026 Tulir Asokan +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package connector + +import ( + "errors" + "fmt" + "net/http" + + "google.golang.org/grpc/codes" + grpcstatus "google.golang.org/grpc/status" + "maunium.net/go/mautrix" + "maunium.net/go/mautrix/bridgev2" + "maunium.net/go/mautrix/bridgev2/status" + "maunium.net/go/mautrix/event" + + "go.mau.fi/mautrix-signal/pkg/signalmeow" + "go.mau.fi/mautrix-signal/pkg/signalmeow/web" +) + +func init() { + status.BridgeStateHumanErrors.Update(status.BridgeStateErrorMap{ + "signal-logged-out": "You have been logged out of Signal, please reconnect", + "signal-not-logged-in": "You're not logged into Signal", + "signal-disconnected": "Disconnected from Signal, reconnecting", + "signal-connection-error": "Connection to Signal failed, reconnecting", + "signal-server-error": "Signal server error, reconnecting", + "signal-rate-limited": "Rate limited by Signal, reconnecting", + "signal-connect-failed": "Failed to connect to Signal, retrying", + "signal-connection-failed": "Connection to Signal failed", + }) +} + +var ( + errEditOthersMessage = bridgev2.WrapErrorInStatus(errors.New("you can only edit your own messages")). + WithErrorAsMessage(). + WithErrorReason(event.MessageStatusNoPermission). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) + errDeleteOthersMessage = bridgev2.WrapErrorInStatus(errors.New("you can only delete your own messages")). + WithErrorAsMessage(). + WithErrorReason(event.MessageStatusNoPermission). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) + errInviteToDM = bridgev2.WrapErrorInStatus(errors.New("can't invite more users to Signal DMs")). + WithErrorAsMessage(). + WithErrorReason(event.MessageStatusUnsupported). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) + errUnsupportedDisappearingType = bridgev2.WrapErrorInStatus(errors.New("only disappearing timers that start after reading are supported on Signal")). + WithErrorAsMessage(). + WithErrorReason(event.MessageStatusUnsupported). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) +) + +func wrapConversionError(err error) error { + if err == nil || errors.As(err, &bridgev2.MessageStatus{}) { + return err + } + return bridgev2.WrapErrorInStatus(err). + WithMessage("failed to convert message for Signal"). + WithIsCertain(true). + WithSendNotice(true) +} + +func wrapSendError(err error) error { + if err == nil || errors.As(err, &bridgev2.MessageStatus{}) { + return err + } + switch { + case errors.Is(err, signalmeow.ErrUnregisteredUser): + return bridgev2.WrapErrorInStatus(err). + WithMessage("recipient isn't registered on Signal"). + WithErrorReason(event.MessageStatusNetworkError). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) + case errors.Is(err, signalmeow.ErrRateLimited), errors.Is(err, signalmeow.RateLimitError): + return bridgev2.WrapErrorInStatus(err). + WithMessage("rate limited by Signal, try again later"). + WithErrorReason(event.MessageStatusNetworkError). + WithIsCertain(true). + WithSendNotice(true) + case errors.Is(err, signalmeow.AuthorizationFailedError): + return bridgev2.WrapErrorInStatus(err). + WithMessage("you don't have permission to do that in this Signal group"). + WithErrorReason(event.MessageStatusNoPermission). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) + case errors.Is(err, signalmeow.GroupPatchNotAcceptedError): + return bridgev2.WrapErrorInStatus(err). + WithMessage("Signal rejected the group change"). + WithErrorReason(event.MessageStatusNetworkError). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) + default: + return bridgev2.WrapErrorInStatus(err). + WithMessage("failed to send to Signal"). + WithSendNotice(true) + } +} + +func wrapRespError(err error) error { + var mapped bridgev2.RespError + var cdsRateLimit signalmeow.ContactDiscoveryRateLimitError + switch { + case errors.As(err, &cdsRateLimit), errors.Is(err, signalmeow.RateLimitError), errors.Is(err, signalmeow.ErrRateLimited), + grpcstatus.Code(err) == codes.ResourceExhausted: + mapped = bridgev2.RespError(mautrix.MLimitExceeded.WithMessage("Rate limited by Signal, please try again later").WithStatus(http.StatusBadRequest)) + case errors.Is(err, signalmeow.AuthorizationFailedError): + mapped = bridgev2.RespError(mautrix.MForbidden.WithMessage("Signal denied the request")) + default: + mapped = bridgev2.RespError(mautrix.MUnknown.WithMessage("Request to Signal failed")) + } + return fmt.Errorf("%w: %w", mapped, err) +} + +func connectionErrorState(err error) status.BridgeState { + state := status.BridgeState{ + StateEvent: status.StateTransientDisconnect, + Error: "signal-connection-error", + Info: map[string]any{"go_error": err.Error()}, + } + var statusErr web.HTTPStatusError + if errors.As(err, &statusErr) { + if statusErr.StatusCode == http.StatusTooManyRequests { + state.Error = "signal-rate-limited" + } else if statusErr.StatusCode >= 500 { + state.Error = "signal-server-error" + } + } + return state +} + +func isUnauthorized(err error) bool { + var statusErr web.HTTPStatusError + return errors.As(err, &statusErr) && statusErr.StatusCode == http.StatusUnauthorized +} + +func (s *SignalClient) sendLoggedOutState(err error) { + state := status.BridgeState{ + StateEvent: status.StateBadCredentials, + Error: "signal-logged-out", + UserAction: status.UserActionRelogin, + } + if err != nil { + state.Info = map[string]any{"go_error": err.Error()} + } + s.UserLogin.BridgeState.Send(state) +} diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 8812447..b384d58 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -82,7 +82,7 @@ func (s *SignalClient) sendMessage(ctx context.Context, portalID networkid.Porta log.Debug().Msg("No successes or failures - Probably sent to myself") } else if len(result.SuccessfullySentTo) == 0 { log.Error().Msg("Failed to send event to all members of Signal group") - return errors.New("failed to send to any members of Signal group") + return fmt.Errorf("failed to send to any members of Signal group: %w", result.FailureError()) } else if len(result.SuccessfullySentTo) < totalRecipients { if len(result.FailedToSendTo) > 0 { log.Warn().Msg("Failed to send event to some members of Signal group") @@ -124,7 +124,7 @@ func (s *SignalClient) HandleMatrixMessage(ctx context.Context, msg *bridgev2.Ma ctx, s.Client, msg.Portal, msg.Event, msg.Content, msg.OrigSender != nil, msg.ReplyTo, ) if err != nil { - return nil, err + return nil, wrapConversionError(err) } return s.doSendMessage(ctx, msg, converted, &signalid.MessageMetadata{ ContainsAttachments: msgconv.ContainsAttachments(converted), @@ -147,7 +147,7 @@ func (s *SignalClient) doSendMessage( msg.AddPendingToIgnore(networkid.TransactionID(msgID)) err := s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(converted)) if err != nil { - return nil, bridgev2.WrapErrorInStatus(err).WithSendNotice(true) + return nil, wrapSendError(err) } dbMsg := &database.Message{ ID: msgID, @@ -170,14 +170,14 @@ func (s *SignalClient) HandleMatrixViewLimitedMedia(ctx context.Context, msg *br if err != nil { return err } - return s.sendMessage(ctx, signalid.MakeDMPortalID(libsignalgo.NewACIServiceID(sender)), &signalpb.Content{ + return wrapSendError(s.sendMessage(ctx, signalid.MakeDMPortalID(libsignalgo.NewACIServiceID(sender)), &signalpb.Content{ Content: &signalpb.Content_ReceiptMessage{ ReceiptMessage: &signalpb.ReceiptMessage{ Type: signalpb.ReceiptMessage_VIEWED.Enum(), Timestamp: []uint64{timestamp}, }, }, - }) + })) } func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.MatrixEdit) error { @@ -188,7 +188,7 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri if err != nil { return fmt.Errorf("failed to parse target message ID: %w", err) } else if msg.EditTarget.SenderID != signalid.MakeUserID(s.Client.Store.ACI) { - return fmt.Errorf("cannot edit other people's messages") + return errEditOthersMessage } var replyTo *database.Message if msg.EditTarget.ReplyTo.MessageID != "" { @@ -199,7 +199,7 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri } converted, err := s.Main.MsgConv.ToSignal(ctx, s.Client, msg.Portal, msg.Event, msg.Content, msg.OrigSender != nil, replyTo) if err != nil { - return err + return wrapConversionError(err) } ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) converted.Timestamp = &ts @@ -208,7 +208,7 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri DataMessage: converted, })) if err != nil { - return bridgev2.WrapErrorInStatus(err).WithSendNotice(true) + return wrapSendError(err) } prevID := msg.EditTarget.ID msg.EditTarget.ID = signalid.MakeMessageID(s.Client.Store.ACI, ts) @@ -277,7 +277,7 @@ func (s *SignalClient) HandleMatrixReaction(ctx context.Context, msg *bridgev2.M }, })) if err != nil { - return nil, err + return nil, wrapSendError(err) } return &database.Reaction{}, nil } @@ -298,10 +298,7 @@ func (s *SignalClient) HandleMatrixReactionRemove(ctx context.Context, msg *brid TargetSentTimestamp: proto.Uint64(targetSentTimestamp), }, })) - if err != nil { - return err - } - return nil + return wrapSendError(err) } func (s *SignalClient) HandleMatrixMessageRemove(ctx context.Context, msg *bridgev2.MatrixMessageRemove) error { @@ -309,7 +306,7 @@ func (s *SignalClient) HandleMatrixMessageRemove(ctx context.Context, msg *bridg if err != nil { return fmt.Errorf("failed to parse target message ID: %w", err) } else if msg.TargetMessage.SenderID != signalid.MakeUserID(s.Client.Store.ACI) { - return fmt.Errorf("cannot delete other people's messages") + return errDeleteOthersMessage } ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) err = s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(&signalpb.DataMessage{ @@ -318,10 +315,7 @@ func (s *SignalClient) HandleMatrixMessageRemove(ctx context.Context, msg *bridg TargetSentTimestamp: proto.Uint64(targetSentTimestamp), }, })) - if err != nil { - return err - } - return nil + return wrapSendError(err) } func (s *SignalClient) HandleMatrixReadReceipt(ctx context.Context, receipt *bridgev2.MatrixReadReceipt) error { @@ -404,7 +398,7 @@ func (s *SignalClient) handleMatrixRoomMeta(ctx context.Context, portal *bridgev gc.Revision = portal.Metadata.(*signalid.PortalMetadata).Revision + 1 revision, err := s.Client.UpdateGroup(ctx, gc, groupID) if err != nil { - return false, err + return false, wrapSendError(err) } if gc.ModifyTitle != nil { portal.Name = *gc.ModifyTitle @@ -446,7 +440,7 @@ func (s *SignalClient) HandleMatrixRoomAvatar(ctx context.Context, msg *bridgev2 avatarHash = sha256.Sum256(data) avatarPath, err = s.Client.UploadGroupAvatar(ctx, data, groupID, "") if err != nil { - return false, fmt.Errorf("failed to reupload avatar: %w", err) + return false, wrapSendError(fmt.Errorf("failed to reupload avatar: %w", err)) } } return s.handleMatrixRoomMeta(ctx, msg.Portal, &signalmeow.GroupChange{ @@ -473,7 +467,7 @@ func (s *SignalClient) HandleMatrixMembership(ctx context.Context, msg *bridgev2 if msg.Portal.RoomType == database.RoomTypeDM { switch msg.Type { case bridgev2.Invite: - return nil, fmt.Errorf("cannot invite additional user to dm") + return nil, errInviteToDM default: return nil, nil } @@ -602,7 +596,7 @@ func (s *SignalClient) HandleMatrixMembership(ctx context.Context, msg *bridgev2 gc.Revision = msg.Portal.Metadata.(*signalid.PortalMetadata).Revision + 1 revision, err := s.Client.UpdateGroup(ctx, gc, groupID) if err != nil { - return nil, err + return nil, wrapSendError(err) } if (msg.Type == bridgev2.Invite || msg.Type == bridgev2.AcceptKnock) && targetSignalID.Type != libsignalgo.ServiceIDTypePNI { err = targetIntent.EnsureJoined(ctx, msg.Portal.MXID) @@ -673,7 +667,7 @@ func (s *SignalClient) HandleMatrixPowerLevels(ctx context.Context, msg *bridgev } revision, err := s.Client.UpdateGroup(ctx, gc, groupID) if err != nil { - return false, err + return false, wrapSendError(err) } msg.Portal.Metadata.(*signalid.PortalMetadata).Revision = revision return true, nil @@ -724,7 +718,7 @@ func (s *SignalClient) HandleMatrixViewingChat(ctx context.Context, msg *bridgev func (s *SignalClient) HandleMatrixDisappearingTimer(ctx context.Context, msg *bridgev2.MatrixDisappearingTimer) (bool, error) { if msg.Content.Type != event.DisappearingTypeAfterRead && msg.Content.Timer.Duration != 0 { - return false, fmt.Errorf("unsupported disappearing timer type: %s", msg.Content.Type) + return false, errUnsupportedDisappearingType } userID, groupID, err := signalid.ParsePortalID(msg.Portal.ID) if err != nil { @@ -751,7 +745,7 @@ func (s *SignalClient) HandleMatrixDisappearingTimer(ctx context.Context, msg *b ExpireTimer: ptr.Ptr(uint32(msg.Content.Timer.Seconds())), })) if !res.WasSuccessful { - return false, res.Error + return false, wrapSendError(res.Error) } msg.Portal.Disappear = newSetting return true, nil @@ -776,7 +770,7 @@ func (s *SignalClient) HandleMatrixDeleteChat(ctx context.Context, msg *bridgev2 Revision: portalMeta.Revision + 1, }, groupID) if err != nil { - return fmt.Errorf("failed to leave group before deleting chat: %w", err) + return wrapSendError(fmt.Errorf("failed to leave group before deleting chat: %w", err)) } portalMeta.Revision = revision } @@ -786,7 +780,7 @@ func (s *SignalClient) HandleMatrixDeleteChat(ctx context.Context, msg *bridgev2 // TODO block and delete support? err = s.syncMessageRequestResponse(ctx, msg.Portal, signalpb.SyncMessage_MessageRequestResponse_DELETE) if err != nil { - return fmt.Errorf("failed to send message request delete sync: %w", err) + return wrapSendError(fmt.Errorf("failed to send message request delete sync: %w", err)) } } @@ -864,7 +858,7 @@ func (s *SignalClient) HandleMatrixDeleteChat(ctx context.Context, msg *bridgev2 Msg("Sent conversation deletion to Signal") if !result.WasSuccessful { - return fmt.Errorf("failed to send delete conversation sync message: %w %s %s", result.Error, userID, groupID) + return wrapSendError(fmt.Errorf("failed to send delete conversation sync message: %w %s %s", result.Error, userID, groupID)) } return nil @@ -968,7 +962,7 @@ func (s *SignalClient) HandleMatrixAcceptMessageRequest(ctx context.Context, msg } err = s.syncMessageRequestResponse(ctx, msg.Portal, signalpb.SyncMessage_MessageRequestResponse_ACCEPT) if err != nil { - return fmt.Errorf("failed to sync message request acceptance: %w", err) + return wrapSendError(fmt.Errorf("failed to sync message request acceptance: %w", err)) } if userID.Type == libsignalgo.ServiceIDTypeACI { profileKey, err := s.Client.ProfileKeyForSignalID(ctx, s.Client.Store.ACI) @@ -997,7 +991,7 @@ func (s *SignalClient) HandleMatrixAcceptMessageRequest(ctx context.Context, msg PniSignatureMessage: pniSig, }) if !res.WasSuccessful { - return fmt.Errorf("failed to share profile key to accept message request: %w", res.Error) + return wrapSendError(fmt.Errorf("failed to share profile key to accept message request: %w", res.Error)) } // TODO send read receipts too? } @@ -1034,7 +1028,7 @@ func (s *SignalClient) HandleMatrixBlockUser(ctx context.Context, msg *bridgev2. } } if err = s.syncMessageRequestResponse(ctx, msg.Portal, respType); err != nil { - return err + return wrapSendError(err) } _, err = s.Client.Store.RecipientStore.LoadAndUpdateRecipient(ctx, aci, pni, func(recipient *types.Recipient) (bool, error) { changed := recipient.Blocked != msg.Content.Block @@ -1056,7 +1050,7 @@ func (s *SignalClient) reportSpam(ctx context.Context, portal *bridgev2.Portal, continue } if err = s.Client.ReportSpam(ctx, aci, meta.ServerGUID, meta.ReportingToken); err != nil { - return err + return wrapSendError(err) } seen[meta.ServerGUID] = true if len(seen) == 3 { diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index a25b77a..3704800 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -34,7 +34,6 @@ import ( "maunium.net/go/mautrix/bridgev2/database" "maunium.net/go/mautrix/bridgev2/networkid" "maunium.net/go/mautrix/bridgev2/simplevent" - "maunium.net/go/mautrix/bridgev2/status" "maunium.net/go/mautrix/event" "go.mau.fi/mautrix-signal/pkg/libsignalgo" @@ -74,7 +73,7 @@ func (s *SignalClient) handleSignalEvent(rawEvt events.SignalEvent) bool { case *events.QueueEmpty: s.queueEmptyWaiter.Set() case *events.LoggedOut: - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: evt.Error.Error()}) + s.sendLoggedOutState(evt.Error) case *events.IdentityChange: // TODO send notice default: diff --git a/pkg/connector/login.go b/pkg/connector/login.go index 8c6bdab..dd636b3 100644 --- a/pkg/connector/login.go +++ b/pkg/connector/login.go @@ -107,7 +107,7 @@ var ( ErrDeviceLinkRateLimited = bridgev2.RespError{ ErrCode: "FI.MAU.SIGNAL.DEVICE_LINK_RATE_LIMITED", Err: "Signal rate-limited the linking attempt, please wait a few minutes and try again", - StatusCode: http.StatusTooManyRequests, + StatusCode: http.StatusBadRequest, } ErrDeviceLinkRejected = bridgev2.RespError{ ErrCode: "FI.MAU.SIGNAL.DEVICE_LINK_REJECTED", diff --git a/pkg/msgconv/from-matrix.go b/pkg/msgconv/from-matrix.go index 0aab1f1..f755bbb 100644 --- a/pkg/msgconv/from-matrix.go +++ b/pkg/msgconv/from-matrix.go @@ -204,7 +204,7 @@ func (mc *MessageConverter) convertFileToSignal(ctx context.Context, evt *event. if content.MSC3245Voice != nil && mime != "audio/aac" && ffmpeg.Supported() { data, err = ffmpeg.ConvertBytes(ctx, data, ".aac", []string{}, []string{"-c:a", "aac"}, mime) if err != nil { - return nil, err + return nil, fmt.Errorf("%w (voice to aac): %w", bridgev2.ErrMediaConvertFailed, err) } mime = "audio/aac" fileName += ".aac" @@ -214,7 +214,7 @@ func (mc *MessageConverter) convertFileToSignal(ctx context.Context, evt *event. // allowed case "image/gif": if !ffmpeg.Supported() { - return nil, fmt.Errorf("converting gif stickers is not supported") + return nil, fmt.Errorf("%w: converting gif stickers is not supported", bridgev2.ErrUnsupportedMediaType) } data, err = ffmpeg.ConvertBytes(ctx, data, ".apng", []string{}, []string{}, mime) if err != nil { @@ -223,7 +223,7 @@ func (mc *MessageConverter) convertFileToSignal(ctx context.Context, evt *event. fileName += ".apng" mime = "image/apng" default: - return nil, fmt.Errorf("unsupported content type for sticker %s", mime) + return nil, fmt.Errorf("%w for sticker: %s", bridgev2.ErrUnsupportedMediaType, mime) } } att, err := getClient(ctx).UploadAttachment(ctx, data) diff --git a/pkg/signalmeow/keys.go b/pkg/signalmeow/keys.go index 84a242a..2a04c4e 100644 --- a/pkg/signalmeow/keys.go +++ b/pkg/signalmeow/keys.go @@ -408,6 +408,7 @@ func addBase64PaddingAndDecode(data string) ([]byte, error) { var ( ErrUnregisteredUser = errors.New("user is unregistered") ErrDevicesChanged = errors.New("device list changed while sending skdm") + ErrRateLimited = errors.New("rate limited by server") ) func (cli *Client) FetchAndProcessPreKey(ctx context.Context, theirServiceID libsignalgo.ServiceID, specificDeviceID int) error { diff --git a/pkg/signalmeow/senderkey.go b/pkg/signalmeow/senderkey.go index 344bacf..9d46005 100644 --- a/pkg/signalmeow/senderkey.go +++ b/pkg/signalmeow/senderkey.go @@ -249,7 +249,7 @@ func (cli *Client) sendToGroupWithSenderKey( cli.Store.RecipientStore.MarkUnregistered(ctx, serviceID, true) result.FailedToSendTo = append(result.FailedToSendTo, FailedSendResult{ Recipient: serviceID, - Error: fmt.Errorf("multi-recipient send 404"), + Error: fmt.Errorf("%w (multi-recipient send returned 404)", ErrUnregisteredUser), }) } else { result.SuccessfullySentTo = append(result.SuccessfullySentTo, SuccessfulSendResult{ @@ -277,6 +277,8 @@ func (cli *Client) sendToGroupWithSenderKey( doUnlock() // Retry recursively after fixing device lists return cli.sendToGroupWithSenderKey(ctx, groupID, allRecipients, sec, content, messageTimestamp, retries+1) + case 413, 428, 429: + return nil, fmt.Errorf("%w (multi-recipient send returned %d)", ErrRateLimited, resp.GetStatus()) default: return nil, fmt.Errorf("unexpected status code %d in multi-recipient send", resp.GetStatus()) } diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index f48a252..115b7e5 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -297,6 +297,20 @@ type GroupMessageSendResult struct { FailedToSendTo []FailedSendResult } +// FailureError returns an error from FailedToSendTo, preferring errors other than ErrUnregisteredUser, +// so that a permanent failure is only reported if every recipient failed permanently. +func (r *GroupMessageSendResult) FailureError() error { + if len(r.FailedToSendTo) == 0 { + return nil + } + for _, failure := range r.FailedToSendTo { + if !errors.Is(failure.Error, ErrUnregisteredUser) { + return failure.Error + } + } + return r.FailedToSendTo[len(r.FailedToSendTo)-1].Error +} + type SendResult interface { isSendResult() } @@ -658,8 +672,7 @@ func (cli *Client) sendToGroup( return result, nil // I only sent to myself } if len(result.SuccessfullySentTo) == 0 { - lastError := result.FailedToSendTo[len(result.FailedToSendTo)-1].Error - return nil, fmt.Errorf("failed to send to any group members: %w", lastError) + return nil, fmt.Errorf("failed to send to any group members: %w", result.FailureError()) } return result, nil @@ -1037,6 +1050,8 @@ func (cli *Client) sendContent( } cli.Store.RecipientStore.MarkUnregistered(ctx, recipient, true) return sentUnidentified, fmt.Errorf("%w (send returned 404)", ErrUnregisteredUser) + } else if *response.Status == 413 || *response.Status == 429 { + return sentUnidentified, fmt.Errorf("%w (send returned %d)", ErrRateLimited, *response.Status) } else if *response.Status != 200 { return sentUnidentified, fmt.Errorf("unexpected status code while sending: %d", *response.Status) } @@ -1189,7 +1204,7 @@ func (cli *Client) handle428(ctx context.Context, recipient libsignalgo.ServiceI // } // } //} - return fmt.Errorf("got 428 error") + return fmt.Errorf("%w (send returned 428, retry after %ds)", ErrRateLimited, retryAfterSeconds) } func (cli *Client) ReportSpam(ctx context.Context, aci uuid.UUID, serverGUID string, token []byte) error { diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index 3231322..819fca7 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -222,10 +222,12 @@ func (s *SignalWebsocket) connectLoop( return } if request == nil { - log.Fatal().Msg("Received nil request") + log.Error().Msg("Received nil request") + continue } if requestHandler == nil { - log.Fatal().Msg("Received request but no handler") + log.Error().Uint64("request_id", request.GetId()).Msg("Received request but no handler") + continue } // Handle the request with the request handler function @@ -287,20 +289,21 @@ func (s *SignalWebsocket) connectLoop( if resp != nil { if resp.StatusCode != 101 { // Server didn't want to open websocket - if resp.StatusCode >= 500 { - // We can try again if it's a 5xx - s.pushStatus(ctx, SignalWebsocketConnectionEventDisconnected, fmt.Errorf("5xx opening websocket: %v", resp.Status)) + statusErr := HTTPStatusError{StatusCode: resp.StatusCode, Status: resp.Status} + if resp.StatusCode >= 500 || resp.StatusCode == http.StatusTooManyRequests { + // We can try again if it's a 5xx or a rate limit + s.pushStatus(ctx, SignalWebsocketConnectionEventDisconnected, fmt.Errorf("error opening websocket: %w", statusErr)) } else if resp.StatusCode == 403 { // We are logged out, so we should stop trying to reconnect s.pushStatus(ctx, SignalWebsocketConnectionEventLoggedOut, fmt.Errorf("403 opening websocket, we are logged out")) return // NOT RETRYING, KILLING THE CONNECTION LOOP } else if resp.StatusCode > 0 && resp.StatusCode < 500 { // Unexpected status code - s.pushStatus(ctx, SignalWebsocketConnectionEventFatalError, fmt.Errorf("unexpected status opening websocket: %v", resp.Status)) + s.pushStatus(ctx, SignalWebsocketConnectionEventFatalError, fmt.Errorf("unexpected status opening websocket: %w", statusErr)) return // NOT RETRYING, KILLING THE CONNECTION LOOP } else { // Something is very wrong - s.pushStatus(ctx, SignalWebsocketConnectionEventError, fmt.Errorf("unexpected error opening websocket: %v", resp.Status)) + s.pushStatus(ctx, SignalWebsocketConnectionEventError, fmt.Errorf("unexpected error opening websocket: %w", statusErr)) } // Retry the connection retrying = true @@ -323,6 +326,7 @@ func (s *SignalWebsocket) connectLoop( s.ws.Store(ws) retrying = false backoff = initialBackoff + connectedAt := time.Now() responseChannels := exsync.NewMap[uint64, chan *signalpb.WebSocketResponseMessage]() loopCtx, loopCancel := context.WithCancelCause(ctx) @@ -402,12 +406,16 @@ func (s *SignalWebsocket) connectLoop( if ctxCauseErr == nil || errors.Is(ctxCauseErr, context.Canceled) { s.pushStatus(ctx, SignalWebsocketConnectionEventCleanShutdown, nil) } else { - errorCount++ + if time.Since(connectedAt) > time.Minute { + errorCount = 0 + } s.pushStatus(ctx, SignalWebsocketConnectionEventDisconnected, ctxCauseErr) if errors.Is(ctxCauseErr, ErrForcedReconnect) { // Skip the delay for forced reconnects // TODO should the delay be lowered globally? isFirstConnect = true + } else { + errorCount++ } } @@ -420,10 +428,12 @@ func (s *SignalWebsocket) connectLoop( wg.Wait() log.Debug().Msg("Finished websocket cleanup") if errorCount > 500 { - // Something is really wrong, we better panic. + // Something is really wrong, stop reconnecting. // This is a last defense against a runaway error loop, // like the WS continually closing and reconnecting - log.Fatal().Int("error_count", errorCount).Msg("Too many errors, panicking") + log.Error().Int("error_count", errorCount).Msg("Too many errors, stopping connection loop") + s.pushStatus(ctx, SignalWebsocketConnectionEventFatalError, fmt.Errorf("too many websocket errors (%d)", errorCount)) + return } } } @@ -467,10 +477,10 @@ func readLoop( incomingRequestChan <- msg.Request } else if *msg.Type == signalpb.WebSocketMessage_RESPONSE { if msg.Response == nil { - log.Fatal().Msg("Received response with no response") + return errors.New("received response message with no response") } if msg.Response.Id == nil { - log.Fatal().Msg("Received response with no id") + return errors.New("received response message with no id") } responseChannel, ok := responseChannels.Pop(*msg.Response.Id) if !ok { @@ -678,6 +688,7 @@ func OpenWebsocket(ctx context.Context, url string) (*websocket.Conn, *http.Resp func CreateWSResponse(ctx context.Context, id uint64, status int) *signalpb.WebSocketMessage { if status != 200 && status != 400 { // TODO support more responses to Signal? Are there more? + //bridgelint:ignore GR004 statuses come from the bridge's own handlers, so anything else is a bridge bug zerolog.Ctx(ctx).Fatal().Int("status", status).Msg("Error creating response. Non 200/400 not supported yet.") return nil } diff --git a/pkg/signalmeow/web/web.go b/pkg/signalmeow/web/web.go index d30e367..684cd66 100644 --- a/pkg/signalmeow/web/web.go +++ b/pkg/signalmeow/web/web.go @@ -157,6 +157,16 @@ func SendHTTPRequest(ctx context.Context, host, method, path string, opt *HTTPRe return resp, nil } +// HTTPStatusError is returned when a Signal server responds with an unexpected HTTP status. +type HTTPStatusError struct { + StatusCode int + Status string +} + +func (e HTTPStatusError) Error() string { + return e.Status +} + func CloseBody(resp *http.Response) { if resp != nil && resp.Body != nil { _ = resp.Body.Close() From 7e65e8ecc9802dc952565d523c20661c2a4aae26 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Sat, 24 Oct 2026 10:38:11 +0000 Subject: [PATCH 41/84] signalmeow/web: don't block read loop exit on full request queue (#685) --- pkg/signalmeow/web/signalwebsocket.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index 819fca7..e17c45b 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -474,7 +474,11 @@ func readLoop( Str("request_verb", *msg.Request.Verb). Str("request_path", *msg.Request.Path). Msg("Received WS request") - incomingRequestChan <- msg.Request + select { + case incomingRequestChan <- msg.Request: + case <-ctx.Done(): + return ctx.Err() + } } else if *msg.Type == signalpb.WebSocketMessage_RESPONSE { if msg.Response == nil { return errors.New("received response message with no response") From ccb17921200f871b3ce9f7d4ee41c5071fa7422d Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Mon, 26 Oct 2026 06:23:57 -0400 Subject: [PATCH 42/84] signalmeow/senderkey: retry multi-recipient sends on server errors (#684) --- pkg/signalmeow/senderkey.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/signalmeow/senderkey.go b/pkg/signalmeow/senderkey.go index 9d46005..2eefadd 100644 --- a/pkg/signalmeow/senderkey.go +++ b/pkg/signalmeow/senderkey.go @@ -279,6 +279,11 @@ func (cli *Client) sendToGroupWithSenderKey( return cli.sendToGroupWithSenderKey(ctx, groupID, allRecipients, sec, content, messageTimestamp, retries+1) case 413, 428, 429: return nil, fmt.Errorf("%w (multi-recipient send returned %d)", ErrRateLimited, resp.GetStatus()) + case 500, 503: + log.Warn().Uint32("status_code", resp.GetStatus()). + Msg("Multi-recipient send failed with server error, retrying") + doUnlock() + return cli.sendToGroupWithSenderKey(ctx, groupID, allRecipients, sec, content, messageTimestamp, retries+1) default: return nil, fmt.Errorf("unexpected status code %d in multi-recipient send", resp.GetStatus()) } From 9f44495d18e58528f2bb6c79c89c9a3991be28be Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 26 Oct 2026 14:17:42 +0200 Subject: [PATCH 43/84] msgconv/from-signal: add support for encrypted direct media --- go.mod | 2 +- go.sum | 4 ++-- pkg/msgconv/from-signal.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 89ed63d..692d50d 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( google.golang.org/grpc v1.84.0 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.32.0 + maunium.net/go/mautrix v0.32.1-0.20261026114918-8c92262134ae ) require ( diff --git a/go.sum b/go.sum index e5a7857..df2c86b 100644 --- a/go.sum +++ b/go.sum @@ -95,5 +95,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.32.0 h1:xuAZzzyWce0pFkBhV/MCLFiJdVs2rFkY3Eep7hNng4I= -maunium.net/go/mautrix v0.32.0/go.mod h1:tZSwPzw+/0pa0dxGufkh0uJqM84BNxB6e2I0+S0UyjU= +maunium.net/go/mautrix v0.32.1-0.20261026114918-8c92262134ae h1:4SY5+nh2B968L5NmMGmF0WPRbV9D1yFLP8U+JASuHXg= +maunium.net/go/mautrix v0.32.1-0.20261026114918-8c92262134ae/go.mod h1:tZSwPzw+/0pa0dxGufkh0uJqM84BNxB6e2I0+S0UyjU= diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 7c8a7a6..e34b04f 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -607,7 +607,7 @@ func (mc *MessageConverter) reuploadAttachment(ctx context.Context, att *signalp if err != nil { return nil, err } - content.URL, err = mc.Bridge.Matrix.GenerateContentURI(ctx, mediaID) + content.URL, content.File, err = mc.Bridge.GenerateContentURI(ctx, getPortal(ctx).MXID, mediaID) } else { err = mc.actuallyReuploadAttachment(ctx, content, att, attMap) if err != nil { From 45d6a02f1220594230909c2a219ad8f630377cd9 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Mon, 26 Oct 2026 09:54:39 -0400 Subject: [PATCH 44/84] matrixfmt: don't add trailing separator when joining entity strings (#688) --- pkg/msgconv/matrixfmt/html.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/msgconv/matrixfmt/html.go b/pkg/msgconv/matrixfmt/html.go index b60c0ad..9a54274 100644 --- a/pkg/msgconv/matrixfmt/html.go +++ b/pkg/msgconv/matrixfmt/html.go @@ -134,12 +134,14 @@ func JoinEntityString(with string, strings ...*EntityString) *EntityString { continue } DebugLog(" + %q %+v\n", s.String, s.Entities) + if len(str) > 0 { + str = append(str, withUTF16...) + } for _, entity := range s.Entities { entity.Start += len(str) entities = append(entities, entity) } str = append(str, s.String...) - str = append(str, withUTF16...) } DebugLog(" -> %q %+v\n", str, entities) return &EntityString{ From 6c5841d1b758a19fe946ad1f4547b154a84aea46 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Mon, 26 Oct 2026 16:22:45 +0000 Subject: [PATCH 45/84] backfill: mark read from the newest item and pass ReadUpTo (#689) --- go.mod | 2 +- go.sum | 4 ++-- pkg/connector/backfill.go | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 692d50d..2847afc 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( google.golang.org/grpc v1.84.0 google.golang.org/protobuf v1.36.12 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.32.1-0.20261026114918-8c92262134ae + maunium.net/go/mautrix v0.32.1-0.20261026145030-920bc073ba8d ) require ( diff --git a/go.sum b/go.sum index df2c86b..0da95ea 100644 --- a/go.sum +++ b/go.sum @@ -95,5 +95,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.32.1-0.20261026114918-8c92262134ae h1:4SY5+nh2B968L5NmMGmF0WPRbV9D1yFLP8U+JASuHXg= -maunium.net/go/mautrix v0.32.1-0.20261026114918-8c92262134ae/go.mod h1:tZSwPzw+/0pa0dxGufkh0uJqM84BNxB6e2I0+S0UyjU= +maunium.net/go/mautrix v0.32.1-0.20261026145030-920bc073ba8d h1:DsMn0i7cBKcQZ0AVxJm9hfWAu6xJdjRrf457EtXxyNY= +maunium.net/go/mautrix v0.32.1-0.20261026145030-920bc073ba8d/go.mod h1:tZSwPzw+/0pa0dxGufkh0uJqM84BNxB6e2I0+S0UyjU= diff --git a/pkg/connector/backfill.go b/pkg/connector/backfill.go index b7b2a23..b566850 100644 --- a/pkg/connector/backfill.go +++ b/pkg/connector/backfill.go @@ -77,8 +77,8 @@ func (s *SignalClient) FetchMessages(ctx context.Context, params bridgev2.FetchM } // GetBackupChatItems returns in reverse chronological order, so flip the list slices.Reverse(items) - var firstDirectionfulProcessed bool var isRead bool + var readUpTo time.Time convertedMessages := make([]*bridgev2.BackfillMessage, 0, len(items)) attMap := make(msgconv.AttachmentMap) recipientMap := make(map[uint64]*backuppb.Recipient) @@ -123,20 +123,17 @@ func (s *SignalClient) FetchMessages(ctx context.Context, params bridgev2.FetchM case *backuppb.ChatItem_Incoming: streamOrder = int64(dt.Incoming.GetDateServerSent()) prevStreamOrder = streamOrder - if !firstDirectionfulProcessed { - firstDirectionfulProcessed = true - isRead = dt.Incoming.Read + isRead = dt.Incoming.Read + if isRead { + readUpTo = time.UnixMilli(int64(item.DateSent)) } case *backuppb.ChatItem_Outgoing: streamOrder = int64(item.GetDateSent()) // Ensure stream order is higher than previous incoming item, but lower than next incoming item streamOrder = min(streamOrder, findNextStreamOrder(i+1)-1) streamOrder = max(streamOrder, prevStreamOrder+1) - - if !firstDirectionfulProcessed { - firstDirectionfulProcessed = true - isRead = true - } + isRead = true + readUpTo = time.UnixMilli(int64(item.DateSent)) } if len(attMap) > 0 { clear(attMap) @@ -178,11 +175,15 @@ func (s *SignalClient) FetchMessages(ctx context.Context, params bridgev2.FetchM Reactions: convertedReactions, }) } + if isRead { + readUpTo = time.Time{} + } return &bridgev2.FetchMessagesResponse{ Messages: convertedMessages, HasMore: len(items) >= params.Count, Forward: params.Forward, MarkRead: isRead, + ReadUpTo: readUpTo, ApproxTotalCount: chat.TotalMessages, CompleteCallback: func() { // When reaching the last backwards backfill batch, delete the chat from the backup store. From 6dc9ac3e0c9a31a5ba59287091282d624e83c706 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 27 Oct 2026 12:28:43 +0000 Subject: [PATCH 46/84] signalmeow/web: make request counter atomic (#687) --- pkg/signalmeow/web/web.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/signalmeow/web/web.go b/pkg/signalmeow/web/web.go index 684cd66..9463071 100644 --- a/pkg/signalmeow/web/web.go +++ b/pkg/signalmeow/web/web.go @@ -28,6 +28,7 @@ import ( "net/http" "runtime" "strings" + "sync/atomic" "time" "github.com/rs/zerolog" @@ -99,7 +100,7 @@ type HTTPReqOpt struct { OverrideURL string // Override the full URL, if set ignores path and Host } -var httpReqCounter = 0 +var httpReqCounter atomic.Int64 func SendHTTPRequest(ctx context.Context, host, method, path string, opt *HTTPReqOpt) (*http.Response, error) { // Set defaults @@ -143,8 +144,7 @@ func SendHTTPRequest(ctx context.Context, host, method, path string, opt *HTTPRe req.SetBasicAuth(*opt.Username, *opt.Password) } - httpReqCounter++ - log = log.With().Int("request_number", httpReqCounter).Logger() + log = log.With().Int64("request_number", httpReqCounter.Add(1)).Logger() log.Trace().Msg("Sending HTTP request") start := time.Now() resp, err := SignalHTTPClient.Do(req) @@ -252,9 +252,8 @@ func GetAttachment(ctx context.Context, path string, cdnNumber uint32) (*http.Re req.Header.Add("Content-Type", "application/octet-stream") req.Header.Set("User-Agent", UserAgent) - httpReqCounter++ log = log.With(). - Int("request_number", httpReqCounter). + Int64("request_number", httpReqCounter.Add(1)). Str("url", urlStr). Logger() From c2b2792f0b4f82f11ed85f449ab55aad7a7f98b9 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Thu, 29 Oct 2026 12:59:59 +0000 Subject: [PATCH 47/84] client,signalmeow/web: log out on upgrade 401 and retry other upgrade errors (#693) Co-authored-by: Claude Opus 5.5 --- pkg/connector/client.go | 17 ++++++----------- pkg/connector/errors.go | 5 ----- pkg/signalmeow/web/signalwebsocket.go | 17 +++++++---------- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/pkg/connector/client.go b/pkg/connector/client.go index 61cc282..e6c5b5e 100644 --- a/pkg/connector/client.go +++ b/pkg/connector/client.go @@ -203,14 +203,8 @@ func (s *SignalClient) bridgeStateLoop(statusChan <-chan signalmeow.SignalConnec s.UserLogin.BridgeState.Send(connectionErrorState(err)) case signalmeow.SignalConnectionEventFatalError: - if isUnauthorized(err) { - s.stopChatSync() - s.UserLogin.Log.Debug().Msg("Sending BadCredentials BridgeState") - s.sendLoggedOutState(err) - } else { - s.UserLogin.Log.Debug().Msg("Sending UnknownError BridgeState") - s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateUnknownError, Error: "signal-connection-failed", Info: map[string]any{"go_error": err.Error()}}) - } + s.UserLogin.Log.Debug().Msg("Sending UnknownError BridgeState") + s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateUnknownError, Error: "signal-connection-failed", Info: map[string]any{"go_error": err.Error()}}) case signalmeow.SignalConnectionCleanShutdown: if s.Client.IsLoggedIn() { @@ -254,12 +248,13 @@ func (s *SignalClient) ConnectBackground(ctx context.Context, _ *bridgev2.Connec case web.SignalWebsocketConnectionEventLoggedOut: log.Err(status.Err).Msg("Authed websocket logged out") s.sendLoggedOutState(status.Err) + err = s.Client.ClearKeysAndDisconnect(ctx) + if err != nil { + log.Err(err).Msg("Failed to clear keys and disconnect") + } return fmt.Errorf("authed websocket logged out: %w", status.Err) case web.SignalWebsocketConnectionEventError, web.SignalWebsocketConnectionEventFatalError: log.Err(status.Err).Msg("Authed websocket error") - if isUnauthorized(status.Err) { - s.sendLoggedOutState(status.Err) - } return fmt.Errorf("authed websocket errored: %w", status.Err) case web.SignalWebsocketConnectionEventCleanShutdown: log.Info().Msg("Authed websocket clean shutdown") diff --git a/pkg/connector/errors.go b/pkg/connector/errors.go index 25092ff..b4783d4 100644 --- a/pkg/connector/errors.go +++ b/pkg/connector/errors.go @@ -153,11 +153,6 @@ func connectionErrorState(err error) status.BridgeState { return state } -func isUnauthorized(err error) bool { - var statusErr web.HTTPStatusError - return errors.As(err, &statusErr) && statusErr.StatusCode == http.StatusUnauthorized -} - func (s *SignalClient) sendLoggedOutState(err error) { state := status.BridgeState{ StateEvent: status.StateBadCredentials, diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index e17c45b..0396307 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -256,6 +256,7 @@ func (s *SignalWebsocket) connectLoop( retrying := false errorCount := 0 isFirstConnect := true + var connectedAt time.Time wsURL := (&url.URL{ Scheme: "wss", Host: APIHostname, @@ -273,7 +274,7 @@ func (s *SignalWebsocket) connectLoop( case <-ctx.Done(): } backoff += backoffIncrement - } else if !isFirstConnect && s.basicAuth != nil { + } else if !isFirstConnect && (s.basicAuth != nil || time.Since(connectedAt) < time.Minute) { select { case <-time.After(initialBackoff): case <-ctx.Done(): @@ -293,17 +294,13 @@ func (s *SignalWebsocket) connectLoop( if resp.StatusCode >= 500 || resp.StatusCode == http.StatusTooManyRequests { // We can try again if it's a 5xx or a rate limit s.pushStatus(ctx, SignalWebsocketConnectionEventDisconnected, fmt.Errorf("error opening websocket: %w", statusErr)) - } else if resp.StatusCode == 403 { + } else if resp.StatusCode == http.StatusForbidden || (resp.StatusCode == http.StatusUnauthorized && s.basicAuth != nil) { // We are logged out, so we should stop trying to reconnect - s.pushStatus(ctx, SignalWebsocketConnectionEventLoggedOut, fmt.Errorf("403 opening websocket, we are logged out")) - return // NOT RETRYING, KILLING THE CONNECTION LOOP - } else if resp.StatusCode > 0 && resp.StatusCode < 500 { - // Unexpected status code - s.pushStatus(ctx, SignalWebsocketConnectionEventFatalError, fmt.Errorf("unexpected status opening websocket: %w", statusErr)) + s.pushStatus(ctx, SignalWebsocketConnectionEventLoggedOut, fmt.Errorf("%w opening websocket, we are logged out", statusErr)) return // NOT RETRYING, KILLING THE CONNECTION LOOP } else { - // Something is very wrong - s.pushStatus(ctx, SignalWebsocketConnectionEventError, fmt.Errorf("unexpected error opening websocket: %w", statusErr)) + // Unexpected status code + s.pushStatus(ctx, SignalWebsocketConnectionEventError, fmt.Errorf("unexpected status opening websocket: %w", statusErr)) } // Retry the connection retrying = true @@ -326,7 +323,7 @@ func (s *SignalWebsocket) connectLoop( s.ws.Store(ws) retrying = false backoff = initialBackoff - connectedAt := time.Now() + connectedAt = time.Now() responseChannels := exsync.NewMap[uint64, chan *signalpb.WebSocketResponseMessage]() loopCtx, loopCancel := context.WithCancelCause(ctx) From 357eb58a446f90fa517dc0f08d7e0e732bc2b3d0 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Thu, 29 Oct 2026 13:22:11 +0000 Subject: [PATCH 48/84] directmedia: map upstream download failures to matrix errors (#694) Co-authored-by: Claude Opus 5.5 --- pkg/connector/directmedia.go | 6 +++--- pkg/connector/errors.go | 17 +++++++++++++++++ pkg/signalmeow/groups.go | 2 +- pkg/signalmeow/profile.go | 2 +- pkg/signalmeow/sticker.go | 2 +- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/pkg/connector/directmedia.go b/pkg/connector/directmedia.go index 05e2a07..82ed16d 100644 --- a/pkg/connector/directmedia.go +++ b/pkg/connector/directmedia.go @@ -79,7 +79,7 @@ func (s *SignalConnector) Download(ctx context.Context, mediaID networkid.MediaI rawDataResp, err = client.Client.DownloadGroupAvatar(ctx, info.GroupAvatarPath, groupMasterKey) if err != nil { log.Err(err).Msg("Direct download failed") - return nil, err + return nil, wrapDirectMediaError(err) } case *signalid.DirectMediaProfileAvatar: log.Info(). @@ -107,7 +107,7 @@ func (s *SignalConnector) Download(ctx context.Context, mediaID networkid.MediaI rawDataResp, err = client.Client.DownloadUserAvatar(ctx, info.ProfileAvatarPath, *profileKey) if err != nil { log.Err(err).Msg("Direct download failed") - return nil, err + return nil, wrapDirectMediaError(err) } case *signalid.DirectMediaSticker: log.Info(). @@ -118,7 +118,7 @@ func (s *SignalConnector) Download(ctx context.Context, mediaID networkid.MediaI rawDataResp, err = signalmeow.DownloadStickerPackItem(ctx, info.PackID, info.PackKey, info.StickerID) if err != nil { log.Err(err).Msg("Direct download failed") - return nil, err + return nil, wrapDirectMediaError(err) } default: return nil, fmt.Errorf("no downloader for direct media type: %T", info) diff --git a/pkg/connector/errors.go b/pkg/connector/errors.go index b4783d4..c06ee17 100644 --- a/pkg/connector/errors.go +++ b/pkg/connector/errors.go @@ -136,6 +136,23 @@ func wrapRespError(err error) error { return fmt.Errorf("%w: %w", mapped, err) } +func wrapDirectMediaError(err error) error { + var statusErr web.HTTPStatusError + if !errors.As(err, &statusErr) { + return err + } + switch statusErr.StatusCode { + case http.StatusNotFound, http.StatusGone: + return mautrix.MNotFound.WithMessage("Media not found on Signal") + case http.StatusUnauthorized, http.StatusForbidden: + return mautrix.MForbidden.WithMessage("Signal denied access to the media") + case http.StatusTooManyRequests: + return mautrix.MLimitExceeded.WithMessage("Rate limited by Signal, please try again later").WithCanRetry(true) + default: + return mautrix.MUnknown.WithMessage("Unexpected response from Signal").WithStatus(http.StatusBadGateway).WithCanRetry(true) + } +} + func connectionErrorState(err error) status.BridgeState { state := status.BridgeState{ StateEvent: status.StateTransientDisconnect, diff --git a/pkg/signalmeow/groups.go b/pkg/signalmeow/groups.go index 493ecbb..0849f74 100644 --- a/pkg/signalmeow/groups.go +++ b/pkg/signalmeow/groups.go @@ -707,7 +707,7 @@ func (cli *Client) DownloadGroupAvatar(ctx context.Context, avatarPath string, g return nil, fmt.Errorf("failed to send request: %w", err) } if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return nil, fmt.Errorf("unexpected response status %d", resp.StatusCode) + return nil, fmt.Errorf("unexpected response status: %w", web.HTTPStatusError{StatusCode: resp.StatusCode, Status: resp.Status}) } encryptedAvatar, err := io.ReadAll(resp.Body) if err != nil { diff --git a/pkg/signalmeow/profile.go b/pkg/signalmeow/profile.go index a515f5a..a0878b6 100644 --- a/pkg/signalmeow/profile.go +++ b/pkg/signalmeow/profile.go @@ -289,7 +289,7 @@ func (cli *Client) DownloadUserAvatar(ctx context.Context, avatarPath string, pr } defer web.CloseBody(resp) if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return nil, fmt.Errorf("unexpected response status %d", resp.StatusCode) + return nil, fmt.Errorf("unexpected response status: %w", web.HTTPStatusError{StatusCode: resp.StatusCode, Status: resp.Status}) } encryptedAvatar, err := io.ReadAll(resp.Body) if err != nil { diff --git a/pkg/signalmeow/sticker.go b/pkg/signalmeow/sticker.go index e1364b1..f50fafc 100644 --- a/pkg/signalmeow/sticker.go +++ b/pkg/signalmeow/sticker.go @@ -72,7 +72,7 @@ func downloadStickerData(ctx context.Context, path string, packKey []byte) ([]by if err != nil { return nil, fmt.Errorf("failed to make request: %w", err) } else if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("unexpected status code %d", resp.StatusCode) + return nil, fmt.Errorf("unexpected status code: %w", web.HTTPStatusError{StatusCode: resp.StatusCode, Status: resp.Status}) } else if body, err = io.ReadAll(resp.Body); err != nil { return nil, fmt.Errorf("failed to read response: %w", err) } else if decrypted, err = decryptSticker(packKey, body); err != nil { From e2319d6cde31534d7243933fa3eee8118d1435ec Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Thu, 29 Oct 2026 13:27:39 +0000 Subject: [PATCH 49/84] signalmeow: handle closed websocket status channels (#691) --- pkg/signalmeow/receiving.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index f0d69df..857bc4b 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -154,7 +154,10 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection case <-loopCtx.Done(): log.Info().Msg("Context done, exiting websocket status loop") return - case status := <-authChan: + case status, ok := <-authChan: + if !ok { + return + } lastAuthStatus = status currentStatus = status @@ -182,7 +185,11 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection default: } } - case status := <-unauthChan: + case status, ok := <-unauthChan: + if !ok { + unauthChan = nil + continue + } lastUnauthStatus = status currentStatus = status From 572a190db285cf22a9b817a9c2abec5532d4e354 Mon Sep 17 00:00:00 2001 From: Highest <91629626+highesttt@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:40:25 -0400 Subject: [PATCH 50/84] msgconv: clarify outgoing view-once placeholders (#679) --- pkg/msgconv/from-signal.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index e34b04f..251e9dd 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -99,7 +99,9 @@ func (mc *MessageConverter) ToMatrix( } if dm.GetIsViewOnce() { var unavailableReason string - if len(dm.GetAttachments()) == 0 || sender == client.Store.ACI || + if sender == client.Store.ACI { + unavailableReason = "Sent a view-once message." + } else if len(dm.GetAttachments()) == 0 || !time.UnixMilli(int64(dm.GetTimestamp())).Add(45*24*time.Hour).After(time.Now()) { unavailableReason = "View-once media is no longer available." } else if len(dm.GetAttachments()) != 1 || dm.Sticker != nil || dm.PollVote != nil || dm.PollCreate != nil || dm.PollTerminate != nil || From 1cc623ed01777a2170a69589ee9c0a21f650b817 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 30 Oct 2026 14:15:20 +0200 Subject: [PATCH 51/84] signalmeow/web: only log error responses by default Closes #696 --- pkg/signalmeow/web/signalwebsocket.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index 0396307..7ee54c7 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -493,9 +493,9 @@ func readLoop( logEvt := log.Debug(). Uint64("response_id", msg.Response.GetId()). Uint32("response_status", msg.Response.GetStatus()). - Str("response_message", msg.Response.GetMessage()) - if log.GetLevel() == zerolog.TraceLevel || len(msg.Response.Body) < 256 { - logEvt.Strs("response_headers", msg.Response.Headers) + Str("response_message", msg.Response.GetMessage()). + Strs("response_headers", msg.Response.Headers) + if log.GetLevel() == zerolog.TraceLevel || msg.Response.GetStatus() >= 400 { if json.Valid(msg.Response.Body) { logEvt.RawJSON("response_body", msg.Response.Body) } else { From 880ea0dceb5be9d4329501b59b959563202e9d3c Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Sun, 1 Nov 2026 12:47:23 +0000 Subject: [PATCH 52/84] signalmeow/receiving: ignore hangups for calls accepted on another device (#700) --- pkg/signalmeow/receiving.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 857bc4b..1f55b26 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -651,7 +651,7 @@ func (cli *Client) handleDecryptedResult( }) } case *signalpb.Content_CallMessage: - if !isBlocked && (content.CallMessage.Offer != nil || content.CallMessage.Hangup != nil) { + if !isBlocked && (content.CallMessage.Offer != nil || (content.CallMessage.Hangup != nil && content.CallMessage.Hangup.GetType() != signalpb.CallMessage_Hangup_HANGUP_ACCEPTED)) { handlerSuccess = cli.handleEvent(&events.Call{ Info: events.MessageInfo{ Sender: theirServiceID.UUID, From ac200339c5635e1dad1314696fba74dff3b4908c Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 13:06:19 -0500 Subject: [PATCH 53/84] signalmeow/receiving: use ciphertext message type for retry requests (#697) Co-authored-by: Indent --- pkg/signalmeow/receiving_decrypt.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/signalmeow/receiving_decrypt.go b/pkg/signalmeow/receiving_decrypt.go index f92647c..e6abff4 100644 --- a/pkg/signalmeow/receiving_decrypt.go +++ b/pkg/signalmeow/receiving_decrypt.go @@ -71,12 +71,15 @@ func (cli *Client) decryptEnvelope( } var result *DecryptionResult var bundleType string + var ciphertextType libsignalgo.CiphertextMessageType if *envelope.Type == signalpb.Envelope_PREKEY_MESSAGE { result, err = cli.prekeyDecrypt(ctx, destinationServiceID, sender, envelope.Content, envelope.GetServerTimestamp()) bundleType = "prekey bundle" + ciphertextType = libsignalgo.CiphertextMessageTypePreKey } else { result, err = cli.decryptCiphertextEnvelope(ctx, destinationServiceID, sender, envelope.Content, envelope.GetServerTimestamp()) bundleType = "ciphertext" + ciphertextType = libsignalgo.CiphertextMessageTypeWhisper } if err != nil { return DecryptionResult{ @@ -84,7 +87,7 @@ func (cli *Client) decryptEnvelope( Err: fmt.Errorf("failed to decrypt %s envelope: %w", bundleType, err), Retriable: true, // TODO should these ever be not retriable? Ciphertext: envelope.Content, - CiphertextType: libsignalgo.CiphertextMessageType(envelope.GetType()), + CiphertextType: ciphertextType, } } return *result From 9dbbb6e4eaea7e179e4efd42171b229a195738fe Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 13:11:32 -0500 Subject: [PATCH 54/84] signalmeow/keys: upload at most 100 prekeys of each type (#699) Co-authored-by: Indent --- pkg/signalmeow/keys.go | 7 +++++++ pkg/signalmeow/store/prekey_store.go | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/signalmeow/keys.go b/pkg/signalmeow/keys.go index 2a04c4e..1b2370a 100644 --- a/pkg/signalmeow/keys.go +++ b/pkg/signalmeow/keys.go @@ -64,6 +64,13 @@ func (cli *Client) RegisterAllPreKeys(ctx context.Context, pks store.PreKeyStore return fmt.Errorf("failed to get all kyber prekeys: %w", err) } + if len(preKeys) > PREKEY_BATCH_SIZE { + preKeys = preKeys[len(preKeys)-PREKEY_BATCH_SIZE:] + } + if len(kyberPreKeys) > PREKEY_BATCH_SIZE { + kyberPreKeys = kyberPreKeys[len(kyberPreKeys)-PREKEY_BATCH_SIZE:] + } + // We need to have some keys to upload if len(preKeys) == 0 && len(kyberPreKeys) == 0 { return fmt.Errorf("no prekeys to upload") diff --git a/pkg/signalmeow/store/prekey_store.go b/pkg/signalmeow/store/prekey_store.go index 37bca7e..2cf62a5 100644 --- a/pkg/signalmeow/store/prekey_store.go +++ b/pkg/signalmeow/store/prekey_store.go @@ -51,13 +51,13 @@ type PreKeyStore interface { } const ( - getAllPreKeysQuery = `SELECT key_pair FROM signalmeow_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_signed=$3` + getAllPreKeysQuery = `SELECT key_pair FROM signalmeow_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_signed=$3 ORDER BY key_id` getPreKeyQuery = `SELECT key_pair FROM signalmeow_pre_keys WHERE account_id=$1 AND service_id=$2 AND key_id=$3 AND is_signed=$4` insertPreKeyQuery = `INSERT INTO signalmeow_pre_keys (account_id, service_id, key_id, is_signed, key_pair) VALUES ($1, $2, $3, $4, $5)` deletePreKeyQuery = `DELETE FROM signalmeow_pre_keys WHERE account_id=$1 AND service_id=$2 AND key_id=$3 AND is_signed=$4` getLastPreKeyIDQuery = `SELECT COUNT(*), COALESCE(MAX(key_id), 0) FROM signalmeow_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_signed=$3` - getAllKyberPreKeysQuery = `SELECT key_pair FROM signalmeow_kyber_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_last_resort=false` + getAllKyberPreKeysQuery = `SELECT key_pair FROM signalmeow_kyber_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_last_resort=false ORDER BY key_id` getKyberPreKeyQuery = `SELECT key_pair FROM signalmeow_kyber_pre_keys WHERE account_id=$1 AND service_id=$2 AND key_id=$3` insertKyberPreKeyQuery = `INSERT INTO signalmeow_kyber_pre_keys (account_id, service_id, key_id, key_pair, is_last_resort) VALUES ($1, $2, $3, $4, $5)` deleteKyberPreKeyQuery = `DELETE FROM signalmeow_kyber_pre_keys WHERE account_id=$1 AND service_id=$2 AND key_id=$3` From d3e8d560baaf87b121a4071cf253735ec132edb1 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 13:12:33 -0500 Subject: [PATCH 55/84] chatsync: stop waiting for transfer archive after it times out (#698) Co-authored-by: Indent --- pkg/connector/chatsync.go | 12 +++++++++++- pkg/signalmeow/backup.go | 5 +++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pkg/connector/chatsync.go b/pkg/connector/chatsync.go index 47963d7..ec05b36 100644 --- a/pkg/connector/chatsync.go +++ b/pkg/connector/chatsync.go @@ -19,6 +19,7 @@ package connector import ( "context" "encoding/base64" + "errors" "time" "github.com/google/uuid" @@ -28,6 +29,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalid" + "go.mau.fi/mautrix-signal/pkg/signalmeow" "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/backuppb" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) @@ -48,7 +50,15 @@ func (s *SignalClient) syncChats(ctx context.Context, cancel context.CancelFunc) if s.Client.Store.EphemeralBackupKey != nil { zerolog.Ctx(ctx).Info().Msg("Fetching transfer archive before syncing chats") meta, err := s.Client.WaitForTransfer(ctx) - if err != nil { + if errors.Is(err, signalmeow.ErrTransferTimedOut) { + zerolog.Ctx(ctx).Warn().Msg("Transfer archive wasn't uploaded in time, giving up") + s.UserLogin.Metadata.(*signalid.UserLoginMetadata).ChatsSynced = true + err = s.UserLogin.Save(ctx) + if err != nil { + zerolog.Ctx(ctx).Err(err).Msg("Failed to save user login metadata after transfer archive timed out") + } + return + } else if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to request transfer archive") return } else if meta.Error != "" { diff --git a/pkg/signalmeow/backup.go b/pkg/signalmeow/backup.go index f003e19..911a888 100644 --- a/pkg/signalmeow/backup.go +++ b/pkg/signalmeow/backup.go @@ -42,6 +42,7 @@ const transferArchiveFetchTimeout = 1 * time.Hour var ( ErrNoEphemeralBackupKey = errors.New("no ephemeral backup key") + ErrTransferTimedOut = errors.New("timed out waiting for transfer archive") ) const ( @@ -271,8 +272,8 @@ func (cli *Client) WaitForTransfer(ctx context.Context) (*TransferArchiveMetadat for { remainingTime := time.Until(timeout) - if remainingTime < 0 { - return nil, fmt.Errorf("timed out") + if remainingTime < time.Second { + return nil, ErrTransferTimedOut } reqStart := time.Now() reqTimeout := min(remainingTime, 5*time.Minute) From a82a7f38a408e28db910152f2638a52bf996249f Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 13:16:23 -0500 Subject: [PATCH 56/84] signalmeow/web: use a longer response header timeout for attachment uploads (#695) Co-authored-by: Indent --- pkg/connector/connector.go | 3 +++ pkg/signalmeow/attachments.go | 2 ++ pkg/signalmeow/web/web.go | 10 +++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go index 392a100..3a3823a 100644 --- a/pkg/connector/connector.go +++ b/pkg/connector/connector.go @@ -94,8 +94,11 @@ func (s *SignalConnector) ResetHTTPTransport() { settings = hs.GetHTTPClientSettings() } oldClient := web.SignalHTTPClient + oldUploadClient := web.SignalUploadHTTPClient web.SignalHTTPClient = settings.WithTLSConfig(web.SignalTLSConfig).Compile() + web.SignalUploadHTTPClient = settings.WithTLSConfig(web.SignalTLSConfig).WithResponseHeaderTimeout(2 * time.Minute).Compile() oldClient.CloseIdleConnections() + oldUploadClient.CloseIdleConnections() } func (s *SignalConnector) ResetNetworkConnections() { diff --git a/pkg/signalmeow/attachments.go b/pkg/signalmeow/attachments.go index 0b5f7e2..9bfc1fd 100644 --- a/pkg/signalmeow/attachments.go +++ b/pkg/signalmeow/attachments.go @@ -344,6 +344,7 @@ func (cli *Client) uploadAttachmentLegacy( ContentType: web.ContentTypeOctetStream, Username: &username, Password: &password, + Upload: true, }) web.CloseBody(resp) if err != nil { @@ -368,6 +369,7 @@ func (cli *Client) uploadAttachmentTUS( Body: encryptedWithMAC, ContentType: web.ContentTypeOffsetOctetStream, Headers: uploadAttributes.Headers, + Upload: true, }) web.CloseBody(resp) // TODO actually support resuming on error diff --git a/pkg/signalmeow/web/web.go b/pkg/signalmeow/web/web.go index 9463071..fc86457 100644 --- a/pkg/signalmeow/web/web.go +++ b/pkg/signalmeow/web/web.go @@ -75,6 +75,9 @@ var signalTransport = &http.Transport{ var SignalHTTPClient = &http.Client{ Transport: signalTransport, } +var SignalUploadHTTPClient = &http.Client{ + Transport: signalTransport, +} func init() { SignalCertPool.AddCert(exerrors.Must(x509.ParseCertificate(signalRootCertBytes))) @@ -98,6 +101,7 @@ type HTTPReqOpt struct { ContentType ContentType Headers map[string]string OverrideURL string // Override the full URL, if set ignores path and Host + Upload bool } var httpReqCounter atomic.Int64 @@ -146,8 +150,12 @@ func SendHTTPRequest(ctx context.Context, host, method, path string, opt *HTTPRe log = log.With().Int64("request_number", httpReqCounter.Add(1)).Logger() log.Trace().Msg("Sending HTTP request") + client := SignalHTTPClient + if opt.Upload { + client = SignalUploadHTTPClient + } start := time.Now() - resp, err := SignalHTTPClient.Do(req) + resp, err := client.Do(req) dur := time.Since(start) if err != nil { log.Err(err).Dur("duration", dur).Msg("Error sending request") From 4b5f4f74ca40813bd69e5655198964e5bee33816 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 09:28:08 -0500 Subject: [PATCH 57/84] groupinfo: allow reactions in announcement-only groups (#692) Co-authored-by: Indent --- pkg/connector/groupinfo.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/connector/groupinfo.go b/pkg/connector/groupinfo.go index d958463..345ba28 100644 --- a/pkg/connector/groupinfo.go +++ b/pkg/connector/groupinfo.go @@ -112,6 +112,8 @@ func (s *SignalClient) wrapGroupInfo(ctx context.Context, groupInfo *signalmeow. PowerLevels: &bridgev2.PowerLevelOverrides{ Events: map[event.Type]int{ event.StatePowerLevels: moderatorPL, + event.EventReaction: defaultPL, + event.EventRedaction: defaultPL, }, }, ExcludeChangesFromTimeline: true, From 403c050d3b35357a58f1e2f344fa7f7f6c4c6c98 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 31 Oct 2026 19:51:35 +0200 Subject: [PATCH 58/84] libsignal: update to v0.106.1 --- pkg/libsignalgo/libsignal | 2 +- pkg/libsignalgo/libsignal-ffi.h | 190 +++++++++++++++++++++-- pkg/libsignalgo/signalversion/version.go | 2 +- pkg/libsignalgo/update-ffi-docker.sh | 8 +- pkg/libsignalgo/update-ffi-version.sh | 33 ++++ pkg/libsignalgo/update-ffi.sh | 9 +- pkg/libsignalgo/version.go | 13 ++ 7 files changed, 228 insertions(+), 29 deletions(-) create mode 100755 pkg/libsignalgo/update-ffi-version.sh create mode 100644 pkg/libsignalgo/version.go diff --git a/pkg/libsignalgo/libsignal b/pkg/libsignalgo/libsignal index 4beb029..904c8dc 160000 --- a/pkg/libsignalgo/libsignal +++ b/pkg/libsignalgo/libsignal @@ -1 +1 @@ -Subproject commit 4beb029d8a941f81e7d9c6d8af1ed25a677569a8 +Subproject commit 904c8dc8216073b078a5f2f5090e3da8382e6a92 diff --git a/pkg/libsignalgo/libsignal-ffi.h b/pkg/libsignalgo/libsignal-ffi.h index b8cae20..d8e981e 100644 --- a/pkg/libsignalgo/libsignal-ffi.h +++ b/pkg/libsignalgo/libsignal-ffi.h @@ -520,6 +520,22 @@ static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17 typedef const SignalOwnedBuffer* SignalType_ConstPointer_SignalOwnedBuffer; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBuffer) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBuffer) == 8); +typedef SignalOwnedBuffer* SignalType_MutPointer_SignalOwnedBuffer; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBuffer) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBuffer) == 8); +typedef struct { + SignalOwnedBuffer* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedOwnedBuffer; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 8); +typedef const SignalOwnedBufferOfMaxAlignedOwnedBuffer* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 8); typedef enum { SignalAuthCheckResultFfiResultMatch, SignalAuthCheckResultFfiResultNoMatch, @@ -607,6 +623,33 @@ static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFf typedef const SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); +typedef enum { + SignalDeviceCapabilityInternalFfiResultStorage, + SignalDeviceCapabilityInternalFfiResultTransfer, + SignalDeviceCapabilityInternalFfiResultAttachmentBackfill, + SignalDeviceCapabilityInternalFfiResultSparsePostQuantumRatchet, + SignalDeviceCapabilityInternalFfiResultProfilesV2, + SignalDeviceCapabilityInternalFfiResultUsernameChangeSyncMessage, + SignalDeviceCapabilityInternalFfiResultOptionalPhoneNumber, +} SignalDeviceCapabilityInternalFfiResult; +static_assert_64bit(sizeof(SignalDeviceCapabilityInternalFfiResult) == 4); +static_assert_64bit(alignof(SignalDeviceCapabilityInternalFfiResult) == 4); +typedef SignalDeviceCapabilityInternalFfiResult* SignalType_MutPointer_SignalDeviceCapabilityInternalFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalDeviceCapabilityInternalFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalDeviceCapabilityInternalFfiResult) == 8); +typedef struct { + SignalDeviceCapabilityInternalFfiResult* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 8); +typedef const SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 8); typedef struct { uint8_t id; SignalOwnedBuffer encrypted_name; @@ -869,19 +912,6 @@ static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedi32, length) == 8); static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedi32, size_bytes) == 16); static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedi32) == 24); static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedi32) == 8); -typedef SignalOwnedBuffer* SignalType_MutPointer_SignalOwnedBuffer; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBuffer) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBuffer) == 8); -typedef struct { - SignalOwnedBuffer* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedOwnedBuffer; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedOwnedBuffer, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedOwnedBuffer) == 8); typedef struct { SignalOwnedBuffer user_handle; SignalOwnedBufferOfMaxAlignedi32 allowed_algorithms; @@ -1072,6 +1102,59 @@ static_assert_64bit(alignof(SignalType_ConstPointer_SignalServerMessageAck) == 8 typedef const SignalUnauthenticatedChatConnection* SignalType_ConstPointer_SignalUnauthenticatedChatConnection; static_assert_64bit(sizeof(SignalType_ConstPointer_SignalUnauthenticatedChatConnection) == 8); static_assert_64bit(alignof(SignalType_ConstPointer_SignalUnauthenticatedChatConnection) == 8); +typedef struct { + int64_t level; + uint64_t expiration; +} SignalBackupEntitlementFfiResult; +static_assert_64bit(offsetof(SignalBackupEntitlementFfiResult, level) == 0); +static_assert_64bit(offsetof(SignalBackupEntitlementFfiResult, expiration) == 8); +static_assert_64bit(sizeof(SignalBackupEntitlementFfiResult) == 16); +static_assert_64bit(alignof(SignalBackupEntitlementFfiResult) == 8); +typedef SignalBackupEntitlementFfiResult MaybeUninitOfBackupEntitlementFfiResult; +static_assert_64bit(sizeof(MaybeUninitOfBackupEntitlementFfiResult) == 16); +static_assert_64bit(alignof(MaybeUninitOfBackupEntitlementFfiResult) == 8); +typedef struct { + bool present; + MaybeUninitOfBackupEntitlementFfiResult value; +} SignalOptionalOfBackupEntitlementFfiResult; +static_assert_64bit(offsetof(SignalOptionalOfBackupEntitlementFfiResult, present) == 0); +static_assert_64bit(offsetof(SignalOptionalOfBackupEntitlementFfiResult, value) == 8); +static_assert_64bit(sizeof(SignalOptionalOfBackupEntitlementFfiResult) == 24); +static_assert_64bit(alignof(SignalOptionalOfBackupEntitlementFfiResult) == 8); +typedef struct { + const int8_t* badge_id; + uint64_t expiration; + bool visible; +} SignalBadgeEntitlementFfiResult; +static_assert_64bit(offsetof(SignalBadgeEntitlementFfiResult, badge_id) == 0); +static_assert_64bit(offsetof(SignalBadgeEntitlementFfiResult, expiration) == 8); +static_assert_64bit(offsetof(SignalBadgeEntitlementFfiResult, visible) == 16); +static_assert_64bit(sizeof(SignalBadgeEntitlementFfiResult) == 24); +static_assert_64bit(alignof(SignalBadgeEntitlementFfiResult) == 8); +typedef SignalBadgeEntitlementFfiResult* SignalType_MutPointer_SignalBadgeEntitlementFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalBadgeEntitlementFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalBadgeEntitlementFfiResult) == 8); +typedef struct { + SignalBadgeEntitlementFfiResult* base; + size_t length; + size_t size_bytes; +} SignalOwnedBufferOfMaxAlignedBadgeEntitlementFfiResult; +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBadgeEntitlementFfiResult, base) == 0); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBadgeEntitlementFfiResult, length) == 8); +static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBadgeEntitlementFfiResult, size_bytes) == 16); +static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedBadgeEntitlementFfiResult) == 24); +static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedBadgeEntitlementFfiResult) == 8); +typedef struct { + SignalOwnedBufferOfMaxAlignedBadgeEntitlementFfiResult badges; + SignalOptionalOfBackupEntitlementFfiResult backup; +} SignalAccountEntitlementsFfiResult; +static_assert_64bit(offsetof(SignalAccountEntitlementsFfiResult, badges) == 0); +static_assert_64bit(offsetof(SignalAccountEntitlementsFfiResult, backup) == 24); +static_assert_64bit(sizeof(SignalAccountEntitlementsFfiResult) == 48); +static_assert_64bit(alignof(SignalAccountEntitlementsFfiResult) == 8); +typedef const SignalAccountEntitlementsFfiResult* SignalType_ConstPointer_SignalAccountEntitlementsFfiResult; +static_assert_64bit(sizeof(SignalType_ConstPointer_SignalAccountEntitlementsFfiResult) == 8); +static_assert_64bit(alignof(SignalType_ConstPointer_SignalAccountEntitlementsFfiResult) == 8); typedef SignalPairOfCStringPtrCStringPtr* SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr; static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); @@ -2667,6 +2750,22 @@ static_assert_64bit(alignof(SignalCPromiseOwnedBuffer) == 8); typedef SignalCPromiseOwnedBuffer* SignalType_MutPointer_SignalCPromiseOwnedBuffer; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBuffer) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBuffer) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedOwnedBuffer_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer; +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer) == 24); +static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer) == 8); +typedef SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer) == 8); typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, SignalType_ConstPointer_void); static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void) == 8); static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void) == 8); @@ -2699,6 +2798,22 @@ static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmed typedef SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult; +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 8); +typedef SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult) == 8); typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, SignalType_ConstPointer_void); static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void) == 8); static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void) == 8); @@ -2891,6 +3006,22 @@ static_assert_64bit(alignof(SignalCPromiseDeleteBackupMediaNextChunkFfiResult) = typedef SignalCPromiseDeleteBackupMediaNextChunkFfiResult* SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult; static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 8); static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 8); +typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalAccountEntitlementsFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalAccountEntitlementsFfiResult, SignalType_ConstPointer_void); +static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalAccountEntitlementsFfiResult_ConstPointer_void) == 8); +static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalAccountEntitlementsFfiResult_ConstPointer_void) == 8); +typedef struct { + SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalAccountEntitlementsFfiResult_ConstPointer_void complete; + const void* context; + uint64_t cancellation_id; +} SignalCPromiseAccountEntitlementsFfiResult; +static_assert_64bit(offsetof(SignalCPromiseAccountEntitlementsFfiResult, complete) == 0); +static_assert_64bit(offsetof(SignalCPromiseAccountEntitlementsFfiResult, context) == 8); +static_assert_64bit(offsetof(SignalCPromiseAccountEntitlementsFfiResult, cancellation_id) == 16); +static_assert_64bit(sizeof(SignalCPromiseAccountEntitlementsFfiResult) == 24); +static_assert_64bit(alignof(SignalCPromiseAccountEntitlementsFfiResult) == 8); +typedef SignalCPromiseAccountEntitlementsFfiResult* SignalType_MutPointer_SignalCPromiseAccountEntitlementsFfiResult; +static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseAccountEntitlementsFfiResult) == 8); +static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseAccountEntitlementsFfiResult) == 8); typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult, SignalType_ConstPointer_void); static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void) == 8); static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void) == 8); @@ -3610,6 +3741,7 @@ typedef enum { SignalErrorCodeMfaKeyNotFound = 237, SignalErrorCodeWebAuthnRegistrationUnsuccessful = 238, SignalErrorCodeProfileNotFound = 239, + SignalErrorCodeReceiptAlreadyRedeemed = 240, } SignalErrorCode; static_assert_64bit(sizeof(SignalErrorCode) == 4); static_assert_64bit(alignof(SignalErrorCode) == 4); @@ -3633,6 +3765,13 @@ enum SignalSvr2CredentialsResult { typedef uint8_t SignalSvr2CredentialsResult; static_assert_64bit(sizeof(SignalSvr2CredentialsResult) == 1); static_assert_64bit(alignof(SignalSvr2CredentialsResult) == 1); +typedef enum { + SignalBadgeVisibilityFfiArgDoNotSet, + SignalBadgeVisibilityFfiArgSetVisible, + SignalBadgeVisibilityFfiArgSetPrimary, +} SignalBadgeVisibilityFfiArg; +static_assert_64bit(sizeof(SignalBadgeVisibilityFfiArg) == 4); +static_assert_64bit(alignof(SignalBadgeVisibilityFfiArg) == 4); typedef enum { SignalBridgeMfaVerificationCredentialFfiArgTotp, SignalBridgeMfaVerificationCredentialFfiArgWebAuthn, @@ -3915,6 +4054,13 @@ SignalFfiError* signal_authenticated_chat_connection_connect( bool receive_stories, SignalBorrowedBytestringArray languages ); +SignalFfiError* signal_authenticated_chat_connection_create_donation_permits( + SignalCPromiseOwnedBufferOfMaxAlignedOwnedBuffer* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + SignalBorrowedBuffer request_context, + SignalConstPointerServerPublicParams server_params +); SignalFfiError* signal_authenticated_chat_connection_delete_account( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3960,6 +4106,11 @@ SignalFfiError* signal_authenticated_chat_connection_generate_totp_key( SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat ); +SignalFfiError* signal_authenticated_chat_connection_get_capabilities( + SignalCPromiseOwnedBufferOfMaxAlignedDeviceCapabilityInternalFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); SignalFfiError* signal_authenticated_chat_connection_get_currency_conversions( SignalCPromiseCurrencyConversionsInternalFfiResult* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -3970,6 +4121,11 @@ SignalFfiError* signal_authenticated_chat_connection_get_devices( SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat ); +SignalFfiError* signal_authenticated_chat_connection_get_entitlements( + SignalCPromiseAccountEntitlementsFfiResult* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat +); SignalFfiError* signal_authenticated_chat_connection_get_pre_key_count( SignalCPromiseBridgePreKeyCountsFfiResult* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -4012,6 +4168,13 @@ SignalFfiError* signal_authenticated_chat_connection_redeem_backup_receipt( SignalConstPointerAuthenticatedChatConnection chat, const SignalType_FixedArray329_uint8_t* presentation ); +SignalFfiError* signal_authenticated_chat_connection_redeem_donation_receipt( + SignalCPromisebool* promise, + SignalConstPointerTokioAsyncContext async_runtime, + SignalConstPointerAuthenticatedChatConnection chat, + const SignalType_FixedArray329_uint8_t* presentation, + SignalBadgeVisibilityFfiArg visibility +); SignalFfiError* signal_authenticated_chat_connection_remove_device( SignalCPromisebool* promise, SignalConstPointerTokioAsyncContext async_runtime, @@ -4859,6 +5022,7 @@ SignalFfiError* signal_expiring_profile_key_credential_get_expiration_time( SignalFfiError* signal_expiring_profile_key_credential_response_check_valid_contents( SignalBorrowedBuffer buffer ); +void signal_ffi_version_0_106_1(void); SignalFfiError* signal_fingerprint_clone( SignalMutPointerFingerprint* new_obj, SignalConstPointerFingerprint obj diff --git a/pkg/libsignalgo/signalversion/version.go b/pkg/libsignalgo/signalversion/version.go index b935b64..367a3d5 100644 --- a/pkg/libsignalgo/signalversion/version.go +++ b/pkg/libsignalgo/signalversion/version.go @@ -2,4 +2,4 @@ package signalversion -const Version = "v0.105.0" +const Version = "v0.106.1" diff --git a/pkg/libsignalgo/update-ffi-docker.sh b/pkg/libsignalgo/update-ffi-docker.sh index 73f8947..e15e7f6 100755 --- a/pkg/libsignalgo/update-ffi-docker.sh +++ b/pkg/libsignalgo/update-ffi-docker.sh @@ -1,9 +1,3 @@ #!/bin/bash docker run --rm -itv $(pwd):/data rust:1-alpine /data/update-ffi-docker-inner.sh - -echo "// Generated by update-ffi.sh; DO NOT EDIT." > signalversion/version.go -echo >> signalversion/version.go -echo "package signalversion" >> signalversion/version.go -echo >> signalversion/version.go -cd libsignal -echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go +./update-ffi-version.sh diff --git a/pkg/libsignalgo/update-ffi-version.sh b/pkg/libsignalgo/update-ffi-version.sh new file mode 100755 index 0000000..23ae12c --- /dev/null +++ b/pkg/libsignalgo/update-ffi-version.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +pushd libsignal + +LIBSIGNAL_TAG=$(git describe --tags --always) +LIBSIGNAL_VERSION_FUNC=$(echo $LIBSIGNAL_TAG | tr -d 'v' | sed 's/\./_/g') + +popd + +cat > signalversion/version.go < version.go < signalversion/version.go -echo >> signalversion/version.go -echo "package signalversion" >> signalversion/version.go -echo >> signalversion/version.go - # Store the current working directory ORIGINAL_DIR="$(pwd)" # Navigate to libsignal directory cd "$LIBSIGNAL_DIRECTORY" -echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go - # Build libsignal cargo build -p libsignal-ffi --release @@ -35,4 +28,6 @@ cd "$ORIGINAL_DIR" cp "${LIBSIGNAL_DIRECTORY}/target/release/libsignal_ffi.a" . cp "${LIBSIGNAL_DIRECTORY}/swift/Sources/SignalFfi/signal_ffi.h" libsignal-ffi.h +./update-ffi-version.sh + echo "Files copied successfully." diff --git a/pkg/libsignalgo/version.go b/pkg/libsignalgo/version.go new file mode 100644 index 0000000..b5732cb --- /dev/null +++ b/pkg/libsignalgo/version.go @@ -0,0 +1,13 @@ +// Generated by update-ffi.sh; DO NOT EDIT. + +package libsignalgo + +/* +#include "./libsignal-ffi.h" +*/ +import "C" + +func init() { + // Compile time check to ensure the libsignal version matches + C.signal_ffi_version_0_106_1() +} From 020738bc24e414343eac0851c2cd5ec97f2ecb38 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 31 Oct 2026 20:11:58 +0200 Subject: [PATCH 59/84] changelog: update --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ba2ca..4e00a62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# v26.11 (unreleased) + +* Updated libsignal to v0.106.1. +* Added support for sending more than 2048 characters of text to Signal by + uploading the rest of the text as an attachment, like official clients do. +* Added automatic retrying of group message sends if the server returns a 500 + or 503 error. +* Added support for encrypting direct media with FLOE ([MSC4571]). +* Fixed memory leak in libsignal store implementation. + +[MSC4571]: https://github.com/matrix-org/matrix-spec-proposals/pull/4571 + # v26.10 * Updated libsignal to v0.105.0. From b0346e66988e34efaa125bc64abb960a82e3ef10 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Tue, 3 Nov 2026 21:36:55 +0000 Subject: [PATCH 60/84] pre-commit: add bridgelint hook (#701) --- .pre-commit-config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9cc6a3..8ea1c20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,9 @@ repos: # TODO: reenable this and fix all the problems - repo: https://github.com/beeper/pre-commit-go - rev: v0.4.2 + rev: v0.5.0 hooks: - id: zerolog-ban-msgf - id: zerolog-use-stringer + - id: bridgelint + verbose: true From e2e994f99f8dfffe5ad1cc88a2d36449639a609e Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Wed, 4 Nov 2026 22:28:39 +0000 Subject: [PATCH 61/84] signalmeow/attachments: send uploadLength when requesting upload form (#703) --- pkg/signalmeow/attachments.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/signalmeow/attachments.go b/pkg/signalmeow/attachments.go index 9bfc1fd..c4317ad 100644 --- a/pkg/signalmeow/attachments.go +++ b/pkg/signalmeow/attachments.go @@ -277,7 +277,7 @@ func (cli *Client) UploadAttachment(ctx context.Context, body []byte) (*signalpb } // Get upload attributes from Signal server - attributesPath := "/v4/attachments/form/upload" + attributesPath := fmt.Sprintf("/v4/attachments/form/upload?uploadLength=%d", len(encryptedWithMAC)) resp, err := cli.AuthedWS.SendRequest(ctx, http.MethodGet, attributesPath, nil, nil) if err != nil { log.Err(err).Msg("Failed to request upload attributes") From 7501c40cba38fafeec636ccae6eb4eb870ea27e3 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 19:17:03 -0500 Subject: [PATCH 62/84] handlesignal: resync group info once for portals synced before reaction overrides (#702) Co-authored-by: Indent --- pkg/connector/groupinfo.go | 3 +++ pkg/connector/handlesignal.go | 5 ++++- pkg/signalid/dbmeta.go | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/connector/groupinfo.go b/pkg/connector/groupinfo.go index 345ba28..cd50964 100644 --- a/pkg/connector/groupinfo.go +++ b/pkg/connector/groupinfo.go @@ -184,9 +184,12 @@ func addMemberToMap(mc map[networkid.UserID]bridgev2.ChatMember, member bridgev2 mc[member.EventSender.Sender] = member } +const currentPortalInfoVersion = 1 + func updatePortalSyncMeta(ctx context.Context, portal *bridgev2.Portal) bool { meta := portal.Metadata.(*signalid.PortalMetadata) meta.LastSync = jsontime.UnixNow() + meta.InfoVersion = currentPortalInfoVersion return true } diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index 3704800..ed2d33e 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -233,13 +233,16 @@ func (evt *Bv2ChatEvent) PreHandle(ctx context.Context, portal *bridgev2.Portal) if !ok || dataMsg.GroupV2 == nil { return } - portalRev := portal.Metadata.(*signalid.PortalMetadata).Revision + portalMeta := portal.Metadata.(*signalid.PortalMetadata) + portalRev := portalMeta.Revision if evt.Info.GroupRevision > portalRev { toRevision := evt.Info.GroupRevision if dataMsg.GetGroupV2().GetGroupChange() != nil { toRevision-- } evt.s.catchUpGroup(ctx, portal, portalRev, toRevision, dataMsg.GetTimestamp()) + } else if portalMeta.InfoVersion < currentPortalInfoVersion && portal.MXID != "" { + evt.s.catchUpGroup(ctx, portal, 0, portalRev, dataMsg.GetTimestamp()) } } diff --git a/pkg/signalid/dbmeta.go b/pkg/signalid/dbmeta.go index 916aec5..0c35c0d 100644 --- a/pkg/signalid/dbmeta.go +++ b/pkg/signalid/dbmeta.go @@ -24,7 +24,8 @@ type PortalMetadata struct { Revision uint32 `json:"revision,omitempty"` ExpirationTimerVersion uint32 `json:"expiration_timer_version,omitempty"` // Lazy resync tracking - LastSync jsontime.Unix `json:"last_sync,omitempty"` + LastSync jsontime.Unix `json:"last_sync,omitempty"` + InfoVersion uint32 `json:"info_version,omitempty"` } type MessageMetadata struct { From a630835d70e59d28b29ee6316da589a27a155ba5 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Thu, 5 Nov 2026 13:09:30 +0000 Subject: [PATCH 63/84] pre-commit: install bridgelint with the CI Go toolchain (#706) --- .github/workflows/go.yml | 1 + .pre-commit-config.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8b988db..df15747 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -30,6 +30,7 @@ jobs: run: | go install golang.org/x/tools/cmd/goimports@latest go install honnef.co/go/tools/cmd/staticcheck@latest + go install github.com/beeper/pre-commit-go/bridgelint@latest export PATH="$HOME/go/bin:$PATH" - name: Run pre-commit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ea1c20..1f1fe9c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,4 +27,5 @@ repos: - id: zerolog-ban-msgf - id: zerolog-use-stringer - id: bridgelint + language: system verbose: true From 34b4187e0796ee399245434e7a2657d97d25cd40 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2026 15:33:19 +0000 Subject: [PATCH 64/84] chatinfo: stop listing contacts after request cancellation (#705) Co-authored-by: Indent --- pkg/connector/chatinfo.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index 4668cd7..dbc524d 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -445,11 +445,15 @@ func (s *SignalClient) GetContactList(ctx context.Context) ([]*bridgev2.ResolveI } resp := make([]*bridgev2.ResolveIdentifierResponse, len(recipients)) for i, recipient := range recipients { - recipientResp := &bridgev2.ResolveIdentifierResponse{ - Chat: s.makeCreateDMResponse(ctx, recipient, nil), + if err = ctx.Err(); err != nil { + return nil, err } + recipientResp := &bridgev2.ResolveIdentifierResponse{} var username string if recipient.ACI != uuid.Nil { + recipientResp.Chat = &bridgev2.CreateChatResponse{ + PortalKey: s.makeDMPortalKey(libsignalgo.NewACIServiceID(recipient.ACI)), + } recipientResp.UserID = signalid.MakeUserID(recipient.ACI) ghost, err := s.Main.Bridge.GetGhostByID(ctx, recipientResp.UserID) if err != nil { @@ -458,7 +462,11 @@ func (s *SignalClient) GetContactList(ctx context.Context) ([]*bridgev2.ResolveI recipientResp.Ghost = ghost username = ghost.Metadata.(*signalid.GhostMetadata).Username } else { - recipientResp.UserID = signalid.MakeUserIDFromServiceID(libsignalgo.NewPNIServiceID(recipient.PNI)) + pniServiceID := libsignalgo.NewPNIServiceID(recipient.PNI) + recipientResp.Chat = &bridgev2.CreateChatResponse{ + PortalKey: s.makeDMPortalKey(pniServiceID), + } + recipientResp.UserID = signalid.MakeUserIDFromServiceID(pniServiceID) } recipientResp.UserInfo, err = s.contactToUserInfo(ctx, recipient, username, false) if err != nil { From c820321548483db3266dd130901123a87c124176 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 17:34:19 +0000 Subject: [PATCH 65/84] signalmeow/websocket: log alerts sent by the server when connecting (#709) Co-authored-by: Indent --- pkg/signalmeow/web/signalwebsocket.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index 7ee54c7..bade56b 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -319,6 +319,11 @@ func (s *SignalWebsocket) connectLoop( } // Succssfully connected + if resp != nil { + if alerts := resp.Header.Values("X-Signal-Alert"); len(alerts) > 0 { + log.Warn().Strs("alerts", alerts).Msg("Signal server sent alerts when opening websocket") + } + } s.pushStatus(ctx, SignalWebsocketConnectionEventConnected, nil) s.ws.Store(ws) retrying = false From c827c97adb25656dfa6a1bcef609607c6fa6f0b4 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 17:41:17 +0000 Subject: [PATCH 66/84] chatinfo: fall back to profile avatar when contact avatar isn't loaded (#710) Co-authored-by: Indent --- pkg/connector/chatinfo.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index dbc524d..669c015 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -125,9 +125,10 @@ func (s *SignalClient) contactToUserInfo(ctx context.Context, contact *types.Rec } name := s.Main.Config.FormatDisplayname(contact, username) ui.Name = &name - if s.Main.Config.UseContactAvatars && contact.ContactAvatar.Hash != "" { + contactAvatarID := networkid.AvatarID("hash:" + contact.ContactAvatar.Hash) + if s.Main.Config.UseContactAvatars && contact.ContactAvatar.Hash != "" && s.canUseContactAvatar(ctx, contact, contactAvatarID) { ui.Avatar = &bridgev2.Avatar{ - ID: networkid.AvatarID("hash:" + contact.ContactAvatar.Hash), + ID: contactAvatarID, Get: func(ctx context.Context) ([]byte, error) { if contact.ContactAvatar.Image == nil { return nil, fmt.Errorf("contact avatar not available") @@ -172,6 +173,20 @@ func (s *SignalClient) contactToUserInfo(ctx context.Context, contact *types.Rec return ui, nil } +func (s *SignalClient) canUseContactAvatar(ctx context.Context, contact *types.Recipient, avatarID networkid.AvatarID) bool { + if contact.ContactAvatar.Image != nil { + return true + } else if contact.ACI == uuid.Nil { + return false + } + ghost, err := s.Main.Bridge.GetExistingGhostByID(ctx, signalid.MakeUserID(contact.ACI)) + if err != nil { + zerolog.Ctx(ctx).Err(err).Msg("Failed to get ghost to check contact avatar") + return true + } + return ghost != nil && ghost.AvatarID == avatarID && ghost.AvatarMXC != "" && ghost.AvatarSet +} + func (s *SignalConnector) ValidateUserID(id networkid.UserID) bool { _, err := signalid.ParseUserIDAsServiceID(id) return err == nil From d451962ba2e88f5888a098d0a29d1d282bfddeb0 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 17:42:33 +0000 Subject: [PATCH 67/84] msgconv: download stickers from their pack when the attachment is gone (#708) Co-authored-by: Indent --- pkg/msgconv/from-signal.go | 50 +++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 251e9dd..0bf2d3b 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -502,6 +502,11 @@ func (mc *MessageConverter) convertAttachmentToMatrix(ctx context.Context, index func (mc *MessageConverter) convertStickerToMatrix(ctx context.Context, sticker *signalpb.DataMessage_Sticker, attMap AttachmentMap) *bridgev2.ConvertedMessagePart { converted, err := mc.reuploadAttachment(ctx, sticker.GetData(), attMap) + hasPack := len(sticker.GetPackId()) == PackIDLength && len(sticker.GetPackKey()) == PackKeyLength && !bytes.Equal(sticker.GetPackId(), zeroPackID) + if err != nil && hasPack && (errors.Is(err, signalmeow.ErrAttachmentNotFound) || errors.Is(err, ErrAttachmentNotInBackup) || errors.Is(err, ErrBackupNotSupported)) { + zerolog.Ctx(ctx).Debug().Err(err).Msg("Sticker attachment is unavailable, downloading it from the sticker pack") + converted, err = mc.reuploadStickerFromPack(ctx, sticker) + } if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to handle sticker") return &bridgev2.ConvertedMessagePart{ @@ -519,7 +524,7 @@ func (mc *MessageConverter) convertStickerToMatrix(ctx context.Context, sticker converted.Content.Info.Height = 200 } converted.Content.Body = sticker.GetEmoji() - if len(sticker.GetPackId()) == PackIDLength && len(sticker.GetPackKey()) == PackKeyLength && !bytes.Equal(sticker.GetPackId(), zeroPackID) { + if hasPack { converted.Content.Info.BridgedSticker = &event.BridgedSticker{ Network: StickerSourceID, ID: strconv.FormatUint(uint64(sticker.GetStickerId()), 10), @@ -532,6 +537,49 @@ func (mc *MessageConverter) convertStickerToMatrix(ctx context.Context, sticker return converted } +func (mc *MessageConverter) reuploadStickerFromPack(ctx context.Context, sticker *signalpb.DataMessage_Sticker) (*bridgev2.ConvertedMessagePart, error) { + att := sticker.GetData() + content := &event.MessageEventContent{ + Body: att.GetFileName(), + Info: &event.FileInfo{ + MimeType: att.GetContentType(), + Width: int(att.GetWidth()), + Height: int(att.GetHeight()), + }, + } + if mc.DirectMedia { + mediaID, err := signalid.DirectMediaSticker{ + PackID: sticker.GetPackId(), + PackKey: sticker.GetPackKey(), + StickerID: sticker.GetStickerId(), + }.AsMediaID() + if err != nil { + return nil, err + } + content.URL, content.File, err = mc.Bridge.GenerateContentURI(ctx, getPortal(ctx).MXID, mediaID) + if err != nil { + return nil, err + } + } else { + data, err := signalmeow.DownloadStickerPackItem(ctx, sticker.GetPackId(), sticker.GetPackKey(), sticker.GetStickerId()) + if err != nil { + return nil, fmt.Errorf("failed to download sticker from pack: %w", err) + } + if content.Info.MimeType == "" { + content.Info.MimeType = http.DetectContentType(data) + } + content.Info.Size = len(data) + content.URL, content.File, err = getIntent(ctx).UploadMedia(ctx, getPortal(ctx).MXID, data, content.Body, content.Info.MimeType) + if err != nil { + return nil, fmt.Errorf("failed to upload sticker from pack: %w", err) + } + } + return &bridgev2.ConvertedMessagePart{ + Type: event.EventMessage, + Content: content, + }, nil +} + func (mc *MessageConverter) downloadSignalLongText(ctx context.Context, att *signalpb.AttachmentPointer, attMap AttachmentMap) (*string, error) { data, err := mc.downloadAttachment(ctx, att, attMap, nil) if err != nil { From 8cb696dcfcf248a34e1fe6af5510586753485dc6 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:04:39 +0000 Subject: [PATCH 68/84] signalmeow/groups: decode announcements-only flag in full group state (#727) --- pkg/signalmeow/groups.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/signalmeow/groups.go b/pkg/signalmeow/groups.go index 0849f74..411427a 100644 --- a/pkg/signalmeow/groups.go +++ b/pkg/signalmeow/groups.go @@ -497,6 +497,7 @@ func decryptGroup(ctx context.Context, encryptedGroup *signalpb.Group, groupMast // These aren't encrypted decryptedGroup.AvatarPath = encryptedGroup.AvatarUrl decryptedGroup.Revision = encryptedGroup.Version + decryptedGroup.AnnouncementsOnly = encryptedGroup.AnnouncementsOnly // Decrypt members for _, member := range encryptedGroup.Members { From 74b4c70ee4182191333bea0d0432dfa18d79467f Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:16:58 +0000 Subject: [PATCH 69/84] handlesignal: send a notice in DMs when a safety number changes (#723) --- pkg/connector/config.go | 2 ++ pkg/connector/example-config.yaml | 2 ++ pkg/connector/handlesignal.go | 40 ++++++++++++++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/pkg/connector/config.go b/pkg/connector/config.go index 6e9f2e0..9a0d65a 100644 --- a/pkg/connector/config.go +++ b/pkg/connector/config.go @@ -42,6 +42,7 @@ type SignalConfig struct { NoteToSelfAvatar id.ContentURIString `yaml:"note_to_self_avatar"` LocationFormat string `yaml:"location_format"` ExtEvPolls bool `yaml:"extev_polls"` + IdentityChangeNotices bool `yaml:"identity_change_notices"` displaynameTemplate *template.Template `yaml:"-"` } @@ -106,6 +107,7 @@ func upgradeConfig(helper up.Helper) { helper.Copy(up.Str, "note_to_self_avatar") helper.Copy(up.Str, "location_format") helper.Copy(up.Bool, "extev_polls") + helper.Copy(up.Bool, "identity_change_notices") } func (s *SignalConnector) GetConfig() (string, any, up.Upgrader) { diff --git a/pkg/connector/example-config.yaml b/pkg/connector/example-config.yaml index f67fbc8..0a818d1 100644 --- a/pkg/connector/example-config.yaml +++ b/pkg/connector/example-config.yaml @@ -25,3 +25,5 @@ note_to_self_avatar: mxc://maunium.net/REBIVrqjZwmaWpssCZpBlmlL location_format: 'https://www.google.com/maps/place/%[1]s,%[2]s' # Should polls be sent using unstable MSC3381 event types? extev_polls: false +# Should another user's safety number changing send a message to Matrix? +identity_change_notices: false diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index ed2d33e..389f02c 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -75,7 +75,7 @@ func (s *SignalClient) handleSignalEvent(rawEvt events.SignalEvent) bool { case *events.LoggedOut: s.sendLoggedOutState(evt.Error) case *events.IdentityChange: - // TODO send notice + s.handleSignalIdentityChange(evt) default: s.UserLogin.Log.Warn().Type("event_type", evt).Msg("Unrecognized signalmeow event type") } @@ -161,6 +161,44 @@ func convertDecryptionError(_ context.Context, _ *bridgev2.Portal, _ bridgev2.Ma }, nil } +func (s *SignalClient) handleSignalIdentityChange(evt *events.IdentityChange) { + if !s.Main.Config.IdentityChangeNotices || evt.ServiceID.Type != libsignalgo.ServiceIDTypeACI || evt.ServiceID.UUID == s.Client.Store.ACI { + return + } + s.UserLogin.QueueRemoteEvent(&simplevent.Message[*events.IdentityChange]{ + EventMeta: simplevent.EventMeta{ + Type: bridgev2.RemoteEventMessage, + LogContext: func(c zerolog.Context) zerolog.Context { + return c.Stringer("sender_id", evt.ServiceID) + }, + PortalKey: s.makeDMPortalKey(evt.ServiceID), + Sender: s.makeEventSender(evt.ServiceID.UUID), + }, + Data: evt, + ID: "idchange|" + signalid.MakeMessageID(evt.ServiceID.UUID, uint64(time.Now().UnixMilli())), + ConvertMessageFunc: convertIdentityChange, + }) +} + +func convertIdentityChange(ctx context.Context, portal *bridgev2.Portal, _ bridgev2.MatrixAPI, evt *events.IdentityChange) (*bridgev2.ConvertedMessage, error) { + name := evt.ServiceID.UUID.String() + ghost, err := portal.Bridge.GetGhostByID(ctx, signalid.MakeUserID(evt.ServiceID.UUID)) + if err != nil { + return nil, err + } else if ghost.Name != "" { + name = ghost.Name + } + return &bridgev2.ConvertedMessage{ + Parts: []*bridgev2.ConvertedMessagePart{{ + Type: event.EventMessage, + Content: &event.MessageEventContent{ + MsgType: event.MsgNotice, + Body: fmt.Sprintf("Your safety number with %s has changed.", name), + }, + }}, + }, nil +} + type Bv2ChatEvent struct { *events.ChatEvent s *SignalClient From 0a4f1d81c8cf670d550b8dead774c70dde7450d3 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:17:31 +0000 Subject: [PATCH 70/84] signalmeow/web: don't return an error when closing an already closed websocket (#721) --- pkg/signalmeow/web/signalwebsocket.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index bade56b..2ee9ac8 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -22,6 +22,7 @@ import ( "encoding/json" "errors" "fmt" + "net" "net/http" "net/url" "strings" @@ -116,6 +117,9 @@ func (s *SignalWebsocket) Close() (err error) { s.closeCalled.Store(true) if ws := s.ws.Swap(nil); ws != nil { err = ws.Close(websocket.StatusNormalClosure, "") + if errors.Is(err, net.ErrClosed) { + err = nil + } } if cancelLoop := s.cancel.Swap(nil); cancelLoop != nil { (*cancelLoop)() From c6abc27db6490c0c330953d961f400501fba0b41 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:17:39 +0000 Subject: [PATCH 71/84] signalmeow/storageservice: only fetch new records after the first sync (#719) --- pkg/signalmeow/client.go | 2 ++ pkg/signalmeow/storageservice.go | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/pkg/signalmeow/client.go b/pkg/signalmeow/client.go index c8898e3..fad3f8e 100644 --- a/pkg/signalmeow/client.go +++ b/pkg/signalmeow/client.go @@ -72,6 +72,8 @@ type Client struct { storageSyncLock sync.Mutex storageSyncQueued atomic.Bool + storageVersion uint64 + storageRecords []string writeCallbackCounter chan time.Time } diff --git a/pkg/signalmeow/storageservice.go b/pkg/signalmeow/storageservice.go index cfc2951..ea45627 100644 --- a/pkg/signalmeow/storageservice.go +++ b/pkg/signalmeow/storageservice.go @@ -55,18 +55,30 @@ func (cli *Client) StorageSync(ctx context.Context) { cli.storageSyncQueued.Store(false) log := cli.Log.With().Str("action", "sync storage").Logger() ctx = log.WithContext(ctx) - // TODO only fetch changed entries - update, err := cli.FetchStorage(ctx, cli.Store.MasterKey, 0, nil) + update, err := cli.FetchStorage(ctx, cli.Store.MasterKey, cli.storageVersion, cli.storageRecords) if err != nil { log.Err(err).Msg("Failed to fetch storage") return + } else if update == nil { + log.Debug().Uint64("version", cli.storageVersion).Msg("Storage manifest is already up to date") + return } err = cli.Store.DoContactTxn(ctx, func(ctx context.Context) error { return cli.processStorageInTxn(ctx, update) }) if err != nil { log.Err(err).Msg("Failed to process storage update") + return } + log.Debug(). + Uint64("previous_version", cli.storageVersion). + Uint64("version", update.Version). + Int("new_records", len(update.NewRecords)). + Int("removed_records", len(update.RemovedRecords)). + Int("missing_records", len(update.MissingRecords)). + Msg("Processed storage update") + cli.storageVersion = update.Version + cli.storageRecords = update.KnownRecords } func (cli *Client) processStorageInTxn(ctx context.Context, update *StorageUpdate) error { @@ -178,6 +190,7 @@ type StorageUpdate struct { NewRecords []*DecryptedStorageRecord RemovedRecords []string MissingRecords []string + KnownRecords []string } func (cli *Client) FetchStorage(ctx context.Context, masterKey []byte, currentVersion uint64, existingKeys []string) (*StorageUpdate, error) { @@ -189,6 +202,7 @@ func (cli *Client) FetchStorage(ctx context.Context, masterKey []byte, currentVe return nil, nil } removedKeys := make([]string, 0) + knownKeys := make([]string, 0, len(manifest.GetIdentifiers())) newKeys := manifestRecordToMap(manifest.GetIdentifiers()) slices.Sort(existingKeys) existingKeys = slices.Compact(existingKeys) @@ -196,6 +210,7 @@ func (cli *Client) FetchStorage(ctx context.Context, masterKey []byte, currentVe _, isStillThere := newKeys[key] if isStillThere { delete(newKeys, key) + knownKeys = append(knownKeys, key) } else { removedKeys = append(removedKeys, key) } @@ -205,11 +220,15 @@ func (cli *Client) FetchStorage(ctx context.Context, masterKey []byte, currentVe if err != nil { return nil, err } + for _, record := range newRecords { + knownKeys = append(knownKeys, record.StorageID) + } return &StorageUpdate{ Version: manifest.GetVersion(), NewRecords: newRecords, RemovedRecords: removedKeys, MissingRecords: missingKeys, + KnownRecords: knownKeys, }, nil } From 5c740406dbd067dab3ce2b95cea941a96b2b084b Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:17:50 +0000 Subject: [PATCH 72/84] signalmeow: handle server delivery receipts as delivery receipts (#718) --- pkg/signalmeow/receiving.go | 13 +++++++++++++ pkg/signalmeow/receiving_decrypt.go | 3 --- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 1f55b26..e99047d 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -378,6 +378,19 @@ func (cli *Client) incomingAPIMessageHandler(ctx context.Context, req *signalpb. Str("envelope_type", signalpb.Envelope_Type_name[int32(envelope.GetType())]). Msg("Received envelope") + if envelope.GetType() == signalpb.Envelope_SERVER_DELIVERY_RECEIPT { + if sourceServiceID.Type == libsignalgo.ServiceIDTypeACI && sourceServiceID.UUID != uuid.Nil && !cli.handleEvent(&events.Receipt{ + Sender: sourceServiceID.UUID, + Content: &signalpb.ReceiptMessage{ + Type: signalpb.ReceiptMessage_DELIVERY.Enum(), + Timestamp: []uint64{envelope.GetClientTimestamp()}, + }, + }) { + return nil, ErrHandlerFailed + } + return &web.SimpleResponse{Status: 200}, nil + } + result := cli.decryptEnvelope(ctx, envelope, sourceServiceID, destinationServiceID) err = cli.handleDecryptedResult(ctx, result, envelope, destinationServiceID) diff --git a/pkg/signalmeow/receiving_decrypt.go b/pkg/signalmeow/receiving_decrypt.go index e6abff4..8ad3e15 100644 --- a/pkg/signalmeow/receiving_decrypt.go +++ b/pkg/signalmeow/receiving_decrypt.go @@ -107,9 +107,6 @@ func (cli *Client) decryptEnvelope( Unencrypted: true, } - case signalpb.Envelope_SERVER_DELIVERY_RECEIPT: - return DecryptionResult{Err: fmt.Errorf("server delivery receipt envelopes are not yet supported")} - case signalpb.Envelope_UNKNOWN: return DecryptionResult{Err: fmt.Errorf("unknown envelope type")} From cd8bc557d6fe17a2afec00efa48f5a856a9ccd5c Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:17:56 +0000 Subject: [PATCH 73/84] signalmeow/storageservice: ignore record types the bridge doesn't use (#717) --- pkg/signalmeow/storageservice.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/signalmeow/storageservice.go b/pkg/signalmeow/storageservice.go index ea45627..1eb3069 100644 --- a/pkg/signalmeow/storageservice.go +++ b/pkg/signalmeow/storageservice.go @@ -170,7 +170,9 @@ func (cli *Client) processStorageInTxn(ctx context.Context, update *StorageUpdat return fmt.Errorf("failed to save device after receiving account record: %w", err) } log.Debug().Msg("Saved device after receiving account record") - case *signalpb.StorageRecord_GroupV1, *signalpb.StorageRecord_StoryDistributionList: + case *signalpb.StorageRecord_GroupV1, *signalpb.StorageRecord_StoryDistributionList, *signalpb.StorageRecord_StickerPack, + *signalpb.StorageRecord_CallLink, *signalpb.StorageRecord_ChatFolder, *signalpb.StorageRecord_NotificationProfile, + *signalpb.StorageRecord_FavoriteSticker: // irrelevant data default: log.Warn().Type("type", data).Str("item_id", record.StorageID).Msg("Unknown storage record type") From d59791e7d3a070ea4d44e44008fcaa06a5244020 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:18:01 +0000 Subject: [PATCH 74/84] signalmeow: send typing messages as online-only (#716) --- pkg/signalmeow/senderkey.go | 4 ++-- pkg/signalmeow/sending.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/signalmeow/senderkey.go b/pkg/signalmeow/senderkey.go index 2eefadd..322fcc8 100644 --- a/pkg/signalmeow/senderkey.go +++ b/pkg/signalmeow/senderkey.go @@ -221,8 +221,8 @@ func (cli *Client) sendToGroupWithSenderKey( header.Set("Unidentified-Access-Key", xak.String()) } path := fmt.Sprintf( - "/v1/messages/multi_recipient?ts=%d&urgent=%t&online=false", - messageTimestamp, isUrgent(content), + "/v1/messages/multi_recipient?ts=%d&urgent=%t&online=%t", + messageTimestamp, isUrgent(content), content.GetTypingMessage() != nil, ) log.Debug(). Any("recipients", ski.SharedWith). diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index 115b7e5..dce4eea 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -964,7 +964,7 @@ func (cli *Client) sendContent( outgoingMessages := MyMessages{ Timestamp: messageTimestamp, - Online: false, + Online: content.GetTypingMessage() != nil, Urgent: isUrgent(content), Messages: messages, } From fa622888a97e4f8f865300dbf76407ea8397c1d6 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:18:04 +0000 Subject: [PATCH 75/84] client: don't connect logins that are already logged out (#713) --- pkg/connector/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/connector/client.go b/pkg/connector/client.go index e6c5b5e..b5531b5 100644 --- a/pkg/connector/client.go +++ b/pkg/connector/client.go @@ -221,12 +221,18 @@ func (s *SignalClient) Connect(ctx context.Context) { if s.Client == nil { s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Error: "signal-not-logged-in", UserAction: status.UserActionRelogin}) return + } else if !s.Client.IsLoggedIn() { + s.sendLoggedOutState(nil) + return } s.updateRemoteProfile(ctx, false) s.tryConnect(ctx, 0, true) } func (s *SignalClient) ConnectBackground(ctx context.Context, _ *bridgev2.ConnectBackgroundParams) error { + if !s.IsLoggedIn() { + return bridgev2.ErrNotLoggedIn + } s.queueEmptyWaiter.Clear() ch, unauthCh, err := s.Client.StartWebsockets(ctx) if err != nil { From 15674cc755ef6cc446c4418e5fb1c1bd56e96aa9 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:18:13 +0000 Subject: [PATCH 76/84] signalmeow/groupcache: keep send endorsements for group changes without a response (#714) --- pkg/signalmeow/groupcache.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/signalmeow/groupcache.go b/pkg/signalmeow/groupcache.go index ee8259f..7f5d282 100644 --- a/pkg/signalmeow/groupcache.go +++ b/pkg/signalmeow/groupcache.go @@ -203,6 +203,7 @@ func (gc *GroupCache) ApplyUpdate(change *GroupChange, endorsementResponse libsi delete(gc.data, id) return nil } + prevMembers := cached.getMemberServiceIDs() // Pending member adds, promotes and removes cached.PendingMembers = append(cached.PendingMembers, change.AddPendingMembers...) @@ -319,6 +320,12 @@ func (gc *GroupCache) ApplyUpdate(change *GroupChange, endorsementResponse libsi cached.UpdatedAt = time.Now() cached.Revision = change.Revision + if len(endorsementResponse) == 0 { + if !slices.Equal(prevMembers, cached.getMemberServiceIDs()) { + delete(gc.data, id) + } + return nil + } endorsement, memberEndorsements, err := endorsementResponse.ReceiveWithServiceIDs( cached.getMemberServiceIDs(), gc.serviceID, From 27e3fc25829ed091660656a4197a628a0f3544c5 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:18:23 +0000 Subject: [PATCH 77/84] signalmeow/storageservice: fix unnecessarily marking recipients as changed (#712) --- pkg/signalmeow/storageservice.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/signalmeow/storageservice.go b/pkg/signalmeow/storageservice.go index 1eb3069..f3b9aac 100644 --- a/pkg/signalmeow/storageservice.go +++ b/pkg/signalmeow/storageservice.go @@ -113,8 +113,9 @@ func (cli *Client) processStorageInTxn(ctx context.Context, update *StorageUpdat recipient.Profile.Name = strings.TrimSpace(fmt.Sprintf("%s %s", contact.GivenName, contact.FamilyName)) } if contact.SystemGivenName != "" || contact.SystemFamilyName != "" { - changed = true - recipient.ContactName = strings.TrimSpace(fmt.Sprintf("%s %s", contact.SystemGivenName, contact.SystemFamilyName)) + newContactName := strings.TrimSpace(fmt.Sprintf("%s %s", contact.SystemGivenName, contact.SystemFamilyName)) + changed = changed || recipient.ContactName != newContactName + recipient.ContactName = newContactName } newNickname := "" if contact.Nickname != nil { @@ -132,7 +133,7 @@ func (cli *Client) processStorageInTxn(ctx context.Context, update *StorageUpdat changed = true recipient.Blocked = contact.Blocked } - if !ptr.Val(recipient.Whitelisted) { + if !ptr.Val(recipient.Whitelisted) && (recipient.Whitelisted == nil || contact.Whitelisted) { changed = true recipient.Whitelisted = &contact.Whitelisted } From 59a4ff2afc39f5467adff794ec1ac82c491fd178 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Tue, 10 Nov 2026 23:18:34 +0000 Subject: [PATCH 78/84] msgconv/from-signal: send notice when a message is pinned/unpinned (#724) --- pkg/connector/handlesignal.go | 1 + pkg/msgconv/from-signal.go | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index 389f02c..b6e746f 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -223,6 +223,7 @@ func (evt *Bv2ChatEvent) GetType() bridgev2.RemoteEventType { switch { case innerEvt.GetIsViewOnce(), innerEvt.Body != nil, innerEvt.Attachments != nil, innerEvt.Contact != nil, innerEvt.Sticker != nil, innerEvt.Payment != nil, innerEvt.GiftBadge != nil, innerEvt.PollCreate != nil, innerEvt.PollVote != nil, + innerEvt.PinMessage != nil, innerEvt.UnpinMessage != nil, innerEvt.GetRequiredProtocolVersion() > uint32(signalpb.DataMessage_CURRENT), innerEvt.GetFlags()&uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE) != 0: return bridgev2.RemoteEventMessage diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 0bf2d3b..2140db9 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -153,6 +153,12 @@ func (mc *MessageConverter) ToMatrix( cm.Parts = append(cm.Parts, mc.convertPollTerminateToMatrix(ctx, sender, dm.PollTerminate)) return cm } + if dm.PinMessage != nil || dm.UnpinMessage != nil { + var part *bridgev2.ConvertedMessagePart + part, cm.ReplyTo = mc.convertPinToMatrix(dm) + cm.Parts = append(cm.Parts, part) + return cm + } if dm.GetIsViewOnce() { if !mc.Bridge.Config.ViewLimitedMedia && (cm.Disappear.Timer == 0 || cm.Disappear.Timer > 5*time.Minute) { cm.Disappear = database.DisappearingSetting{ @@ -841,6 +847,28 @@ func (mc *MessageConverter) convertPollTerminateToMatrix(ctx context.Context, se } } +func (mc *MessageConverter) convertPinToMatrix(dm *signalpb.DataMessage) (*bridgev2.ConvertedMessagePart, *networkid.MessageOptionalPartID) { + body := "Pinned a message" + targetAuthor, targetTS := dm.GetPinMessage().GetTargetAuthorAciBinary(), dm.GetPinMessage().GetTargetSentTimestamp() + if dm.PinMessage == nil { + body = "Unpinned a message" + targetAuthor, targetTS = dm.GetUnpinMessage().GetTargetAuthorAciBinary(), dm.GetUnpinMessage().GetTargetSentTimestamp() + } + var replyTo *networkid.MessageOptionalPartID + if len(targetAuthor) == 16 { + replyTo = &networkid.MessageOptionalPartID{ + MessageID: signalid.MakeMessageID(uuid.UUID(targetAuthor), targetTS), + } + } + return &bridgev2.ConvertedMessagePart{ + Type: event.EventMessage, + Content: &event.MessageEventContent{ + MsgType: event.MsgNotice, + Body: body, + }, + }, replyTo +} + var invalidPollVote = &bridgev2.ConvertedMessagePart{ Type: event.EventUnstablePollResponse, Content: &event.MessageEventContent{}, From 03c8d29ae7ef6441ce0f5d33822710724cb90d2e Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Wed, 11 Nov 2026 02:36:40 +0000 Subject: [PATCH 79/84] signalmeow/receiving: fetch PNI identity from the primary device when verifying PNI signatures (#720) --- pkg/signalmeow/receiving.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index e99047d..dcc748a 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -922,7 +922,7 @@ func (cli *Client) handlePNISignatureMessage(ctx context.Context, sender libsign Stringer("aci", sender.UUID). Stringer("pni", pni). Msg("Fetching PNI identity for signature verification as it wasn't found in store") - err = cli.FetchAndProcessPreKey(ctx, pniServiceID, 0) + err = cli.FetchAndProcessPreKey(ctx, pniServiceID, 1) if err != nil { return fmt.Errorf("failed to fetch prekey for PNI %s after identity wasn't found in store: %w", pni, err) } else if pniIdentity, err = cli.Store.IdentityKeyStore.GetIdentityKey(ctx, pniServiceID); err != nil { From 561064e8f572908019f16136b129d0187be71e1a Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Wed, 11 Nov 2026 02:36:43 +0000 Subject: [PATCH 80/84] handlematrix: send admin deletes for other members' messages in groups (#722) --- pkg/connector/handlematrix.go | 46 ++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index b384d58..ca7af09 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -302,22 +302,50 @@ func (s *SignalClient) HandleMatrixReactionRemove(ctx context.Context, msg *brid } func (s *SignalClient) HandleMatrixMessageRemove(ctx context.Context, msg *bridgev2.MatrixMessageRemove) error { - _, targetSentTimestamp, err := signalid.ParseMessageID(msg.TargetMessage.ID) + targetAuthorACI, targetSentTimestamp, err := signalid.ParseMessageID(msg.TargetMessage.ID) if err != nil { return fmt.Errorf("failed to parse target message ID: %w", err) - } else if msg.TargetMessage.SenderID != signalid.MakeUserID(s.Client.Store.ACI) { - return errDeleteOthersMessage } - ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) - err = s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(&signalpb.DataMessage{ - Timestamp: proto.Uint64(ts), - Delete: &signalpb.DataMessage_Delete{ + dm := &signalpb.DataMessage{ + Timestamp: proto.Uint64(getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender)), + } + if msg.TargetMessage.SenderID == signalid.MakeUserID(s.Client.Store.ACI) { + dm.Delete = &signalpb.DataMessage_Delete{ TargetSentTimestamp: proto.Uint64(targetSentTimestamp), - }, - })) + } + } else if isAdmin, err := s.isGroupAdmin(ctx, msg.Portal); err != nil { + return wrapSendError(err) + } else if !isAdmin { + return errDeleteOthersMessage + } else { + dm.AdminDelete = &signalpb.DataMessage_AdminDelete{ + TargetAuthorAciBinary: targetAuthorACI[:], + TargetSentTimestamp: proto.Uint64(targetSentTimestamp), + } + } + err = s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(dm)) return wrapSendError(err) } +func (s *SignalClient) isGroupAdmin(ctx context.Context, portal *bridgev2.Portal) (bool, error) { + _, groupID, err := signalid.ParsePortalID(portal.ID) + if err != nil { + return false, err + } else if groupID == "" { + return false, nil + } + group, _, err := s.Client.RetrieveGroupByID(ctx, groupID, portal.Metadata.(*signalid.PortalMetadata).Revision) + if err != nil { + return false, fmt.Errorf("failed to get group info: %w", err) + } + for _, member := range group.Members { + if member.ACI == s.Client.Store.ACI { + return member.Role == signalmeow.GroupMember_ADMINISTRATOR, nil + } + } + return false, nil +} + func (s *SignalClient) HandleMatrixReadReceipt(ctx context.Context, receipt *bridgev2.MatrixReadReceipt) error { if !receipt.ReadUpTo.After(receipt.LastRead) { return nil From a96f214609cbe04426c637845902bc2fa5a0c537 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Wed, 11 Nov 2026 02:36:47 +0000 Subject: [PATCH 81/84] groupinfo,signalmeow: make ended groups read-only (#725) --- pkg/connector/groupinfo.go | 25 ++++++++++++++++++++++++- pkg/signalmeow/groupcache.go | 3 +++ pkg/signalmeow/groups.go | 10 +++++++--- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/pkg/connector/groupinfo.go b/pkg/connector/groupinfo.go index cd50964..fa75743 100644 --- a/pkg/connector/groupinfo.go +++ b/pkg/connector/groupinfo.go @@ -39,6 +39,7 @@ import ( var defaultPL = 0 var moderatorPL = 50 +var terminatedPL = 100 func roleToPL(role signalmeow.GroupMemberRole) *int { switch role { @@ -70,6 +71,21 @@ func applyAttributesAccess(plc *bridgev2.PowerLevelOverrides, attributeAccess si plc.Events[event.StateBeeperDisappearingTimer] = attributePL } +func applyTerminated(plc *bridgev2.PowerLevelOverrides) { + plc.EventsDefault = &terminatedPL + plc.StateDefault = &terminatedPL + plc.Invite = &terminatedPL + plc.Kick = &terminatedPL + plc.Ban = &terminatedPL + plc.Redact = &terminatedPL + for _, evtType := range []event.Type{ + event.EventReaction, event.EventRedaction, event.StatePowerLevels, event.StateRoomName, + event.StateRoomAvatar, event.StateTopic, event.StateBeeperDisappearingTimer, + } { + plc.Events[evtType] = terminatedPL + } +} + func applyMembersAccess(plc *bridgev2.PowerLevelOverrides, memberAccess signalmeow.AccessControl) { if memberAccess == signalmeow.AccessControl_ADMINISTRATOR { plc.Invite = &moderatorPL @@ -125,6 +141,9 @@ func (s *SignalClient) wrapGroupInfo(ctx context.Context, groupInfo *signalmeow. applyMembersAccess(members.PowerLevels, groupInfo.AccessControl.Members) joinRule = inviteLinkToJoinRule(groupInfo.AccessControl.AddFromInviteLink) } + if groupInfo.Terminated { + applyTerminated(members.PowerLevels) + } for _, member := range groupInfo.RequestingMembers { members.MemberMap.Set(bridgev2.ChatMember{ EventSender: s.makeEventSender(member.ACI), @@ -265,7 +284,8 @@ func (s *SignalClient) groupChangeToChatInfoChange(ctx context.Context, groupID var pls *bridgev2.PowerLevelOverrides if groupChange.ModifyAnnouncementsOnly != nil || groupChange.ModifyAttributesAccess != nil || - groupChange.ModifyMemberAccess != nil { + groupChange.ModifyMemberAccess != nil || + groupChange.TerminateGroup { pls = &bridgev2.PowerLevelOverrides{Events: make(map[event.Type]int)} if groupChange.ModifyAnnouncementsOnly != nil { applyAnnouncementsOnly(pls, *groupChange.ModifyAnnouncementsOnly) @@ -276,6 +296,9 @@ func (s *SignalClient) groupChangeToChatInfoChange(ctx context.Context, groupID if groupChange.ModifyMemberAccess != nil { applyMembersAccess(pls, *groupChange.ModifyMemberAccess) } + if groupChange.TerminateGroup { + applyTerminated(pls) + } } if groupChange.ModifyAddFromInviteLinkAccess != nil { ic.ChatInfo.JoinRule = &event.JoinRulesEventContent{ diff --git a/pkg/signalmeow/groupcache.go b/pkg/signalmeow/groupcache.go index 7f5d282..3a676fb 100644 --- a/pkg/signalmeow/groupcache.go +++ b/pkg/signalmeow/groupcache.go @@ -305,6 +305,9 @@ func (gc *GroupCache) ApplyUpdate(change *GroupChange, endorsementResponse libsi if change.ModifyAnnouncementsOnly != nil { cached.AnnouncementsOnly = *change.ModifyAnnouncementsOnly } + if change.TerminateGroup { + cached.Terminated = true + } if change.ModifyDisappearingMessagesDuration != nil { cached.DisappearingMessagesDuration = *change.ModifyDisappearingMessagesDuration } diff --git a/pkg/signalmeow/groups.go b/pkg/signalmeow/groups.go index 411427a..882e048 100644 --- a/pkg/signalmeow/groups.go +++ b/pkg/signalmeow/groups.go @@ -81,6 +81,7 @@ type Group struct { Members []*GroupMember Description string AnnouncementsOnly bool + Terminated bool Revision uint32 DisappearingMessagesDuration uint32 AccessControl *GroupAccessControl @@ -206,6 +207,7 @@ type GroupChange struct { DeleteBannedMembers []*libsignalgo.ServiceID PromotePendingPniAciMembers []*PromotePendingPniAciMember ModifyInviteLinkPassword *types.SerializedInviteLinkPassword + TerminateGroup bool } func (groupChange *GroupChange) isEmpty() bool { @@ -226,7 +228,8 @@ func (groupChange *GroupChange) isEmpty() bool { len(groupChange.PromoteRequestingMembers) == 0 && groupChange.ModifyDescription == nil && groupChange.ModifyAnnouncementsOnly == nil && - len(groupChange.AddBannedMembers) == 0 + len(groupChange.AddBannedMembers) == 0 && + !groupChange.TerminateGroup } func (groupChange *GroupChange) resolveConflict(group *Group) { @@ -497,6 +500,7 @@ func decryptGroup(ctx context.Context, encryptedGroup *signalpb.Group, groupMast // These aren't encrypted decryptedGroup.AvatarPath = encryptedGroup.AvatarUrl decryptedGroup.Revision = encryptedGroup.Version + decryptedGroup.Terminated = encryptedGroup.Terminated decryptedGroup.AnnouncementsOnly = encryptedGroup.AnnouncementsOnly // Decrypt members @@ -1077,6 +1081,7 @@ func (cli *Client) decryptGroupChange(ctx context.Context, encryptedGroupChange if encryptedActions.ModifyAnnouncementsOnly != nil { decryptedGroupChange.ModifyAnnouncementsOnly = &encryptedActions.ModifyAnnouncementsOnly.AnnouncementsOnly } + decryptedGroupChange.TerminateGroup = encryptedActions.TerminateGroup != nil if encryptedActions.ModifyDisappearingMessageTimer != nil && len(encryptedActions.ModifyDisappearingMessageTimer.Timer) > 0 { timerBlob, err := decryptGroupPropertyIntoBlob(groupSecretParams, encryptedActions.ModifyDisappearingMessageTimer.Timer) if err != nil { @@ -1802,8 +1807,7 @@ func (cli *Client) GetGroupHistoryPage(ctx context.Context, gid types.GroupIdent "Cached-Send-Endorsements": "0", }, } - // highest known epoch seems to always be 5, but that may change in the future. includeLastState is always false - path := fmt.Sprintf("/v2/groups/logs/%d?maxSupportedChangeEpoch=%d&includeFirstState=%t&includeLastState=false", fromRevision, 5, includeFirstState) + path := fmt.Sprintf("/v2/groups/logs/%d?maxSupportedChangeEpoch=%d&includeFirstState=%t&includeLastState=false", fromRevision, 7, includeFirstState) response, err := web.SendHTTPRequest(ctx, web.StorageHostname, http.MethodGet, path, opts) defer web.CloseBody(response) if err != nil { From 8761e85a5b57676cfbf292facf30677fbed1c614 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 06:05:53 -0700 Subject: [PATCH 82/84] groupinfo: keep reaction and redaction levels when groups become announcement-only (#728) Co-authored-by: Indent --- pkg/connector/groupinfo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/connector/groupinfo.go b/pkg/connector/groupinfo.go index fa75743..e7c615f 100644 --- a/pkg/connector/groupinfo.go +++ b/pkg/connector/groupinfo.go @@ -58,6 +58,8 @@ func applyAnnouncementsOnly(plc *bridgev2.PowerLevelOverrides, announcementsOnly } else { plc.EventsDefault = &defaultPL } + plc.Events[event.EventReaction] = defaultPL + plc.Events[event.EventRedaction] = defaultPL } func applyAttributesAccess(plc *bridgev2.PowerLevelOverrides, attributeAccess signalmeow.AccessControl) { @@ -128,8 +130,6 @@ func (s *SignalClient) wrapGroupInfo(ctx context.Context, groupInfo *signalmeow. PowerLevels: &bridgev2.PowerLevelOverrides{ Events: map[event.Type]int{ event.StatePowerLevels: moderatorPL, - event.EventReaction: defaultPL, - event.EventRedaction: defaultPL, }, }, ExcludeChangesFromTimeline: true, @@ -203,7 +203,7 @@ func addMemberToMap(mc map[networkid.UserID]bridgev2.ChatMember, member bridgev2 mc[member.EventSender.Sender] = member } -const currentPortalInfoVersion = 1 +const currentPortalInfoVersion = 2 func updatePortalSyncMeta(ctx context.Context, portal *bridgev2.Portal) bool { meta := portal.Metadata.(*signalid.PortalMetadata) From b91e5655053f96d452d0203009b3d8605f357dc7 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 06:54:17 -0700 Subject: [PATCH 83/84] groupinfo: keep poll vote level when groups become announcement-only (#730) Co-authored-by: Indent --- pkg/connector/groupinfo.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/connector/groupinfo.go b/pkg/connector/groupinfo.go index e7c615f..634d696 100644 --- a/pkg/connector/groupinfo.go +++ b/pkg/connector/groupinfo.go @@ -60,6 +60,7 @@ func applyAnnouncementsOnly(plc *bridgev2.PowerLevelOverrides, announcementsOnly } plc.Events[event.EventReaction] = defaultPL plc.Events[event.EventRedaction] = defaultPL + plc.Events[event.EventUnstablePollResponse] = defaultPL } func applyAttributesAccess(plc *bridgev2.PowerLevelOverrides, attributeAccess signalmeow.AccessControl) { @@ -81,7 +82,7 @@ func applyTerminated(plc *bridgev2.PowerLevelOverrides) { plc.Ban = &terminatedPL plc.Redact = &terminatedPL for _, evtType := range []event.Type{ - event.EventReaction, event.EventRedaction, event.StatePowerLevels, event.StateRoomName, + event.EventReaction, event.EventRedaction, event.EventUnstablePollResponse, event.StatePowerLevels, event.StateRoomName, event.StateRoomAvatar, event.StateTopic, event.StateBeeperDisappearingTimer, } { plc.Events[evtType] = terminatedPL @@ -203,7 +204,7 @@ func addMemberToMap(mc map[networkid.UserID]bridgev2.ChatMember, member bridgev2 mc[member.EventSender.Sender] = member } -const currentPortalInfoVersion = 2 +const currentPortalInfoVersion = 3 func updatePortalSyncMeta(ctx context.Context, portal *bridgev2.Portal) bool { meta := portal.Metadata.(*signalid.PortalMetadata) From 01626c1428f2701d3b6c8f6f737ad343e391bdd9 Mon Sep 17 00:00:00 2001 From: "indent[bot]" <297468268+indent[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 07:34:57 -0700 Subject: [PATCH 84/84] connector: warn when Signal reports the primary device as idle (#715) Co-authored-by: Indent --- pkg/connector/errors.go | 13 +++++++++++++ pkg/signalmeow/web/signalwebsocket.go | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pkg/connector/errors.go b/pkg/connector/errors.go index c06ee17..65b7cb5 100644 --- a/pkg/connector/errors.go +++ b/pkg/connector/errors.go @@ -42,9 +42,22 @@ func init() { "signal-rate-limited": "Rate limited by Signal, reconnecting", "signal-connect-failed": "Failed to connect to Signal, retrying", "signal-connection-failed": "Connection to Signal failed", + "signal-idle-primary-device": "Signal hasn't seen your phone in a long time. The bridge is still connected, " + + "but Signal will unlink it if you don't open Signal on your phone soon.", }) } +var _ status.BridgeStateFiller = (*SignalClient)(nil) + +func (s *SignalClient) FillBridgeState(state status.BridgeState) status.BridgeState { + if state.StateEvent == status.StateConnected && s.Client != nil && s.Client.AuthedWS.PrimaryDeviceIdle() { + state.StateEvent = status.StateTransientDisconnect + state.Error = "signal-idle-primary-device" + state.UserAction = status.UserActionOpenNative + } + return state +} + var ( errEditOthersMessage = bridgev2.WrapErrorInStatus(errors.New("you can only edit your own messages")). WithErrorAsMessage(). diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index 2ee9ac8..641e2f0 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -25,6 +25,7 @@ import ( "net" "net/http" "net/url" + "slices" "strings" "sync" "sync/atomic" @@ -61,6 +62,8 @@ type SignalWebsocket struct { closeCalled atomic.Bool cancel atomic.Pointer[context.CancelFunc] cancelConn atomic.Pointer[context.CancelCauseFunc] + + primaryDeviceIdle atomic.Bool } func NewSignalWebsocket(basicAuth *url.Userinfo) *SignalWebsocket { @@ -109,6 +112,10 @@ func (s *SignalWebsocket) IsConnected() bool { return s.ws.Load() != nil } +func (s *SignalWebsocket) PrimaryDeviceIdle() bool { + return s != nil && s.primaryDeviceIdle.Load() +} + func (s *SignalWebsocket) Close() (err error) { if s == nil { return nil @@ -324,9 +331,15 @@ func (s *SignalWebsocket) connectLoop( // Succssfully connected if resp != nil { - if alerts := resp.Header.Values("X-Signal-Alert"); len(alerts) > 0 { + alerts := resp.Header.Values("X-Signal-Alert") + if len(alerts) > 0 { log.Warn().Strs("alerts", alerts).Msg("Signal server sent alerts when opening websocket") } + s.primaryDeviceIdle.Store(slices.ContainsFunc(alerts, func(value string) bool { + return slices.ContainsFunc(strings.Split(value, ","), func(part string) bool { + return strings.TrimSpace(part) == "idle-primary-device" + }) + })) } s.pushStatus(ctx, SignalWebsocketConnectionEventConnected, nil) s.ws.Store(ws)