diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index bcb8eb3d62..6138ce1437 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -9900,3 +9900,4 @@ Sorry for the inconvenience."; "WebApp.SharePhoneTitle" = "Share Phone Number?"; "WebApp.SharePhoneConfirmation" = "**%@** will know your phone number. This can be useful for integration with other services."; +"WebApp.SharePhoneConfirmationUnblock" = "**%@** will know your phone number. This can be useful for integration with other services.\n\nThe bot will also be unblocked."; diff --git a/submodules/WebUI/Sources/WebAppController.swift b/submodules/WebUI/Sources/WebAppController.swift index 6541cc3de7..90074e202e 100644 --- a/submodules/WebUI/Sources/WebAppController.swift +++ b/submodules/WebUI/Sources/WebAppController.swift @@ -1150,7 +1150,14 @@ public final class WebAppController: ViewController, AttachmentContainable { requiresUnblock = true } - let alertController = textAlertController(context: self.context, updatedPresentationData: controller.updatedPresentationData, title: self.presentationData.strings.WebApp_SharePhoneTitle, text: self.presentationData.strings.WebApp_SharePhoneConfirmation(botName).string, actions: [TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_Cancel, action: { + let text: String + if requiresUnblock { + text = self.presentationData.strings.WebApp_SharePhoneConfirmationUnblock(botName).string + } else { + text = self.presentationData.strings.WebApp_SharePhoneConfirmation(botName).string + } + + let alertController = textAlertController(context: self.context, updatedPresentationData: controller.updatedPresentationData, title: self.presentationData.strings.WebApp_SharePhoneTitle, text: text, actions: [TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_Cancel, action: { sendEvent(false) }), TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: { [weak self] in guard let self, case let .user(user) = accountPeer, let phone = user.phone, !phone.isEmpty else {