As promised I post the updated UDF when I had the time to finish it. Please don't hesitate to report issues, i have made a few last minute changes that should not interfere but shit usually happens when you don't expect it.
I was doubting for a long while; Would I create a new topic or would I add it to the existing topic?
Two reasons I have chosen to create a new topic for it:
-The programming has been changed so drastically that you cannot incorporate this UDF into your existing projects that are based on the old WINHTTP UDF.
-Not just the fact that this UDF is curl based, but the given examples are demonstrating on many levels how you can apply the Curl UDF (including the mime adoption for media/file posting) and something simple but not obvious: how to get the HTTP response code, also when authentication errors like 401/407 occur.
Because of the file-size of the libcurl DLL's, I cannot incorporate them into the zip archive so you have to download the libcurl library yourself from the libcurl.se site.
As said above, the script also has some optimized (script breaking!) changes regarding the update array that Telegram returned.
I know the earlier editions of the older UDF also used the curl executable, this edition uses libcurl instead: I had to test this on hardware and configuration certified environments, some of them are running specific windows environment that do not allow patching or updating/upgrading and won't be for quite a long time.
It is there where WINHTTP was really shortcoming without patching.
With libcurl, at least you can guarantee your production works out-of-the-box on X86 and X64 editions of windows without letting people to go through all kinds of pain by having to install KB updates or fixes and perhaps not getting any further afterall. New
This version is now communicating with the security standards libcurl supports out of the box (no more unsecured plain text https queries)
Proxy connections are supported (with or without authentication), i have tested with Synology proxy server, mitm proxy software and a service provider proxy.
_getChatmember() has been added
_getChatAdministrators() has been added
_deleteMessage() has been added/altered to work
$TELEGRAM_DEBUG allows enabling two levels of verbosity and logging to an output file to allow you to get debug data
_UserPoll() routine support added -> You can build GUI components to process. Don't expect to build 60fps games, but at least you can interact with the GUI decently. (See adapted test.au3 how this works). Changed
The _MsgDecode() function now returns a 2D array, rather than a 1D array (script breaking!) -> you need to process $msgData[$Record][$Field] instead of $msgData[$Field]
$msgData[$Record][$MESSAGE_ID] is prefixed with a two or three character type indicator: p_, g_, c_, ep_, eg_, ec_ (private, group, channel) (see relaybot.au3 how filtering works) Fixes
Binarycall has been altered: OnAutoit3ExitRegister has been removed. (Caused crash if you added your own onAutoitExitRegister callback function)
__BinaryCall_DoRelease() is called more often to prevent memory hogging and is added to _Telegram_Close() function
The full JSON array is now processed and resulting in this former mentioned 2D array. It saves multiple http queries for the same JSON array buffer if it is large. -> When bot is offline and multiple users were firing all kinds of commands and texts into the chat, group or channel during the bot's absence, Telegram is shoving down the whole history into the bot's throat for processing as soon as it gets online again. The larger the buffered data is, the longer it took to process and redownload before the buffer got released on the telegram server. In some cases I experienced a never-ending loop with the original UDF.
I have added the LGPL license text, however: i did *not* have had any answer from Luca regarding the proposed change so it is not effective currently even though I changed a lot of code.
telegram-udf-curl-autoit-master.zip