Telegram Web Link
MadelineProto | Official Channel pinned «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…»
You can subscribe to my stories and add @danogentili as a contact to receive early updates about my projects ❤️

https://www.tg-me.com/danogentili/s/2
MadelineProto was updated (8.0.0-beta115)!

Features:
- You can now get direct download links for or directly download stories, check out the open-source MadelineProto-based @tgstories_dl_bot to download any Telegram story!
- Added support for parse_mode parsing for story methods.
- getReply now simply returns null if the message doesn't reply to any other message.
- getReply now has an optional parameter that can be used to filter the returned message type.
- Added isSelfUser(), isSelfBot() messages to check whether the current user is a user or a bot.
- Improved IDE typehinting.
- CLI bots: you can now optionally specify a default download link URL (used by getDownloadLink) in the settings.
- Added DialogMessagePinned service message with a getPinnedMessage() method.

Fixes:
- Fixed simple filters with service messages.
- Fixed IDE typehinting for getEventHandler.
- Fixed startAndLoopMulti.
- Tweaked the default drop timeout on media DCs to avoid timeout errors on slow networks.
- Now the admin list only contains user report peers.
- Make markdownEscape method accessible.
- Fixed getDownloadLink for non-event-handler web IPC instances.
You can now download any Telegram Story using @tgstories_dl_bot!

Just send it a /dlStory @username command, and it will generate download links for all stories on the user's profile!

@tgstories_dl_bot is powered by @MadelineProto, and it's fully open source!
You can also post stories using MadelineProto, here's a simple example that reposts messages as stories: https://github.com/danog/MadelineProto/blob/v8/examples/bot.php#L164

$media can be an update a message or inputMedia constructor with a URL/file path just like the one accepted by sendMedia!

Another example:

$media = [

'_' => 'inputMediaUploadedPhoto',
'file' => 'faust.jpg'
]
;

$MadelineProto->stories->sendStory(
media: $media,
caption: "This story was posted using [MadelineProto](https://www.tg-me.com/MadelineProto)!",
parse_mode: ParseMode::MARKDOWN,
privacy_rules: [['_' => 'inputPrivacyValueAllowAll']]
);
MadelineProto 8 beta 116 fixes a few issues with updateSettings, getReply and FilterReplyToSelf!
I've released MadelineProto 8 beta 117!

Features:
- Add FilterTextCaseInsensitive filter

Fixes:
- Multiple file-related fixes
MadelineProto | Official Channel
I've released MadelineProto 8 beta 117! Features: - Add FilterTextCaseInsensitive filter Fixes: - Multiple file-related fixes
beta120 includes multiple UX improvements, such as:

- Event handler attribute validation
- Warnings about missing extensions and MadelineProto updates in the login UI

And various fixes:
- Improve renaming using bot API file IDs and sendDocument/sendPhoto
- Improve getReply
- Fix the HTTP/HTTPS/WS/WSS transports
- Various file-related fixes
MadelineProto was updated (8.0.0-beta121)!

Features:
- Added StaticSticker, AnimatedSticker, VideoSticker media classes.

Fixes:
- Fix localization of some error messages
- Make sure the event handler class is in scope before unserializing
- Other various fixes
beta123 adds a FilterFromSender filter (single version of FilterFromSenders), fixes some issues, and disables non-IPC fallback mode, which could have led to long IPC startup times in certain edge conditions.
MadelineProto was updated (8.0.0-beta126)!

Features:
- Add addReaction, delReaction, getOurReactions, pin, unpin bound Message methods by @J_A_V_A

Fixes:
- Allow inclusion of traits, interfaces in plugins
- Fix creation of sessions
And here comes beta127 with multiple fixes and improvements to plugins and error handling!
MadelineProto 8.0.0-beta130 was released!

Features:
- Add CallbackQuery, ButtonQuery, ChatButtonQuery, InlineButtonQuery, GameQuery, ChatGameQuery, InlineGameQuery simple update classes with many useful properties and methods:
- $query->queryId: Query ID
- $query->userId: ID of the user that pressed the button
- $query->chatInstance: Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
- $query->data: for ButtonQuery and subclasses, data associated with the callback button.
- $query->matches: for ButtonQuery and subclasses, regex matches, if a filter regex is present.
- $query->chatId: for Chat*Query classes, chat where the inline keyboard was sent.
- $query->messageId: for Chat*Query classes, message ID.
- $query->gameShortName: for GameQuery and subclasses, short name of a Game to be returned, serves as the unique identifier for the game
- $query->inlineMessageId: for Inline*Query and subclasses, inline message ID
- $query->editText(...): for Chat*Query classes, edits the message's text.
- $query->answer(string $message, bool $alert = false, ?string $url = null, int $cacheTime = 5 * 60) - Answer an inline query
- Add translate and editText methods to Message class
- Add FilterButtonQueryData filter for ButtonQuery
- Adapt FilterFromAdmin and FilterRegex filter for ButtonQuery
- Add FromAdminOrOutgoing simple filter
- Add markdownUrlEscape method!

Fixes:
- Fix usage of inputMediaPhotoExternal and inputMediaDocumentExternal with messages.sendMultiMedia, messages.sendMedia, messages.uploadMedia
- Fix IsReplyToSelf simple filter
- Fix CustomEmoji media type
- Fix bot API conversion for messages forwarded from private channels (+ other bot API conversion fixes)
- Fix pagination hash generation
- Improve markdownCodeblockEscape method
- Properly terminate IPC worker and delete session in case of session revocation
- Fix CDN file downloads
- Fix connection to testmode
- Properly wait when making getPwrChat requests
- Many other fixes!
VoIP calls are working again!
They will be released in the next beta, Magna Luna will also come back to life very soon ;)

P.S. This is done using a pure PHP implementation of VoIP, so it'll work even on webhosts ;)
Finished writing my own OGG muxer in pure PHP, for easy conversion of songs to the maximum possible bitrate, for the best possible VoIP quality :)
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 :)

P. S. It seems like the official Telegram iOS app has a bug which prevents magnaluna from working properly, I'm looking into it, try calling from your Mac/Android/PC, instead!
Please open Telegram to view this post
VIEW IN TELEGRAM
MadelineProto | Official Channel pinned «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…»
MadelineProto | Official 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…
I've released MadelineProto 8.0.0-beta136, it features many fixes, including fixes for proxies and a fix to avoid reporting the same error more than once in a minute.

Also, as mentioned in the previous post, I completely removed all deprecated APIs, including the legacy array settings and Generator polyfills.

These APIs were deprecated and due to be removed a long time ago, but in case you haven't switched over yet, here's a quick recap on how to upgrade:

- Update to php 8.1.17+ or php 8.2.4+ (PHP 8.2.9 is strongly recommended)
- Remove all calls to async(false), async(true), all yields and unwrap all code wrapped in loop(function ()...) blocks (because async is now always enabled by default, and you can use async functions without yield since php 8.1).
- Replace legacy loops with the new loop API from daniil.it/loop
- Replace array settings with object settings, for example for the API ID:

Before:

$settings = ['app_info' => ['api_id' => 123456, 'api_hash' => 'xxx']];

After:

$settings = (new \danog\MadelineProto\Settings\AppInfo) ->setApiId(124) ->setApiHash('xx');


See docs.madelineproto.xyz/docs/SETTINGS.html and docs.madelineproto.xyz for more info.
MadelineProto was updated (8.0.0-beta138)!

Features:
- Added Outgoing, FilterOutgoing, Running, FilterRunning, Ended, FilterEnded filters and simple filters to allow filtering for outgoing, successfully configured or ended calls!
- Added VoIP::pause/VoIP::resume/VoIP::isPaused methods for pausing/resuming currently playing files
- Add a getStream() bound method to abstract Message objects!
- Allow uploading files directly from streams, without specifying a file size!
- Allow playing and converting VoIP audio from a stream (including any Telegram file with getStream()!)
- Add source code of @libtgvoipbot
- Add VoIP::getCurrent() method, to obtain the currently playing audio!
- Add a VoIP::getAllCalls() method, to obtain all currently running calls indexed by user ID!
- Add a simple filter for broadcast progress updates
- Add Ogg::validateOgg method
- Add Tools::getStreamPipe method
- Add support for TCP VoIP streams
- Add ffmpeg to docker image

Fixes:
- Fix VoIP::skip()!
- Fix markdownUrlEscape!
- Fix the "Fix getIdFromUsername(): Return value must be of type ?int, string returned" issue that popped up when using the MySQL ORM
- Fixed many small VoIP issues!


Notice: MadelineProto v7 is now fully deprecated due to Telegram server-side changes, it cannot be used anymore, please switch to MadelineProto v8.
For this purpose, I've created a page to help in the conversion of your bots from MadelineProto v7 to MadelineProto v8, check it out!
Forwarded from Daniil Gentili's news channel (Daniil Gentili)
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'm now also a maintainer of osteele/liquid, the Go port of the Shopify Liquid template engine powering gojekyll.
2024/06/01 03:02:27
Back to Top
HTML Embed Code: