Forwarded from MadelineProto | Official Channel (Daniil Gentili)
MadelineProto started as a hobby project, back when I knew nothing about cryptography, telegram's APIs, async or programming standards:
before, MadelineProto was created piece by piece as a single monolothic class composed of multiple traits;
now, MadelineProto is composed of multiple modular APIs that are well-structured, heavily commented, wrappable, extendable in any possible and immaginable way.
I am really happy with how MadelineProto async turned out.
I had an absolute blast working on this update, and implementing async really opened a whole sea of possible innovations and features I can implement in MadelineProto now:
- Automatically asyncify your scripts (w/ php-parser).
- Async file upload by url (1.5gb)
- Get direct download url of any file (1.5gb)
- TON (this is actually going to be a lot of fun)
- group calls (the php-libtgvoip APIs are actually ready, I just need to wrap them in php-libtgvoip)
- video calls (~)
- native calls:
With MadelineProto async, I can finally properly implement native async phone calls in PHP:
this will allow handling phone calls on webhosts!
I already have some code I created a year ago for this backed up in a private gitlab repo :)
- async iterators:
I've been thinking of using AMPHP's async iterator API (after some modding obviously) to create async iterators for easily iterating over the messages of a group, and for doing other operations that would normally require using offsets:
This shouldn't be too hard to implement, and with a proper (maybe separate OOP) API, it's going to be fun to make and use.
-
Previously, MadelineProto's custom API methods (
Soon, I plan to update MadelineProto's docs to only use
The old method name will still be available after that; right now, you can already use both naming conventions for all MadelineProto methods:
However, I recommend you now use the
- ArrayAccess on promises (to be able to do
- An
- Add support for Telegram passport in 2FA and write some wrapper APIs
- Write some simplified APIs for takeout (can be implemented using async iterators)
- #MadelineProtoForNode async and lua async (the second can already be done now, the first is also pretty easy now that async is here :)))))
- DNS over HTTPS everywhere
- Parallelize some methods like the download method, or getPwrChat (upload is already fully parallelized)
- Get sponsor of MTProxies
- Optional max_id and min_id params in methods
- Update to layer 100 (for global group permissions & more)
- #phase1 🇮🇷🇷🇺
You can expect to see the following features in the next relases of MadelineProto.
before, MadelineProto was created piece by piece as a single monolothic class composed of multiple traits;
now, MadelineProto is composed of multiple modular APIs that are well-structured, heavily commented, wrappable, extendable in any possible and immaginable way.
I am really happy with how MadelineProto async turned out.
I had an absolute blast working on this update, and implementing async really opened a whole sea of possible innovations and features I can implement in MadelineProto now:
- Automatically asyncify your scripts (w/ php-parser).
- Async file upload by url (1.5gb)
- Get direct download url of any file (1.5gb)
- TON (this is actually going to be a lot of fun)
- group calls (the php-libtgvoip APIs are actually ready, I just need to wrap them in php-libtgvoip)
- video calls (~)
- native calls:
With MadelineProto async, I can finally properly implement native async phone calls in PHP:
this will allow handling phone calls on webhosts!
I already have some code I created a year ago for this backed up in a private gitlab repo :)
- async iterators:
I've been thinking of using AMPHP's async iterator API (after some modding obviously) to create async iterators for easily iterating over the messages of a group, and for doing other operations that would normally require using offsets:
foreach ($MadelineProto->getMessages('@group') as $message) {
// stuff
}
This shouldn't be too hard to implement, and with a proper (maybe separate OOP) API, it's going to be fun to make and use.
-
snake_case
=> CamelCase
conversion for all API methods:Previously, MadelineProto's custom API methods (
get_info
, download_to_dir
) used snake_case
, which contrasted with the Telegram API methods (sendMessage
), and is against PHP coding standards.Soon, I plan to update MadelineProto's docs to only use
CamelCase
for method names.The old method name will still be available after that; right now, you can already use both naming conventions for all MadelineProto methods:
$MadelineProto->get_pwr_chat('user'); // OK!
$MadelineProto->getPwrChat('user'); // OK!
However, I recommend you now use the
CamelCase
version of methods.- ArrayAccess on promises (to be able to do
yield $method()['result']
instead of (yield $method)['result']
)- An
openChat
method, inspired by tdlib, to enable fetching updates from groups you aren't a member of- Add support for Telegram passport in 2FA and write some wrapper APIs
- Write some simplified APIs for takeout (can be implemented using async iterators)
- #MadelineProtoForNode async and lua async (the second can already be done now, the first is also pretty easy now that async is here :)))))
- DNS over HTTPS everywhere
- Parallelize some methods like the download method, or getPwrChat (upload is already fully parallelized)
- Get sponsor of MTProxies
- Optional max_id and min_id params in methods
- Update to layer 100 (for global group permissions & more)
- #phase1 🇮🇷🇷🇺
You can expect to see the following features in the next relases of MadelineProto.
Forwarded from MadelineProto | Official Channel (Daniil Gentili)
Not related to MadelineProto: I'm also working on a new solution to permanently bypass ISP blocks and stop telegram censorship.
This will probably interest our Russian and Iranian users)
Stay tuned on this channel for updates.
#phase1🇮🇷🇷🇺
This will probably interest our Russian and Iranian users)
Stay tuned on this channel for updates.
#phase1🇮🇷🇷🇺
Forwarded from MadelineProto | Official Channel (Daniil Gentili)
What do you want me to implement first?
Anonymous Poll
15%
Automatic asyncification (for parallelism and maximum speed)
10%
Async file upload by url (1.5gb)
13%
Get direct download url of any file (1.5gb)
9%
TON
5%
Group calls
10%
Video calls
2%
Native calls
3%
#MadelineProtoForNode async | lua async
5%
Layer 100
29%
#phase1 🇮🇷🇷🇺