// // LoginViewModel.swift // Chat // // Created by Sergey Tarasov on 25.07.2022. // import Foundation class LoginViewModel: ObservableObject { let xmppController = XMPPController.shared @Published var login: String = "test11@msg.sharix-app.org" @Published var password: String = "test11_-" var isShowError: String? = nil func didTouchLogIn(_ completion: @escaping (Bool) -> Void) { self.xmppController.setupStream(with: login, password: password) self.xmppController.connect() completion(true) } }