From b3d3fd3462e3090ca2a0d28bf215e035e8fb5135 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 24 Apr 2021 14:49:53 +0000 Subject: [PATCH] Update content of files --- .../passport/sdk-ios-mac.html | 246 ------------------ data/telegram.org/blog/edit.html | 245 ----------------- 2 files changed, 491 deletions(-) delete mode 100644 data/core.telegram.org/passport/sdk-ios-mac.html delete mode 100644 data/telegram.org/blog/edit.html diff --git a/data/core.telegram.org/passport/sdk-ios-mac.html b/data/core.telegram.org/passport/sdk-ios-mac.html deleted file mode 100644 index 05aa14d5ed..0000000000 --- a/data/core.telegram.org/passport/sdk-ios-mac.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - iOS & macOS SDK - - - - - - - - - - - - - -
- -
-
-
- -

iOS & macOS SDK

- -
- -

TGPassportKit helps you easily integrate Telegram Passport requests into your iOS & macOS apps. Check out our GitHub repository to see samples using this SDK.

-

Installation

-

Installing using Cocoapods

-

To install TGPassportKit via Cocoapods add the following to your Podfile:

-
target 'MyApp' do
-  pod 'TGPassportKit' 
-end
-

then run pod install in your project root directory.

-

Installing using Carthage

-

Add the following line to your Cartfile:

-
github "telegrammessenger/TGPassportKit"
-

then run carthage update, and you will get the latest version of TGPassportKit in your Carthage folder.

-

Project Setup

-

Configure Your Info.plist

-

Configure your Info.plist by right-clicking it in Project Navigator, choosing Open As > Source Code and adding this snippet: -Replace {bot_id} with your value

-
<key>CFBundleURLTypes</key>
-<array>
-  <dict>
-  <key>CFBundleURLSchemes</key>
-  <array>
-    <string>tgbot{bot_id}</string>
-  </array>
-  </dict>
-</array>
-<key>LSApplicationQueriesSchemes</key>
-<array>
-  <string>tg</string>
-</array>
-

Connect AppDelegate methods

-

Add this code to your UIApplicationDelegate implementation

-
#import <TGPassportKit/TGPAppDelegate.h>
-
-- (BOOL)application:(UIApplication *)application
-            openURL:(NSURL *)url
-            options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
-    BOOL handledByPassportKit = [[TGPAppDelegate sharedDelegate] application:application
-                                                                     openURL:url
-                                                                     options:options];
-
-    return YES;
-}
-

If you support iOS 9 and below, also add this method:

-
- (BOOL)application:(UIApplication *)application 
-            openURL:(NSURL *)url 
-  sourceApplication:(nullable NSString *)sourceApplication 
-         annotation:(id)annotation {
-    BOOL handledByPassportKit = [[TGPAppDelegate sharedDelegate] application:application
-                                                                     openURL:url
-                                                           sourceApplication:sourceApplication
-                                                                  annotation:annotation];
-
-    return YES;
-}
-

Usage

-

Add Telegram Passport Button

-

To add the Telegram Passport button, add the following code to your view controller: -Replace {bot_id}, {bot_public_key} and {request_nonce} with your values

-
#import <TGPassportKit/TGPButton.h>
-
-@interface ViewController <TGPButtonDelegate>
-
-@end
-
-@implementation ViewController
-
-- (void)viewDidLoad {
-  [super viewDidLoad];
-
-  TGPButton *button = [[TGPButton alloc] init];
-  button.botConfig = [[TGPBotConfig alloc] initWithBotId:{bot_id} 
-                                               publicKey:@"{bot_public_key}"];
-  button.scope = [[TGPScope alloc] initWithJSONString:@"{\"data\":[\"id_document\",\"address_document\",\"phone_number\"],\"v\":1}"];
-// You can also construct a scope using provided data type classes like this: 
-// button.scope = [[TGPScope alloc] initWithTypes:@[[[TGPPersonalDetails alloc] init], [[TGPIdentityDocument alloc] initWithType:TGPIdentityDocumentTypePassport selfie:true translation:true]]];
-  button.nonce = @"{request_nonce}";
-  button.delegate = self;
-  [self.view addSubview:button];
-}
-
-- (void)passportButton:(TGPButton *)passportButton 
- didCompleteWithResult:(TGPRequestResult)result 
-                 error:(NSError *)error {
-    switch (result) {
-        case TGPRequestResultSucceed:
-            NSLog(@"Succeed");
-            break;
-
-        case TGPRequestResultCancelled:
-            NSLog(@"Cancelled");
-            break;
-
-        default:
-            NSLog(@"Failed");
-            break;
-    }
-}
-
-@end
-

...or Implement Your Own Behavior

-

If you want to design a custom UI and behavior, you can invoke a Passport request like this: -Replace {bot_id}, {bot_public_key} and {request_nonce} with your values

-
#import <TGPassportKit/TGPRequest.h>
-
-- (void)performPassportRequest 
-{
-    TGPBotConfig *botConfig = [[TGPBotConfig alloc] initWithBotId:{bot_id} 
-                                                        publicKey:@"{bot_public_key}"];
-    TGPRequest *request = [[TGPRequest alloc] initWithBotConfig:botConfig];
-    [request performWithScope:[[TGPScope alloc] initWithJSONString:@"{\"data\":[\"id_document\",\"phone_number\"],\"v\":1}"] 
-                      payload:@"{request_nonce}" 
-            completionHandler:^(TGPRequestResult result, NSError * _Nullable error) {
-        switch (result) {
-            case TGPRequestResultSucceed:
-                NSLog(@"Succeed");
-                break;
-
-            case TGPRequestResultCancelled:
-                NSLog(@"Cancelled");
-                break;
-
-            default:
-                NSLog(@"Failed");
-                break;
-        }
-    }];
-}
- -
- -
-
- -
- - - - - - - - diff --git a/data/telegram.org/blog/edit.html b/data/telegram.org/blog/edit.html deleted file mode 100644 index 6e2a08505c..0000000000 --- a/data/telegram.org/blog/edit.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - Edit Messages, New Mentions and More - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- -
-
-

Edit Messages, New Mentions and More

- -
- -
- -

Farewell to typos! Starting today, you can edit the text of your messages after sending them. This works across all Telegram chats, including groups and one-on-one conversations.

-
- -

Edit messages

-
- -

Simply tap and hold on a message, then press ‘Edit’. If you're on desktop, press the up arrow button to edit your last message. The messages will display a small ‘edited’ label so that it's easy to tell which were altered.

-

New Mentions

-

Mentioning other people in groups is handy since it sends them a notification about your message even if they muted the group. Starting today, you can mention any members in a group – even if they don't have a username. Just type the @ symbol and select whoever you would like to address. Easy!

-
- -

Mention group members

-
- -

People List

-

Speaking of addressing people, you can now get to your recent chats much faster using the new People list in Search.

-
- -

Recent chats

-
- - -

Bot Attachments

-

We've also made it easier for you to access your favorite inline bots. Simply scroll down the attachment menu – and there they are. The more you use them, the higher they will climb.

-
- -

Bots in attachment menu

-
- -

Naturally, you will only see inline bots in the attachment menu if you used them at least once. Try @youtube, @gif or @imdb if you don't know where to start. Check out this post for more info on how to use inline bots.

-

Interface Improvements

-

We‘ve added quick sharing buttons to forwarded messages from bots, channels, and public groups. Notifications about messages with stickers will now show the relevant emoji so that you’ll know the general idea at first glance.

-
- -

Scroll to bottom

-
- -

Last but not least, if you're on iOS, your app now remembers the scroll position in chats when switching to a different chat and back. And scrolling up in a chat summons a new button that will send you back to the bottom in one tap. This button also displays a handy unread message counter if new ones are waiting for you there.

-

- -

And that's it for today. Stay tuned for more updates coming soon!

-

- -

May 15, 2016
The Telegram Team

-
- -
- - -
- - -
-
-
- - - - - - -