From 6068c851c142c8d1784ba9bc99cccbf11d0b843b Mon Sep 17 00:00:00 2001
From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
Date: Mon, 31 Mar 2025 11:35:20 -0400
Subject: [PATCH] link account: enable push notifications

Change-Id: I6fff5cd8c3debf266ebe23d2f472aa6946442236
---
 Ring/Ring/Features/Walkthrough/Models/LinkToAccountVM.swift | 5 +++++
 Ring/Ring/Services/AccountsService.swift                    | 1 +
 2 files changed, 6 insertions(+)

diff --git a/Ring/Ring/Features/Walkthrough/Models/LinkToAccountVM.swift b/Ring/Ring/Features/Walkthrough/Models/LinkToAccountVM.swift
index 49af34c84..fe57f9a7a 100644
--- a/Ring/Ring/Features/Walkthrough/Models/LinkToAccountVM.swift
+++ b/Ring/Ring/Features/Walkthrough/Models/LinkToAccountVM.swift
@@ -210,6 +210,11 @@ class LinkToAccountVM: ObservableObject, AvatarViewDataModel {
            let error = AuthError(rawValue: errorString) {
             withAnimation { self.uiState = .error(message: error.message()) }
         } else {
+            // enable push notifications
+            NotificationCenter
+                .default
+                .post(name: NSNotification.Name(rawValue: NotificationName.enablePushNotifications.rawValue),
+                      object: nil)
             withAnimation { self.uiState = .success }
         }
     }
diff --git a/Ring/Ring/Services/AccountsService.swift b/Ring/Ring/Services/AccountsService.swift
index a16bac619..8b3cfde16 100644
--- a/Ring/Ring/Services/AccountsService.swift
+++ b/Ring/Ring/Services/AccountsService.swift
@@ -1155,6 +1155,7 @@ extension AccountsService {
 
     func createTemporaryAccount() async throws -> String {
         var details = try getJamiInitialAccountDetails()
+        details[ConfigKey.proxyEnabled.rawValue] = "true"
         details.updateValue("jami-auth", forKey: ConfigKey.archiveURL.rawValue)
 
         if let testServer = TestEnvironment.shared.nameServerURI {
-- 
GitLab