Cross-platform library for building Telegram clients

Overview

TDLib

TDLib (Telegram Database library) is a cross-platform library for building Telegram clients. It can be easily used from almost any programming language.

Table of Contents

Features

TDLib has many advantages. Notably TDLib is:

  • Cross-platform: TDLib can be used on Android, iOS, Windows, macOS, Linux, FreeBSD, OpenBSD, NetBSD, Windows Phone, WebAssembly, watchOS, tvOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort.
  • Multilanguage: TDLib can be easily used with any programming language that is able to execute C functions. Additionally it already has native Java (using JNI) bindings and .NET (using C++/CLI and C++/CX) bindings.
  • Easy to use: TDLib takes care of all network implementation details, encryption and local data storage.
  • High-performance: in the Telegram Bot API, each TDLib instance handles more than 24000 active bots simultaneously.
  • Well-documented: all TDLib API methods and public interfaces are fully documented.
  • Consistent: TDLib guarantees that all updates are delivered in the right order.
  • Reliable: TDLib remains stable on slow and unreliable Internet connections.
  • Secure: all local data is encrypted using a user-provided encryption key.
  • Fully-asynchronous: requests to TDLib don't block each other or anything else, responses are sent when they are available.

Examples and documentation

See our Getting Started tutorial for a description of basic TDLib concepts.

Take a look at our examples.

See a TDLib build instructions generator for detailed instructions on how to build TDLib.

See description of our JSON, C++, Java and .NET interfaces.

See the td_api.tl scheme or the automatically generated HTML documentation for a list of all available TDLib methods and classes.

Dependencies

TDLib depends on:

  • C++14 compatible compiler (Clang 3.4+, GCC 4.9+, MSVC 19.0+ (Visual Studio 2015+), Intel C++ Compiler 17+)
  • OpenSSL
  • zlib
  • gperf (build only)
  • CMake (3.0.2+, build only)
  • PHP (optional, for documentation generation)

Building

The simplest way to build TDLib is to use our TDLib build instructions generator. You need only to choose your programming language and target operating system to receive complete build instructions.

In general, you need to install all TDLib dependencies as described in Installing dependencies. Then enter directory containing TDLib sources and compile them using CMake:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

To build TDLib on low memory devices you can run SplitSource.php script before compiling main TDLib source code and compile only needed targets:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target prepare_cross_compiling
cd ..
php SplitSource.php
cd build
cmake --build . --target tdjson
cmake --build . --target tdjson_static
cd ..
php SplitSource.php --undo

In our tests clang 6.0 with libc++ required less than 500 MB of RAM per file and GCC 4.9/6.3 used less than 1 GB of RAM per file.

Installing dependencies

macOS

  • Install the latest Xcode command line tools, for example, via xcode-select --install.
  • Install other dependencies, for example, using Homebrew:
brew install gperf cmake openssl
  • Build TDLib with CMake as explained in building. You will likely need to manually specify path to the installed OpenSSL to CMake, e.g.,
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ ..

Windows

  • Download and install Microsoft Visual Studio 2015 or later.
  • Download and install gperf. Add the path to gperf.exe to the PATH environment variable.
  • Install vcpkg.
  • Run the following commands to install TDLib dependencies using vcpkg:
cd 
.\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
  • Download and install CMake; choose "Add CMake to the system PATH" option while installing.
  • Build TDLib with CMake as explained in building, but instead of cmake -DCMAKE_BUILD_TYPE=Release .. use
cmake -DCMAKE_TOOLCHAIN_FILE=/scripts/buildsystems/vcpkg.cmake ..

To build 32-bit/64-bit TDLib using MSVC, you will need to additionally specify parameter -A Win32/-A x64 to CMake. To build TDLib in Release mode using MSVC, you will need to additionally specify parameter --config Release to the cmake --build . command.

Linux

Using in CMake C++ projects

For C++ projects that use CMake, the best approach is to build TDLib as part of your project or to install it system-wide.

There are several libraries that you could use in your CMake project:

  • Td::TdJson, Td::TdJsonStatic — dynamic and static version of a JSON interface. This has a simple C interface, so it can be easily used with any programming language that is able to execute C functions. See td_json_client and td_log documentation for more information.
  • Td::TdStatic — static library with C++ interface for general usage. See Client and Log documentation for more information.
  • Td::TdCoreStatic — static library with low-level C++ interface intended mostly for internal usage. See ClientActor and Log documentation for more information.

For example, part of your CMakeLists.txt may look like this:

add_subdirectory(td)
target_link_libraries(YourTarget PRIVATE Td::TdStatic)

Or you could install TDLib and then reference it in your CMakeLists.txt like this:

find_package(Td 1.7.3 REQUIRED)
target_link_libraries(YourTarget PRIVATE Td::TdStatic)

See example/cpp/CMakeLists.txt.

Using in Java projects

TDLib provides native Java interface through JNI. To enable it, specify option -DTD_ENABLE_JNI=ON to CMake.

See example/java for example of using TDLib from Java and detailed build and usage instructions.

Using in .NET projects

TDLib provides native .NET interface through C++/CLI and C++/CX. To enable it, specify option -DTD_ENABLE_DOTNET=ON to CMake. .NET Core supports C++/CLI only since version 3.1 and only on Windows, so if older .NET Core is used or portability is needed, then TDLib JSON interface should be used through P/Invoke instead.

See example/csharp for example of using TDLib from C# and detailed build and usage instructions. See example/uwp for example of using TDLib from C# UWP application and detailed build and usage instructions for Visual Studio Extension "TDLib for Universal Windows Platform".

When TDLib is built with TD_ENABLE_DOTNET option enabled, C++ documentation is removed from some files. You need to checkout these files to return C++ documentation back:

git checkout td/telegram/Client.h td/telegram/Log.h td/tl/TlObject.h

Using from other programming languages

TDLib provides efficient native C++, Java, and .NET interfaces. But for most use cases we suggest to use the JSON interface, which can be easily used with any programming language that is able to execute C functions. See td_json_client and td_log documentation for detailed JSON interface description, the td_api.tl scheme or the automatically generated HTML documentation for a list of all available TDLib methods and classes.

TDLib JSON interface adheres to semantic versioning and versions with the same major version number are binary and backward compatible, but the underlying TDLib API can be different for different minor and even patch versions. If you need to support different TDLib versions, then you can use a value of the version option to find exact TDLib version to use appropriate API methods.

See example/python/tdjson_example.py for an example of such usage.

License

TDLib is licensed under the terms of the Boost Software License. See LICENSE_1_0.txt for more information.

Comments
  • Connection problems

    Connection problems

    I'm experimenting a lot of connection issue since today 13:30. Basically tdlib client cannot connext to telegram server and the state change between connecting and connected and disconnected continuoilusly Are there some telegram server issue? Or it's my connection problem?

    opened by micheleselea 69
  • Phone number have been banned shortly after entering authentication code

    Phone number have been banned shortly after entering authentication code

    Hi! I have just compilied TDLib with CSharp sample console application. Shortly after I had entered phone number and authorization code my phone number was banned. Now while I am trying to sign in, I just receive code = 400, message = "PHONE_NUMBER_BANNED" It's quite strange because official sample doesn't work with official library

    opened by thunderquack 37
  • UPDATE_APP_TO_LOGIN

    UPDATE_APP_TO_LOGIN

    My app was running very well, until today when I logged out and logged in again I get the message "UPDATE_APP_TO_LOGIN". Should I only update Tdlib?

    opened by Mubo-412 36
  • Flying with emscripten

    Flying with emscripten

    This is a test drive tdsource->tdbin->tdjs Will be supplemented as it proceeds.

    debian 9.3 (amd64)

    download sdk package
    strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX - fantastic (GLIBCXX_3.4.21)
    ./emsdk update
    ./emsdk install latest
    ./emsdk activate latest
    source ./emsdk_env.sh
    git clone https://github.com/tdlib/td.git
    cd td
    mkdir build
    cd build
    emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
    emmake make -j 4
    ...
    52% - in process
    ...
    100% - success
    emmake make -j 4 (test - ok)
    
    If openssl is not found. Try this flags with emcmake cmake.
    (https://packages.debian.org/en/sid/amd64/libssl-dev/filelist)
    -DOPENSSL_INCLUDE_DIR=/usr/include
    -DOPENSSL_SSL_LIBRARY=/usr/lib/x86_64-linux-gnu/libssl.so
    -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/x86_64-linux-gnu/libcrypto.so
    
    emmake make -j 2
    [  1%] Building C object sqlite/CMakeFiles/tdsqlite.dir/sqlite/sqlite3.c.o
    [  2%] Building CXX object tdutils/CMakeFiles/tdutils.dir/td/utils/port/Fd.cpp.o
    In file included from ...td/sqlite/sqlite/sqlite3.c:11465:
    In file included from /usr/include/stdio.h:27:
    /usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found
    #  include <sys/cdefs.h>
    Perhaps it "This is probably caused by trying to build a 32 bit binary on a 64 bit system.
    (https://www.quora.com/How-do-I-fix-fatal-error-sys-cdefs-h-file-not-found-include-sys-cdefs-h)"
    try: apt install gcc-multilib g++-multilib
    just in case. it looks like it needs something else.
    try:
    dpkg --add-architecture i386
    apt update
    apt openssl:i386 libssl-dev:i386
    
    emcmake cmake .....
    emmake make -j 2
    In file included from ...td/sqlite/sqlite/sqlite3.c:11465:
    /usr/include/stdio.h:79:9: error: unknown type name '__gnuc_va_list'
    typedef _G_va_list va_list;
    ...
    In file included from ...td/sqlite/sqlite/sqlite3.c:20258:
    In file included from /usr/include/openssl/rand.h:14:
    In file included from /usr/include/openssl/ossl_typ.h:19:
    /usr/include/openssl/e_os2.h:13:11: fatal error: 'openssl/opensslconf.h' file not found
    # include <openssl/opensslconf.h>
    13 errors generated.
    

    debian 9.3 (i386)

    gcc version 6.3.0 (https://gcc.gnu.org/projects/cxx-status.html#cxx14)
    cmake .. - ok
    ...
    -- Performing Test HAVE_STD14
    -- Performing Test HAVE_STD14 - Success
    ...
    emcmake cmake .. - err
    -- Found ccache
    -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR) 
    -- Performing Test HAVE_STD14
    -- Performing Test HAVE_STD14 - Failed
    -- Performing Test HAVE_STD1Y
    -- Performing Test HAVE_STD1Y - Failed
    CMake Error at CMakeLists.txt:104 (message):
      No C++14 support in the compiler.  Please upgrade the compiler.
    ...
    CMakeLists.txt (comment on these lines to see what awaits us further)
    #if (NOT HAVE_STD14)
    #  message(FATAL_ERROR "No C++14 support in the compiler. Please upgrade the compiler.")
    #endif()
    Oops. emcmake cmake ..
    Looking for pthread_create
    -- Looking for pthread_create - not found
    -- Check if compiler accepts -pthread
    -- Check if compiler accepts -pthread - no
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - not found
    ...
    Generally what is that crap...
    
    I found these lines
    td/telegram/td_emscripten.cpp
    // Just for testing.
    // Will be completly rewritten
    

    [@levlam, @arseny30] Tried to compile via Emscripten? What can you recommend?

    opened by isopen 30
  • Problems while encoding russian symbols

    Problems while encoding russian symbols

    I have built a c++ example for tdlib and tried out to get chats, messages, etc. and there are problems with encoding russian. For example I get this string ╨в╨╡╤Б╤В for "Привет". Please tell how to deal with it

    opened by ghost 29
  • Secret chat and thumbnail

    Secret chat and thumbnail

    I have an issue using thumbnail in secret chat. If I send image without thumbnail all works good, with thumbnail the image is not sent correctly, it seams that thumbnail is displayed by telegram app instead real image and no thumbnail appear in chat. I'm using 1.6.0 tdlib.can you make thumbnail running in your environment? What is the exact purpose of thumbnail in secret chat?

    opened by micheleselea 28
  • About the group to which the supergroup member belongs

    About the group to which the supergroup member belongs

    @levlam I use getSupergroupMembers to get the information of the super group, but how do I determine which super group is returned by the chatMembers? After all, he only has these three return value data "@type": "chatMembers", "total_count": 309, "members": Do I need to judge whether the total_count is consistent? But what if I have two identical groups? It is worth mentioning that the value of members is sometimes empty without any data.

    opened by AquariusHunters 27
  • The new tdjni did not automatically send updates

    The new tdjni did not automatically send updates

    Everything was fine before tdjni.cpp was updated

    There is no log except after fc:

    [ 2][t 4][1606997810.004823207][Td.cpp:4110][#1][!Td]	Close Td in state 0
    [ 4][t 4][1606997810.004904985][Td.cpp:3957][#1][!Td]	Decrease request actor count to 0
    [ 2][t 4][1606997810.004922151][Td.cpp:3959][#1][!Td]	Have no request actors
    [ 4][t 4][1606997810.004939079][Td.cpp:3867][#1][!Td]	Decrease reference count to 0
    [ 2][t 4][1606997810.004952192][Td.cpp:3935][#1][!Td]	ON_CLOSED
    [ 3][t 4][1606997810.005754232][Td.cpp:3850][#1][!Td]	Receive Td::hangup
    [ 2][t 4][1606997810.005800008][Td.cpp:3945][#1][!Td]	Stop Td
    
    opened by nekohasekai 25
  • Unable to download files larger than 1.5GB - TdLib for Android

    Unable to download files larger than 1.5GB - TdLib for Android

    Hey, I tried to download a file above 1.5 GB using the latest version of TdLib for Android, and it failed. Is the TdLib for Android support the new file size limit?

    opened by rben820 25
  • TDlib:{

    TDlib:{"@type":"error","code":429,"message":"Too Many Requests: retry after 86400"}

    When I got this after using TDLib for a while,

    {"@type":"error","code":429,"message":"Too Many Requests: retry after 86400"}

    I wanted to know under what circumstances I would get this reply. When I tested login logout, I couldn't use tdlib again after a while. @levlam

    opened by AquariusHunters 25
  • Seting profile photo ends up with a lack of memory

    Seting profile photo ends up with a lack of memory

    I have got a task: download user photo and set it as my profile photo(now talking about static photo) I am downloading file: code There are no problems with that. But when I handling downloaded photo and trying to set it like my profile photo I am getting lack of memory(Process finished with exit code 134 (interrupted by signal 6: SIGABRT) code Why it is happening?

    opened by HellFinger-s 24
  • use tdlib for join chats

    use tdlib for join chats

    I wanted to know if it is possible to join private and secrets chats? get chat with chat id is not working I get response with status code 400 "chat not found" there is any way that allowing joining to chat by id? i tried addChatMember and joinChat Thanks.

    opened by doronmakela 5
  • performing rollbacks to older version of tdlib commits

    performing rollbacks to older version of tdlib commits

    Hello. We treat new commits in tdlib repo as new versions of tdlib and update our apps accordingly. We were looking at scenarios where we might decide to rollback for whatever reason.

    1. Does tdlib interact with Telegram server in anyway where it persists version of tdlib being used? So if we rolled back. it may not work or cause problems? e.g. does it associate any tdlib data against our api_id and hash?

    Thanks

    opened by dsrana 1
  • Td failed to build with

    Td failed to build with "error MSB8066: Custom build for exited with code -1073741819" with MSVC on Windows arm64ec

    Td failed to build with "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'F:\td\build_arm64ec\CMakeFiles\a954abfa5a46cd96a4b331ea9f6015ae\tl_generate_tlo.rule' exited with code -1073741819." with MSVC on Windows arm64ec. It can reproduce on latest version on master branch. Could you please help look at this issue? Versions and configuration OS: Windows Server 2022 Datacenter VS: Visual Studio 2019(16.11.20) Repro steps:

    1. Open a VS 2019 x64 Native Tools Command Prompt
    2. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=arm64
    3. git clone https://github.com/tdlib/td F:\td
    4. cd f:\vcpkg
    5. bootstrap-vcpkg.bat
    6. vcpkg.exe install --recurse openssl zlib gperf --triplet x64-windows --clean-after-build
    7. cd F:\td
    8. git submodule update --init --recursive
    9. mkdir build_arm64ec && cd build_arm64ec
    10. cmake -G "Visual Studio 16 2019" -A ARM64EC -DCMAKE_SYSTEM_VERSION=10.0.22618.0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=F:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows ..
    11. msbuild /m /p:Platform=ARM64EC /p:Configuration=Release TDLib.sln /t:Rebuild

    Error info: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'F:\td\build_arm64ec\CMakeFiles\a954abfa5a46cd96a4b331ea9f6015ae\tl_generate_tlo.rule' exited with code -1073741819. [F:\td\build_arm64ec\td\generate\tl_generate_tlo.vcxproj]

    Error log: Td_build.log

    opened by YangYang129 7
  • GetBlockedUsers

    GetBlockedUsers

    {"["@type"]":"error","message":"Failed to parse JSON object as TDLib request: Unknown class "getBlockedUsers"","_":"error","code":400}

    opened by babakkhan375 1
  • Sometimes UpdateNewMessage received with empty Capture text in MessegePhoto

    Sometimes UpdateNewMessage received with empty Capture text in MessegePhoto

    Why do i sometimes receive UpdateNewMessage with empty Capture text in MessegePhoto?

    UpdateNewMessage `` 2022-11-01 01:04:19 [TDLib thread] DEBUG r.v.i.t.TelegramClient - > Add new Message to queue:UpdateNewMessage { message = Message { id = 82253447168 senderId = MessageSenderChat { chatId = -1001105313000 } chatId = -1001105313000 sendingState = null schedulingState = null isOutgoing = false isPinned = false canBeEdited = false canBeForwarded = true canBeSaved = true canBeDeletedOnlyForSelf = false canBeDeletedForAllUsers = false canGetAddedReactions = false canGetStatistics = false canGetMessageThread = false canGetViewers = false canGetMediaTimestampLinks = true hasTimestampedMedia = true isChannelPost = true containsUnreadMention = false date = 1667253842 editDate = 0 forwardInfo = null interactionInfo = MessageInteractionInfo { viewCount = 1 forwardCount = 0 replyInfo = null reactions = vector[0] { } } unreadReactions = vector[0] { } replyInChatId = 0 replyToMessageId = 0 messageThreadId = 0 ttl = 0 ttlExpiresIn = 0.000000 viaBotUserId = 0 authorSignature = "" mediaAlbumId = 13338024008747178 restrictionReason = "" content = MessagePhoto { photo = Photo { hasStickers = false minithumbnail = Minithumbnail { width = 40 height = 33 data = bytes [778] { FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 43 00 28 1C 1E 23 1E 19 28 23 21 23 2D 2B 28 30 3C 64 41 3C 37 37 3C 7B 58 5D 49 64 91 80 99 96 8F 80 8C 8A A0 B4 E6 C3 A0 ...} } sizes = vector[3] { PhotoSize { type = "m" photo = File { id = 1535 size = 13125 expectedSize = 13125 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJrY2BGY2PWoiUKRnmKOtAUfi6QSTYAAtvDMRtaoAFL-p-t7AVebbsBAAMCAANtAAMkBA" uniqueId = "AQAD28MxG1qgAUty" isUploadingActive = false isUploadingCompleted = true uploadedSize = 13125 } } width = 320 height = 268 progressiveSizes = vector[0] { } } PhotoSize { type = "y" photo = File { id = 1537 size = 37764 expectedSize = 37764 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJrY2BGY2PWoiUKRnmKOtAUfi6QSTYAAtvDMRtaoAFL-p-t7AVebbsBAAMCAAN5AAMkBA" uniqueId = "AQAD28MxG1qgAUt-" isUploadingActive = false isUploadingCompleted = true uploadedSize = 37764 } } width = 940 height = 788 progressiveSizes = vector[4] { 4772 10728 19662 26158 } } PhotoSize { type = "x" photo = File { id = 1536 size = 44057 expectedSize = 44057 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJrY2BGY2PWoiUKRnmKOtAUfi6QSTYAAtvDMRtaoAFL-p-t7AVebbsBAAMCAAN4AAMkBA" uniqueId = "AQAD28MxG1qgAUt9" isUploadingActive = false isUploadingCompleted = true uploadedSize = 44057 } } width = 800 height = 671 progressiveSizes = vector[0] { } } } } caption = FormattedText { text = "" entities = vector[0] { } } isSecret = false } replyMarkup = null } } ``
    But Chat object have Capture text from last message.
    Chat ``` 2022-11-01 01:04:19 [TDLib thread] DEBUG r.v.i.t.TelegramClient - > Chat info:Chat { id = -1001105313000 type = ChatTypeSupergroup { supergroupId = 1105313000 isChannel = true } title = "УНИАН - новости Украины | война с Россией | новини України | війна з Росією | УНІАН" photo = ChatPhotoInfo { small = File { id = 1443 size = 0 expectedSize = 0 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AQADAgAD2LgxG1mMMUsACAIAAxgzeekW____xo0W63qdHpMkBA" uniqueId = "AQAD2LgxG1mMMUsAAQ" isUploadingActive = false isUploadingCompleted = true uploadedSize = 0 } } big = File { id = 1444 size = 0 expectedSize = 0 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AQADAgAD2LgxG1mMMUsACAMAAxgzeekW____xo0W63qdHpMkBA" uniqueId = "AQAD2LgxG1mMMUsB" isUploadingActive = false isUploadingCompleted = true uploadedSize = 0 } } minithumbnail = Minithumbnail { width = 8 height = 8 data = bytes [641] { FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 43 00 28 1C 1E 23 1E 19 28 23 21 23 2D 2B 28 30 3C 64 41 3C 37 37 3C 7B 58 5D 49 64 91 80 99 96 8F 80 8C 8A A0 B4 E6 C3 A0 ...} } hasAnimation = false } permissions = ChatPermissions { canSendMessages = false canSendMediaMessages = false canSendPolls = false canSendOtherMessages = false canAddWebPagePreviews = false canChangeInfo = false canInviteUsers = false canPinMessages = false } lastMessage = Message { id = 82252398592 senderId = MessageSenderChat { chatId = -1001105313000 } chatId = -1001105313000 sendingState = null schedulingState = null isOutgoing = false isPinned = false canBeEdited = false canBeForwarded = true canBeSaved = true canBeDeletedOnlyForSelf = false canBeDeletedForAllUsers = false canGetAddedReactions = false canGetStatistics = false canGetMessageThread = false canGetViewers = false canGetMediaTimestampLinks = true hasTimestampedMedia = true isChannelPost = true containsUnreadMention = false date = 1667253841 editDate = 0 forwardInfo = null interactionInfo = MessageInteractionInfo { viewCount = 1 forwardCount = 0 replyInfo = null reactions = vector[0] { } } unreadReactions = vector[0] { } replyInChatId = 0 replyToMessageId = 0 messageThreadId = 0 ttl = 0 ttlExpiresIn = 0.000000 viaBotUserId = 0 authorSignature = "" mediaAlbumId = 13338024008747178 restrictionReason = "" content = MessagePhoto { photo = Photo { hasStickers = false minithumbnail = Minithumbnail { width = 40 height = 32 data = bytes [823] { FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 43 00 28 1C 1E 23 1E 19 28 23 21 23 2D 2B 28 30 3C 64 41 3C 37 37 3C 7B 58 5D 49 64 91 80 99 96 8F 80 8C 8A A0 B4 E6 C3 A0 ...} } sizes = vector[3] { PhotoSize { type = "m" photo = File { id = 1532 size = 29705 expectedSize = 29705 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJqY2BGCuSRz6tfnEpN-39ClnE3DaUAAtrDMRtaoAFLas9PN_A9_eQBAAMCAANtAAMkBA" uniqueId = "AQAD2sMxG1qgAUty" isUploadingActive = false isUploadingCompleted = true uploadedSize = 29705 } } width = 320 height = 256 progressiveSizes = vector[0] { } } PhotoSize { type = "x" photo = File { id = 1533 size = 110491 expectedSize = 110491 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJqY2BGCuSRz6tfnEpN-39ClnE3DaUAAtrDMRtaoAFLas9PN_A9_eQBAAMCAAN4AAMkBA" uniqueId = "AQAD2sMxG1qgAUt9" isUploadingActive = false isUploadingCompleted = true uploadedSize = 110491 } } width = 800 height = 640 progressiveSizes = vector[0] { } } PhotoSize { type = "y" photo = File { id = 1534 size = 168518 expectedSize = 168518 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgIAAx0CQeG86AABATJqY2BGCuSRz6tfnEpN-39ClnE3DaUAAtrDMRtaoAFLas9PN_A9_eQBAAMCAAN5AAMkBA" uniqueId = "AQAD2sMxG1qgAUt-" isUploadingActive = false isUploadingCompleted = true uploadedSize = 168518 } } width = 1280 height = 1024 progressiveSizes = vector[4] { 18419 48411 70422 104721 } } } } caption = FormattedText { text = "Не так страшны руснявые ракеты, как оповещения от ГСЧС 😅" entities = vector[1] { TextEntity { offset = 0 length = 54 type = TextEntityTypeBold { } } } } isSecret = false } replyMarkup = null } positions = vector[0] { } messageSenderId = null hasProtectedContent = false isMarkedAsUnread = false isBlocked = false hasScheduledMessages = false canBeDeletedOnlyForSelf = false canBeDeletedForAllUsers = false canBeReported = true defaultDisableNotification = false unreadCount = 2 lastReadInboxMessageId = 82250301440 lastReadOutboxMessageId = 2251799812636672 unreadMentionCount = 0 unreadReactionCount = 0 notificationSettings = ChatNotificationSettings { useDefaultMuteFor = false muteFor = 480235729 useDefaultSound = true soundId = -1 useDefaultShowPreview = false showPreview = true useDefaultDisablePinnedMessageNotifications = true disablePinnedMessageNotifications = false useDefaultDisableMentionNotifications = true disableMentionNotifications = false } availableReactions = vector[8] { "👍" "👎" "❤" "🔥" "👏" "😁" "😱" "😢" } messageTtl = 0 themeName = "" actionBar = null videoChat = VideoChat { groupCallId = 0 hasParticipants = false defaultParticipantId = null } pendingJoinRequests = null replyMarkupMessageId = 0 draftMessage = null clientData = "" } ```

    How can i get text from new received messages?

    opened by igolyudov 3
FreeRDP is a free remote desktop protocol library and clients

FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Enjoy the freedom of using your software wherever you want, the way you want it, in a world where interoperability can finally liberate your computing experience.

null 7.6k Nov 19, 2022
This is a small library that allows to stream a Dear ImGui scene to multiple WebSocket clients at once

imgui-ws Dear ImGui over WebSockets This is a small library that allows to stream a Dear ImGui scene to multiple WebSocket clients at once. This is ac

Georgi Gerganov 313 Nov 24, 2022
Built a client-server application using TCP and UDP sockets, in which the clients can subscribe/unsubscribe to various topics.

Built a client-server application using TCP and UDP sockets, in which the clients can subscribe/unsubscribe to various topics.

null 1 Jun 22, 2022
GNUWeebBot - High-performance bot Telegram, running on Linux environment.

High-performance bot Telegram, running on Linux environment, written in C. Core Features Event Debug Event Logger Modules Telegram debug info.

GNU/Weeb 11 May 8, 2022
An unofficial Qt-based client for Telegram messenger.

Kutegram How to build Symbian^1 (also Symbian^3) Clone this repository with submodules. git clone --recursive https://github.com/kutegram/client.git c

Kutegram 18 Sep 22, 2022
The C++ Network Library Project -- cross-platform, standards compliant networking library.

C++ Network Library Modern C++ network programming libraries. Join us on Slack: http://slack.cpp-netlib.org/ Subscribe to the mailing list: https://gr

C++ Network Library 1.9k Nov 11, 2022
Cross-platform, efficient, customizable, and robust asynchronous HTTP/WebSocket server C++14 library with the right balance between performance and ease of use

What Is RESTinio? RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server. It is based on standalone version of ASIO

Stiffstream 912 Nov 25, 2022
An extensible, cross-platform, single-header C/C++ OpenGL loader library.

Simple OpenGL Loader An extensible, cross-platform, single-header C/C++ OpenGL loader library. Usage For Windows Win32 or Linux X11 applications, the

Tarek Sherif 79 Oct 19, 2022
Brynet - Header Only Cross platform high performance TCP network library using C++ 11.

Brynet Header Only Cross platform high performance TCP network library using C++ 11. Build status Windows : Linux/MacOS : Features Header only Cross p

IronsDu 879 Nov 26, 2022
A cross-platform HTTP client library with a focus on usability and speed

EasyHttp A cross-platform HTTP client library with a focus on usability and speed. Under its hood, EasyHttp uses POCO C++ Libraries and derives many o

Sony 146 Nov 9, 2022
Tiny cross-platform HTTP / HTTPS client library in C.

naett /nɛt:/ Tiny HTTP client library in C. Wraps native HTTP client functionality on macOS, Windows, Linux, iOS and Android in a single, simple non-b

Erik Agsjö 19 Nov 19, 2022
Small and fast cross-platform networking library, with support for messaging, IPv6, HTTP, SSL and WebSocket.

frnetlib Frnetlib, is a cross-platform, small and fast networking library written in C++. There are no library dependencies (unless you want to use SS

Fred Nicolson 22 May 16, 2022
XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.

XQUIC 简体中文文档 README-zh-CN Introduction XQUIC Library released by Alibaba is … … a client and server implementation of QUIC and HTTP/3 as specified by

Alibaba 1.3k Nov 28, 2022
Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.

Wangle C++ networking library Wangle is a library that makes it easy to build protocols, application clients, and application servers. It's like Netty

Facebook 2.9k Nov 23, 2022
C++ framework for building lightweight HTTP interfaces

Pion Network Library C++ framework for building lightweight HTTP interfaces Project Home: https://github.com/rimmartin/pion-ng Documentation Retrievin

null 1 Dec 30, 2020
A Linux reference software for building the Demo Core-Image on Renesas RZ/V2M Evaluation Kit

Introduction This repository is a Linux reference software for building the Demo Core-Image on Renesas RZ/V2M Evaluation Kit . You have to get the pro

Lexra Chang 3 Jan 20, 2022
Building a personal webserver/framework piece by piece

Building a personal webserver/framework piece by piece

E 1 Oct 9, 2022
RakNet is a cross platform, open source, C++ networking engine for game programmers.

RakNet 4.081 Copyright (c) 2014, Oculus VR, Inc. Package notes The Help directory contains index.html, which is full help documentation in HTML format

Facebook Archive 3.1k Nov 19, 2022
LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.

LibVNCServer: A library for easy implementation of a VNC server. Copyright (C) 2001-2003 Johannes E. Schindelin If you already used LibVNCServer, you

null 878 Nov 24, 2022