mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 09:44:15 +00:00
ios, desktop, android: clearer error message when connecting via removed link (AUTH) (#7268)
* ios, desktop, android: clearer error message when connecting via removed link (AUTH) * Update apps/ios/Shared/Model/SimpleXAPI.swift Co-authored-by: Evgeny <evgeny@poberezkin.com> * android, desktop: use concise AUTH error message to match iOS * update localizations --------- Co-authored-by: Evgeny <evgeny@poberezkin.com>
This commit is contained in:
@@ -1104,8 +1104,8 @@ private func apiConnectResponseAlert<R>(_ r: APIResult<R>) async {
|
||||
)
|
||||
case .errorAgent(.SMP(_, .AUTH)):
|
||||
showAlert(
|
||||
NSLocalizedString("Connection error (AUTH)", comment: ""),
|
||||
message: NSLocalizedString("Unless your contact deleted the connection or this link was already used, it might be a bug - please report it.\nTo connect, please ask your contact to create another connection link and check that you have a stable network connection.", comment: "")
|
||||
NSLocalizedString("Connection link removed", comment: ""),
|
||||
message: NSLocalizedString("Your contact removed this link, or it was a one-time link that was already used.\nTo connect, ask your contact to create a new link.", comment: "")
|
||||
)
|
||||
case let .errorAgent(.SMP(_, .BLOCKED(info))):
|
||||
showAlert(
|
||||
@@ -1164,7 +1164,7 @@ func connErrorText(_ e: ChatError) -> String {
|
||||
case .error(.unsupportedConnReq):
|
||||
NSLocalizedString("Unsupported connection link", comment: "conn error description")
|
||||
case .errorAgent(.SMP(_, .AUTH)):
|
||||
NSLocalizedString("Connection error (AUTH)", comment: "conn error description")
|
||||
NSLocalizedString("Connection link removed", comment: "conn error description")
|
||||
case let .errorAgent(.SMP(_, .BLOCKED(info))):
|
||||
String.localizedStringWithFormat(NSLocalizedString("Connection blocked: %@", comment: "conn error description"), info.reason.text)
|
||||
case .errorAgent(.SMP(_, .QUOTA)):
|
||||
@@ -1507,8 +1507,8 @@ func apiAcceptContactRequest(incognito: Bool, contactReqId: Int64) async -> Cont
|
||||
if case let .result(.acceptingContactRequest(_, contact)) = r { return contact }
|
||||
if case .error(.errorAgent(.SMP(_, .AUTH))) = r {
|
||||
await MainActor.run { showAlert(
|
||||
NSLocalizedString("Connection error (AUTH)", comment: ""),
|
||||
message: NSLocalizedString("Sender may have deleted the connection request.", comment: "")
|
||||
NSLocalizedString("Connection link removed", comment: ""),
|
||||
message: NSLocalizedString("The sender deleted the connection request.", comment: "")
|
||||
) }
|
||||
} else if let r {
|
||||
if let networkErrorAlert = networkErrorAlert(r) {
|
||||
|
||||
Reference in New Issue
Block a user