daniilgentili | Unsorted

Telegram-канал daniilgentili - Daniil Gentili's news channel

486

Official channel for news regarding @danogentili's projects. Also check out my website: https://daniil.it

Subscribe to a channel

Daniil Gentili's news channel

MadelineProto was updated (8.5.4)!

The server-side issues with newer layers that forced a layer downgrade were fixed, so this release bumps the layer to the newest 211.

This release also re-enables JIT in the docker image, as a problematic commit was reverted in php-src.

New Methods:
- channels.checkSearchPostsFlood
- stories.createAlbum
- stories.updateAlbum
- stories.reorderAlbums
- stories.deleteAlbum
- stories.getAlbums
- stories.getAlbumStories

Changed Methods:
- Added query param to channels.searchPosts
- Added allow_paid_stars param to channels.searchPosts
- Added resell_amount param to payments.updateStarGiftPrice
- Removed resell_stars param from payments.updateStarGiftPrice
- Added albums param to stories.sendStory

New Constructors:
- webPageAttributeStarGiftCollection
- storyAlbum
- stories.albumsNotModified
- stories.albums
- searchPostsFlood

Changed Constructors:
- Added resale_amount param to messageActionStarGiftUnique
- Removed resale_stars param from messageActionStarGiftUnique
- Added stars_my_pending_rating param to userFull
- Added stars_my_pending_rating_date param to userFull
- Added search_flood param to messages.messagesSlice
- Added ton param to inputInvoiceStarGiftResale
- Added albums param to storyItem
- Added resale_ton_only param to starGiftUnique
- Added resell_amount param to starGiftUnique
- Removed resell_stars param from starGiftUnique

Читать полностью…

Daniil Gentili's news channel

Psalm is one of the biggest and most powerful PHP Static analysis tools, featuring exclusive features like security analysis, and in Psalm 6.9, an official, hyperoptimized Docker image was introduced.

Psalm’s docker image uses a custom build of PHP built from scratch with a custom deepbind patch and the jemalloc allocator, running Psalm +30% faster on average than normal PHP (+50% faster if comparing to PHP without opcache installed).

Recently, my deepbind patch was also merged into PHP and will be available to all users (even those not using the Docker image) in PHP 8.5!

To use it right now, on PHP 8.4, simply run:

docker run -v $PWD:/app --rm -it ghcr.io/danog/psalm:latest /composer/vendor/bin/psalm --no-cache


Issues due to missing extensions can be fixed by enabling them in psalm.xml and/or requiring them in composer.json, see here for more info.

Extensions not stubbed by Psalm itself (and thus not available as a psalm config option) may be stubbed using traditional PHP stubs.

Also posted on the blog: https://blog.daniil.it/2025/07/10/official-psalm-docker-image/

Читать полностью…

Daniil Gentili's news channel

Psalm v6 Deep Dive: Copy-on-Write + dynamic task dispatching

Psalm is one of the biggest and most powerful PHP Static analysis tools, featuring exclusive features like security analysis.

In Psalm 6.1, I implemented a major refactoring of multithreaded mode (automatically enabled on Linux/Mac OS) based on amphp/parallel, which greatly reduced analysis speeds!

But why was it so effective? To understand, one must first understand that in the vast majority of PHP multithreaded analysis tools, jobs are distributed statically between threads on startup, which means that towards the end of the analysis, a lot of workers just sit there doing nothing, just waiting for the other workers processing bigger and heavier files to finish.

However, the new multithreaded mode now allows Psalm to dynamically distribute jobs to workers immediately, as soon as they finish processing their current task, reducing idle worker time and maximizing CPU usage, thus reducing the overall runtime!

Implementation wasn't as easy as just plugging in amphp/parallel, because Psalm relies heavily on the copy-on-write semantics of fork(): indeed, Psalm's multithreaded mode was quite fast even before the refactoring because it doesn't have to copy all type information to all workers when spawning them, as when workers are spawned using the fork() syscall, the entire memory is not copied to the forked process.

Instead, it is copied only when a memory page is modified by the forked process, which means that unless workers start modifying large amounts of type information (which usually happens pretty rarely, as most of that data is immutable after Psalm's scan phase), most of the memory is not copied, leading to large performance improvements.

amphp/parallel does not support using fork() to spawn workers out of the box, however I managed to add support using a custom context class (taking care to avoid some edge cases around reused file descriptors, which can cause issues with the event loop).

The maintainer of amphp was kind enough to begin integration of Psalm's fork context inside of parallel itself after I pinged him, which means amphp users will soon be able to make use of Psalm's fork context to improve worker spawning performance with copy-on-write fork() semantics.

This release also adds an additional check to ensure VM overcommitting (the feature which allows copy-on-write optimizations) is enabled in the OS when running Psalm, by ensuring that the vm.overcommit_memory kernel setting is always set to 1.

~~~

This post is the first of a series of technical deep dives into Psalm v6's performance improvements, which will be released over the next weeks, subscribe to @danog_blog to always stay up to date on the latest Psalm news and developments!

Читать полностью…

Daniil Gentili's news channel

The first series of posts I'll be adding here will be some technical deep dives into the performance improvements I've made in Psalm v6, can't wait to share them all with you!

Читать полностью…

Daniil Gentili's news channel

MadelineProto v9 is next!

Regarding MadelineProto: like for Psalm, I also now take support contracts for MadelineProto, which also help with the development of MadelineProto.

Support contracts can cover development of MadelineProto projects (only for projects that respect the Telegram ToS), support for MadelineProto issues and development of additional MadelineProto features.

See here for info, pricing and contact information!

Читать полностью…

Daniil Gentili's news channel

Happy New Year everyone!
Best wishes for a happy and peaceful new year, and lots of fun with MadelineProto :)

I can't wait to show you all I'm cooking for 2025: MadelineProto v9, Psalm v6 and much more! ❤️

Читать полностью…

Daniil Gentili's news channel

MadelineProto was updated!

8.0.0 is the first stable release of MadelineProto v8!

For the full changelog, see the messages on the official MadelineProto channel, starting from here!

Here are the main highlights:
- Amp v3 & revolt (fibers) support!
- A new simplified, stable and object-oriented event handler API based on filters and plugins!
- New sendVideo, sendAudio, sendDocument, etc methods with automatic metadata extraction via ffmpeg.
- A new getDownloadLink method for files up to 4gb!
- A new broadcast API, that can be used to asynchronously broadcast messages to all users of a bot or userbot in the background, automatically fetching all users of the bot!
- A pure PHP async VoIP implementation to make Telegram voice calls even on limited webhosts!
- An official docker image!
- Built-in static analysis of event handler code!
- Major performance and stability improvements!
- Many other new features and UX improvements, see all messages starting from /channel/MadelineProto/591 for more info!

Major parts of the MadelineProto core were split into standalone libraries that can be used without requiring all of MadelineProto:
- https://github.com/danog/AsyncOrm - Async ORM based on AMPHP v3 and fibers.
- https://github.com/danog/telegram-entities - A library to work with Telegram UTF-16 styled text entities.
- https://github.com/danog/tg-file-decoder - A library to work with Telegram bot API file IDs (recently updated).


The next releases will focus on even more features and performance improvements, such as prometheus and grafana statistics, a static TL parser and much, much more!

Cheers!

Читать полностью…

Daniil Gentili's news channel

Ho collaborato alla creazione di una lettera aperta contro Piracy Shield, invito tutti a firmare: https://stop-piracy-shield.it/

Читать полностью…

Daniil Gentili's news channel

Anche i provider DoH/VPN sarebbero obbligati ad applicare i blocchi per operare in italia, poi si vedrà in realtà quanti e quali operatori DoH e VPN si adegueranno, e quanto sarà fattibile l'enforcement per chi non si adegua.

Altro dettaglio curioso, il ban ipv6 è attuato su IPv6 singoli (/128), quando da prassi ogni utenza dovrebbe avere una subnet /48 (2^80 indirizzi), da una parte è ridicolo perché per bannare una piattaforma pirata con una /48 standard significa bannare 2^80 indirizzi, dall'altra attuare blanket ban su intere subnet ipv6 è molto rischioso perché non si sa mai qual'è la distribuzione reale delle sottoreti.


Fun times with the new Italian censorship system :)

Читать полностью…

Daniil Gentili's news channel

Happy New Year everyone, best wishes for a happy and peaceful 2024.

May your new year be full of positive emotions and creative inspiration ❤️❤️❤️

Читать полностью…

Daniil Gentili's news channel

This cake is absolutely delicious 🍰

Читать полностью…

Daniil Gentili's news channel

Aaaand we're on the front-page of hackernews ❤️❤️❤️

Читать полностью…

Daniil Gentili's news channel

As a birthday present for Telegram's 🥳th birthday, MadelineProto now supports VoIP calls again!

Try calling the Magna Luna webradio @magicalcrazypony to hear some cool songs, powered by @MadelineProto!

The new MadelineProto VoIP implementation is written in pure PHP, so it works even on free webhosts!

Check out the new VoIP documentation for more info on how to write your very own Telegram webradio using MadelineProto!

Features (8.0.0-beta131):
- VoIP calls!
- You can now play() audio files of any format, local files, stream URLs or even stream data using AMP streams!
- You can now play() audio files even on webhosts, by pre-converting the files using @libtgvoip_bot!
- Added a downloadToReturnedStream method!
- Updated to layer 161!

New Methods:
- contacts.setBlocked
- stories.activateStealthMode
- stories.sendReaction

Changed Methods:
Added my_stories_from param to contacts.block
Added my_stories_from param to contacts.unblock
Added my_stories_from param to contacts.getBlocked
Added media_areas param to stories.sendStory
Added media_areas param to stories.editStory
Added just_contacts param to stories.getStoryViewsList
Added reactions_first param to stories.getStoryViewsList
Added q param to stories.getStoryViewsList
Added offset param to stories.getStoryViewsList
Removed offset_date param from stories.getStoryViewsList
Removed offset_id param from stories.getStoryViewsList

New Constructors:
- updateStoriesStealthMode
- updateSentStoryReaction
- storiesStealthMode
- mediaAreaCoordinates
- mediaAreaVenue
- inputMediaAreaVenue
- mediaAreaGeoPoint

Changed Constructors:
Added blocked_my_stories_from param to userFull
Added blocked_my_stories_from param to updatePeerBlocked
Added reactions_count param to storyViews
Added media_areas param to storyItem
Added sent_reaction param to storyItem
Added stealth_mode param to stories.allStoriesNotModified
Added stealth_mode param to stories.allStories
Added blocked param to storyView
Added blocked_my_stories_from param to storyView
Added reaction param to storyView
Added reactions_count param to stories.storyViewsList
Added next_offset param to stories.storyViewsList

Fixes:
- Greatly improved performance by deferring all ORM operations!
- CDN fixes!
- Fix connection to the database when a password is accidentally provided but none is needed
- Removed all generator polyfilling code and deprecated generator functions!


As a side note, I'm very happy of how the current VoIP implementation turned out, and it was a lot of fun to write!

Adding native webhost support required me to write a pure PHP OGG OPUS muxer and demuxer, as well as a full reimplementation of the GrVP protocol in pure PHP: doing it in such a high-level language allowed me to easily use amphp's libraries to easily add support for URLs, streams and all audio formats.

I also wrote a PHP FFI wrapper for libopus for this project, I'll probably split it to a separate package along with the OGG muxer/demuxer because it's really useful :)

Читать полностью…

Daniil Gentili's news channel

I fell in love with Telegram Stories, it's basically like having a personal blog like this but it's also immediately accessible by clicking on the user's profile, and you can directly interact with the person that posted the story (and the poster can do the same too, found some really cute kittens in the stories of the people that viewed mine! :333)

Really happy with the social direction of Telegram, it feels more alive and fun than ever!

Читать полностью…

Daniil Gentili's news channel

MadelineProto was updated (8.0.0-beta107)!

Features:
- Add getPeriodicLoops function to get all periodic loops created by Cron attribtues
- Add isReply bound method
- Add exception logging in the browser

Fixes:
- Relax dl.php verification for getDownloadLink
- Made more fixes to photo bot API conversion
- Fix functions.php plugin inclusion

Also here's a more detailed list of the properties and bound methods of the new simple event handler API:

- $message->message: string Content of the message
- $message->fwdInfo: ?ForwardedInfo Info about a forwarded message
- $message->command: ?string Bot command (if present)
- $message->commandType: ?CommandType Bot command type (if present)
- $message->commandArgs: list<string> Bot command arguments (if present)
- $message->protected: bool Whether this message is protected
- $message->matches: list<string> Regex matches, if a filter regex is present
- $message->fromScheduled: bool Whether this message is a sent scheduled message
- $message->viaBotId: ?int If the message was generated by an inline query, ID of the bot that generated it
- $message->editDate: ?int Last edit date of the message
- $message->keyboard: InlineKeyboard|ReplyKeyboard|null Inline or reply keyboard.
- $message->imported: bool Whether this message was imported from a foreign chat service
- $message->psaType: ?string For Public Service Announcement messages, the PSA type
- $message->nextSent: ?self @readonly For sent messages, contains the next message in the chain if the original message had to be split.
- $message->id: int Message ID
- $message->out: bool Whether the message is outgoing
- $message->chatId: int ID of the chat where the message was sent
- $message->senderId: int ID of the sender of the message
- $message->replyToMsgId: ?int ID of the message to which this message is replying
- $message->date: int When was the message sent
- $message->topicId: ?int ID of the forum topic where the message was sent
- $message->threadId: ?int ID of the message thread where the message was sent
- $message->replyToScheduled: bool Whether this is a reply to a scheduled message
- $message->mentioned: bool Whether we were mentioned in this message
- $message->silent: bool Whether this message was sent without any notification (silently)
- $message->ttlPeriod: ?int Time-to-live of the message
- $message->media: Media|null Attached media.
- $message->media->botApiFileId: Bot API file ID of media.
- $message->media->botApiFileUniqueId: Bot API unique file ID of media.
- $message->media->fileName, fileExt, creationDate, size, ...: see the full list of properties by clicking on the documentation for all classes in the \danog\MadelineProto\EventHandler\Media namespace!

Methods:
- $message->getHTML(bool $allowTelegramTags = false): string: Get an HTML version of the message. $allowTelegramTags specifies whether to allow telegram-specific tags like tg-spoiler, tg-emoji, mention links and so on…

- $message->getReply(): ?self: Get replied-to message. May return null if the replied-to message was deleted.
- $message->delete(bool $revoke = true): void: Delete the message. $revoke is true by default, if false it deletes the message on just one side of the chat.
- $message->reply(string $message, ParseMode $parseMode, ...): \danog\MadelineProto\EventHandler\Message: Reply to the message, see the documentation for more info on the parameters!

Also, you can now more easily press inline buttons using the new simple keyboard API:

- $message->keyboard->
press(string $label, bool $waitForResult): Presses the first keyboard button with the specified label.
- $message->keyboard->pressByCoordinates(int $row, int $column, bool $waitForResult)
: Presses button at the specified keyboard coordinates.

In both cases, if $waitForResult is true, waits for a result from the bot before returning.

Читать полностью…

Daniil Gentili's news channel

Also announcing the public beta of Psalm v7!

Psalm v7 brings huge performance improvements to security analysis, up to 10x thanks to a full refactoring of both the internal representation of taints, and optimization of the graph resolution logic.

A major new feature was also added: combined analysis!

Combined analysis, enabled by default in Psalm v7, allows running normal analysis, security analysis and dead code analysis all at the same time, within a single run, greatly reducing overall runtimes!

Future beta releases will also enable taint analysis by default, given that now it can be run alongside normal analysis.

Psalm v7 also brings performance improvements to dead code analysis, and fixes for list types.

Even more performance improvements and new features will be released soon!

Читать полностью…

Daniil Gentili's news channel

Was visited by a small guest today, sat right next to me for about five minutes, blinking with one eye at a time and looking for bugs and at me for a while before flying away ❤️

Читать полностью…

Daniil Gentili's news channel

And then, a long overdue post about my Autonomous System (AS198747), and an over more overdue MadelineProto v9 :D

Читать полностью…

Daniil Gentili's news channel

Happy to announce I've launched a blog, where I'll be posting news about all my different projects, MadelineProto, Psalm, and much more: blog.daniil.it!

I now also have a newsletter, feel free to subscribe to receive all the latest news: blog.daniil.it/newsletter ❤️

All posts posted to my blog and newsletter will also be posted here (replacing the old @daniilgentili blog for technical reasons, as I do not have access to the owner account anymore).

You can now discuss posts news about *all* my projects in the linked discussion group: here!

Читать полностью…

Daniil Gentili's news channel

Super happy to announce the release of Psalm v6!

Also announcing Psalm's new support model: you can support Psalm development by requesting a support contract from me, as I am the only active maintainer of Psalm.

Support contracts can cover full integration of Psalm into existing codebases, support for Psalm issues and development of additional Psalm features.

See here for info, pricing and contact information.

Main highlights of Psalm v6:

- PHP 8.4 support
- Amp v3 support
- PHP-Parser v5 support
- Fully overhauled [dictionaries](https://psalm.dev/docs/contributing/editing_callmaps/), for much more accurate and always up to date signatures for PHP and extension functions and methods, and much simpler PHP version upgrades.
- ignoreInternalFunctionFalseReturn and ignoreInternalFunctionNullReturn are now false by default: this means Psalm now warns when a false/null return type of a native function is not explicitly checked.
- Modernization of the codebase for higher performance.
- Many other bugfixes and performance improvements.

To see the full list of features added to Psalm v6, click here!

Читать полностью…

Daniil Gentili's news channel

MadelineProto was updated!

MadelineProto 8.1.0 introduces an official Grafana dashboard for MadelineProto, powered by danog/better-prometheus!

See here for more info on how to configure the Prometheus metrics endpoint and Grafana dashboard!

Features:
- Official grafana dashboard, powered by danog/better-prometheus!
- Extract bot API dialog ID handling logic into a separate library, danog/tg-dialog-id!
- Add a previously missing $deleteHistory flag to discardSecretChat!
- Add messages.getEmojiStickerGroups method!

Fixes:
- Fix a possible bug in sendVideo
- Fix a possible bug in parseMode parsing
- Fix SecretMessage::delete
- Fix passing of seekable streams to IPC methods
- Other minor bugfixes
- Performance improvements

Читать полностью…

Daniil Gentili's news channel

MadelineProto was updated (8.0.0-beta195)!

This release extracts MadelineProto's async ORM into a separate library, danog/AsyncOrm: a PHP async ORM based on AMPHP v3 and fibers!

danog/AsyncOrm supports MySQL, Redis, Postgres, features read and write-back caching, type-specific optimizations, and much more!

Among other news, the danog/tg-file-decoder library was also updated&modernized.

Also, the downloadRenameBot.php was updated to support downloading videos directly from YouTube (without using the disk!), here's the new repo: https://github.com/danog/downloadRenameBot/

Breaking changes:
- Raise the minimum PHP version to 8.2.17.
- Move all ORM classes to the danog\AsyncOrm namespace
- Remove support for definition of ORM properties using $dbProperties, the new OrmMappedArray attribute should be used instead, see the new docs for more info and examples!
- Modernized and updated danog/tg-file-decoder, switching to enums and readonly properties.
- Use bot API IDs in all constructors returned by MadelineProto.
- Finalize all methods in the event handler.
- Enable strict static analysis for EventHandler.
- Removed the JSON and STRING serializer types from the ORM settings, the correct serializer will now be chosen based on the type of the value specified in OrmKeyedArray.
- Postgres/Redis MadelineProto instances need a manual database migration before upgrading (first updateSettings to the Memory backend, then upgrade, then updateSettings to Postgres/Redis); MySQL and Memory instances will be migrated automatically, no need to do anything.

Features:
- Update to layer 177, see here for the full layer changelog!
- Add support for the stable versions of amphp/mysql, amphp/postgres through https://github.com/danog/AsyncOrm!

Fixes:
- Fix Message::read!
- Multiple other bugfixes and performance improvements!

Читать полностью…

Daniil Gentili's news channel

On a more upbeat note, I'm currently halfway through done working on a PHP AOT compiler (with full support for all of PHP, by re-using the function JIT, adding support for relocations and a custom linker).

Planning to integrate it inside of Psalm to improve performance, removing the overhead of runtime JIT compilation!

Читать полностью…

Daniil Gentili's news channel

Piracy Shield è un Blocco IP/DNS obbligatorio entro 30 minuti fatto dall'ISP, pena multa, senza passare per un giudice, gli indirizzi e nomi da bannare sono inseriti dai detentori del copyright (aka privati senza supervisione giudiziaria)

La legge è stata approvata dietro forte lobbying dei detentori dei diritti, la piattaforma è stata "donata" dalla lega calcio (aka fatta fare da amici, e imposta all'agcom, che poi comunque ha dovuto rifinirla, spendendo 60k)

Sia IPv4 che IPv6 che domini vengono aggiunti tramite ticket sulla piattaforma, gli operatori devono usare l'API JSON per pullare tutti i ticket in un colpo, confrontare col set locale, bannare/sbannare la differenza

Non è previsto un modo per rimuovere un IP bannato, se non nelle prime 24 ore

Il sistema è attivo da oggi

Читать полностью…

Daniil Gentili's news channel

My pure PHP implementation of STUN is ready, the first pre-alpha version of the library is available at https://github.com/danog/stun!

This library is the first step in the creation of a pure PHP implementation of webrtc, specifically to work with Telegram's new WebRTC-based VoIP implementation used in group and video calls, even from shared PHP webhosts :)

Читать полностью…

Daniil Gentili's news channel

I'm very happy to announce the first release of https://github.com/danog/php-tokio: you can now use any async Rust library from PHP!

It's fully integrated with revolt: this allows full compatibility with amphp, PSL and reactphp, and with any Rust library powered by tokio.rs.

Here's an example from the repo, using the async Rust reqwest library to make asynchronous HTTP requests from PHP:

<?php

use Reqwest\Client;

use function Amp\async;
use function Amp\Future\await;

require 'vendor/autoload.php';

Client::init();

function test(int $delay): void {
$url = "https://httpbin.org/delay/$delay";
$t = time();
echo "Making async reqwest to $url that will return after $delay seconds...".PHP_EOL;
Client::get($url);
$t = time() - $t;
echo "Got response from $url after ~".$t." seconds!".PHP_EOL;
};

$futures = [];
$futures []= async(test(...), 5);
$futures []= async(test(...), 5);
$futures []= async(test(...), 5);

await($futures);

I'm really excited for the potential usecases of php-tokio, and its implications for the PHP async ecosystem.

I've created this library because I'm building an async MongoDB client for PHP (https://github.com/Nicelocal/mongo-php-async-driver), and realized that using the official rust mongodb library directly from PHP would be way easier (and faster!) than writing a MongoDB client in pure PHP :)

Читать полностью…

Daniil Gentili's news channel

I'm now the main maintainer of gojekyll, a ~30x faster Go port of Jekyll :)

I fell in love with gojekyll the first time I found it: it's incredibly fast, and it's currently powering the MadelineProto documentation!

When I first found it, the project was kind of abandoned with quite a few missing features: now, it has a lot less bugs, some new features, and most importantly it's much faster than it used to be, mostly thanks to my fork of the blackfriday markdown processor, which uses the golang bfchroma syntax highlighter instead of the extremely slow python pygmentize library :)

I've also created an official docker image for gojekyll, danog/gojekyll!

I'm now also a maintainer of osteele/liquid, the Go port of the Shopify Liquid template engine powering gojekyll.

Читать полностью…

Daniil Gentili's news channel

You can subscribe to my stories and add @danogentili as a contact to receive early updates about my projects ❤️

/channel/danogentili/s/2

Читать полностью…

Daniil Gentili's news channel

MadelineProto supports Telegram Stories in 8.0.0-beta113!

New Methods:
- users.getStoriesMaxIDs
- account.invalidateSignInCodes
- contacts.editCloseFriends
- contacts.toggleStoriesHidden
- channels.clickSponsoredMessage
- stories.sendStory
- stories.editStory
- stories.deleteStories
- stories.togglePinned
- stories.getAllStories
- stories.getUserStories
- stories.getPinnedStories
- stories.getStoriesArchive
- stories.getStoriesByID
- stories.toggleAllStoriesHidden
- stories.getAllReadUserStories
- stories.readStories
- stories.incrementStoryViews
- stories.getStoryViewsList
- stories.getStoriesViews
- stories.exportStoryLink
- stories.report

New Constructors:
- inputMediaStory
- messageMediaStory
- updateStory
- updateReadStories
- updateStoryID
- inputPrivacyKeyAbout
- privacyKeyAbout
- inputPrivacyValueAllowCloseFriends
- privacyValueAllowCloseFriends
- webPageAttributeStory
- messageReplyStoryHeader
- messagePeerVote
- messagePeerVoteInputOption
- messagePeerVoteMultiple
- sponsoredWebPage
- storyViews
- storyItemDeleted
- storyItemSkipped
- storyItem
- userStories
- stories.allStoriesNotModified
- stories.allStories
- stories.stories
- stories.userStories
- storyView
- stories.storyViewsList
- stories.storyViews
- inputReplyToMessage
- inputReplyToStory
- exportedStoryLink

Changed Constructors:
Added close_friend param to user
Added stories_hidden param to user
Added stories_unavailable param to user
Added stories_max_id param to user
Added alt_document param to messageMediaDocument
Added stories_muted param to inputPeerNotifySettings
Added stories_hide_sender param to inputPeerNotifySettings
Added stories_sound param to inputPeerNotifySettings
Added stories_muted param to peerNotifySettings
Added stories_hide_sender param to peerNotifySettings
Added stories_ios_sound param to peerNotifySettings
Added stories_android_sound param to peerNotifySettings
Added stories_other_sound param to peerNotifySettings
Added stories_pinned_available param to userFull
Added stories param to userFull
Added peer param to updateMessagePollVote
Removed user_id param from updateMessagePollVote
Added nosound param to documentAttributeVideo
Added preload_prefix_size param to documentAttributeVideo
Added stories_preload param to autoDownloadSettings
Added small_queue_active_operations_max param to autoDownloadSettings
Added large_queue_active_operations_max param to autoDownloadSettings
Added chats param to messages.votesList
Added keep_archived_unmuted param to globalPrivacySettings
Added keep_archived_folders param to globalPrivacySettings
Added webpage param to sponsoredMessage
Added my param to messagePeerReaction


Click here to start using Telegram Stories in MadelineProto!

Читать полностью…

Daniil Gentili's news channel

Note: to get a download link for bot API file IDs as a bot (files up to 4gb), the file name, size and mime type should also be provided:


<?php

if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->botLogin('token');

$botApiFileId = '...';
$fileName = '...';
$fileSize = 123..;
$mimeType = '...';


$link = $MadelineProto->getDownloadLink($botApiFileId, size: $fileSize, name: $fileName, mime: $mimeType);



Note that you don't have to provide the file size, name and mime type manually if you're using the bound getDownloadInfo() method in the event handler:

class MyEventHandler extends SimpleEventHandler {
/**
* Gets a download link for any file up to 4GB!
*/
#[FilterCommand('dl')]
public function downloadLink(Incoming&Message $message): void
{
if (!$message->replyToMsgId) {
$message->reply("This command must reply to a media message!");
return;
}
$message = $message->getReply();
if (!$message instanceof Message || !$message->media) {
$message->reply("This command must reply to a media message!");
return;
}
$message->reply("Download link: ".$message->media->getDownloadLink());
}
}

Читать полностью…
Subscribe to a channel