From 3ef2cbe102991e6dbac90efcff309f02406fce52 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 7 Jan 2025 18:32:33 +0200 Subject: [PATCH] push: extract app sandbox flag to global variable --- pkg/connector/push.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/connector/push.go b/pkg/connector/push.go index 46b59beb..8791f085 100644 --- a/pkg/connector/push.go +++ b/pkg/connector/push.go @@ -11,6 +11,8 @@ import ( var _ bridgev2.PushableNetworkAPI = (*TelegramClient)(nil) +var PushAppSandbox = false + func (t *TelegramClient) RegisterPushNotifications(ctx context.Context, pushType bridgev2.PushType, token string) error { meta := t.userLogin.Metadata.(*UserLoginMetadata) if meta.PushEncryptionKey == nil { @@ -35,7 +37,7 @@ func (t *TelegramClient) RegisterPushNotifications(ctx context.Context, pushType NoMuted: false, TokenType: tokenType, Token: token, - AppSandbox: false, + AppSandbox: PushAppSandbox, Secret: meta.PushEncryptionKey, OtherUIDs: nil, // TODO set properly })