Forwarded from Daniil Gentili's news channel (Daniil Gentili)
Aaaand we're on the front-page of hackernews ❤️❤️❤️
MadelineProto was updated (8.0.0-beta144)!
Features:
- Add cb, offset and end parameters to
This is a useful UX improvement, but it brings some additional overhead when using
Fixes:
- Multiple IPC fixes and improvements
- Avoid connecting to old DCs that the server told us to forget about.
- Performance improvements in the update handler.
Features:
- Add cb, offset and end parameters to
Media::getStream
- Always run updateSettings if settings are passed to constructor.This is a useful UX improvement, but it brings some additional overhead when using
new \danog\MadelineProto\API
, so please remove (or pass null) the second $settings parameter passed to the API constructor once the instance is logged in.Fixes:
- Multiple IPC fixes and improvements
- Avoid connecting to old DCs that the server told us to forget about.
- Performance improvements in the update handler.
Forwarded from Daniil Gentili's news channel (Daniil Gentili)
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:
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 :)
P.S. Here's the link to the hackernews thread I created for the occasion :)
https://news.ycombinator.com/item?id=37285471
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:
<?phpI'm really excited for the potential usecases of php-tokio, and its implications for the PHP async ecosystem.
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'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 :)
P.S. Here's the link to the hackernews thread I created for the occasion :)
https://news.ycombinator.com/item?id=37285471
GitHub
GitHub - danog/php-tokio: Use any async Rust library from PHP!
Use any async Rust library from PHP! Contribute to danog/php-tokio development by creating an account on GitHub.
Forwarded from Daniil Gentili's news channel (Daniil Gentili)
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 :)
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 :)
MadelineProto was updated (8.0.0-beta146)!
Huge thanks to @madbyte and @J_A_V_A for contributing a huge number of abstractions for the SimpleEventHandler for this release, here's the full changelog:
Features by @madbyte:
- Add
- Add
- Add
- Add
- Add
- Add
- Add
Features by @J_A_V_A:
- Add entity support for SimpleEventHandler
- Add
- Add
- Add
- Add
- Add support for bot API secret chat IDs
- Begin work on group call and video call support
- Add view/forward/author information in forwarded messages
- Increase performance with buffered logging
- Add
- Add
Fixes by @danogentili:
- Completely refactored the connection module, featuring:
- 60-80% faster initial handshakes
- No unneeded socket connections to unused DCs
- Automatic disconnection of inactive media sockets
- Properly reconnect in case of network issues (fixes "Request Timeout" errors)
- Optimizations across the board
- Add pcntl extension to docker image
- Mark all optional constructor parameters as optional in the public API.
- Fix usage of boolean parameters of account.changeAuthorizationSettings, messages.editExportedChatInvite, channels.editForumTopic, phone.toggleGroupCallSettings, phone.toggleGroupCallRecord, phone.editGroupCallParticipant
- Fix pagination in
- Secret chat fixes
- Fix
- Fix reuploading of media files from abstract Media objects
- Fix pending count in broadcasts
- Avoid race condition during initialization
- Avoid integer overflow in VoIP module
- FIx setBindTo
Fixes by @xtrime:
- Fix safari video streaming
Breaking changes:
- Moved the isSupergroup, toSupergroup, fromSupergroup methods to a DialogId class, which also has many other useful methods to work with bot API IDs.
- All download methods except for downloadToFile and downloadToDir now return null instead of true.
On a more personal note, I'm very happy of the changes that were contributed in this release: MadelineProto is an open source project, and you can contribute features as well, feel free to fork it and submit pull requests to add the features you think would be cool to have! :)
Huge thanks to @madbyte and @J_A_V_A for contributing a huge number of abstractions for the SimpleEventHandler for this release, here's the full changelog:
Features by @madbyte:
- Add
InlineQuery
SimpleEventHandler updates with related classes- Add
block
, unblock
, read
, enableTTL
, disableTTL
, getStories
, setAction
, enableTTL
, disableTTL
bound methods to all message updates (with related classes)- Add
Story
, StoryReaction
, ChannelUserTyping
, UserTyping
, Blocked
, BotStopped
, Phone
, Status
, Username
, Privacy
SimpleEventHandler updates- Add
save
, unsave
bound methods to the Gif
class- Add
disableSignatures
, enableSignatures
, getMember
, hideHistory
, unhideHistory
bound methods to ChannelMessage
- Add getMember
, hideMembers
, unhideMembers
, hideHistory
, unhideHistory
, deleteUserMessages
, toSuperGroup
, enableAntiSpam
, disableAntiSpam
, enableTopics
, disableTopics
, createTopic
, editTopic
, openTopic
, closeTopic
, deleteTopic
bound methods to GroupMessage
- Add Participant
and AdminRights
, BannedRights
classes- Add
screeshot
bound method to PrivateMessage
- Add DialogChannelCreated
, DialogChannelMigrateFrom
, DialogChatJoinedByLink
, DialogChatMigrateTo
, DialogContactSignUp
, DialogGameScore
, DialogGeoProximityReached
, DialogGiftPremium
, GroupCall
, GroupCallInvited
, GroupCallScheduled
, DialogHistoryCleared
, DialogMemberJoinedByRequest
, DialogPeerRequested
, DialogPhoneCall
, DialogScreenshotTaken
, DialogSetChatTheme
, DialogSetTTL
, DialogSuggestProfilePhoto
, DialogTopicCreated
, DialogTopicEdited
, DialogWebView
SimpleEventHandler service messages- Add
Privacy
abstractionFeatures by @J_A_V_A:
- Add entity support for SimpleEventHandler
Message
s, with full OOP Entity abstractions- Add
ButtonQuery
updates- Add
downloadToDir
, downloadToFile
bound methods to Media
objects- Add
report
, saveContact
, removeContact
, inviteToChannel
, read
bound methods to Message
objects- Add
view
bound method to ChannelMessage
- Add ban
, unban
, kick
, deleteAll
methods to GroupMessage
- Begin work on secret chat support for SimpleEventHandler
Features by @danogentili:- Add support for bot API secret chat IDs
- Begin work on group call and video call support
- Add view/forward/author information in forwarded messages
- Increase performance with buffered logging
- Add
isBot
method, to check if the specified peer is a bot.- Add
FilterFromBot
, FilterSenders
filtersFixes by @danogentili:
- Completely refactored the connection module, featuring:
- 60-80% faster initial handshakes
- No unneeded socket connections to unused DCs
- Automatic disconnection of inactive media sockets
- Properly reconnect in case of network issues (fixes "Request Timeout" errors)
- Optimizations across the board
- Add pcntl extension to docker image
- Mark all optional constructor parameters as optional in the public API.
- Fix usage of boolean parameters of account.changeAuthorizationSettings, messages.editExportedChatInvite, channels.editForumTopic, phone.toggleGroupCallSettings, phone.toggleGroupCallRecord, phone.editGroupCallParticipant
- Fix pagination in
messages.getChatInviteImporters
by explicitly requiring the offset_date
parameter if offset_user
is provided- Secret chat fixes
- Fix
fileGetContents
and http-client- Fix reuploading of media files from abstract Media objects
- Fix pending count in broadcasts
- Avoid race condition during initialization
- Avoid integer overflow in VoIP module
- FIx setBindTo
Fixes by @xtrime:
- Fix safari video streaming
Breaking changes:
- Moved the isSupergroup, toSupergroup, fromSupergroup methods to a DialogId class, which also has many other useful methods to work with bot API IDs.
- All download methods except for downloadToFile and downloadToDir now return null instead of true.
On a more personal note, I'm very happy of the changes that were contributed in this release: MadelineProto is an open source project, and you can contribute features as well, feel free to fork it and submit pull requests to add the features you think would be cool to have! :)
MadelineProto | Official 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…
MadelineProto was updated (8.0.0-beta148)!
Fixes by @danogentili:
- Connection stability fixes
- Avoid GC bugs
- Improve media DC logic
- Fix sendDocument/sendPhoto through IPC API
- Fix upload of images with no content-length
- Fix usage of streams and filecallbacks through the IPC API
- Allow using fopen on php://memory in the SimpleEventHandler
- Improve stream upload logic
- Handle MSG_WAIT_FAILED errors
- Improve call queue
- Improve tests
- TL fix
- Avoid ext-psr conflict
- Bugfix for @libtgvoipbot
Fixes by @AhJXD:
- Handle sendMessageGamePlayAction
Fixes by @danogentili:
- Connection stability fixes
- Avoid GC bugs
- Improve media DC logic
- Fix sendDocument/sendPhoto through IPC API
- Fix upload of images with no content-length
- Fix usage of streams and filecallbacks through the IPC API
- Allow using fopen on php://memory in the SimpleEventHandler
- Improve stream upload logic
- Handle MSG_WAIT_FAILED errors
- Improve call queue
- Improve tests
- TL fix
- Avoid ext-psr conflict
- Bugfix for @libtgvoipbot
Fixes by @AhJXD:
- Handle sendMessageGamePlayAction
MadelineProto was updated (8.0.0-beta150)!
New Methods:
- bots.canSendMessage
- bots.allowSendMessage
- bots.invokeWebViewCustomMethod
- stories.canSendStory
Changed Constructors:
- Added from_request param to messageActionBotAllowed
- Added verified param to chatInvite
- Added scam param to chatInvite
- Added fake param to chatInvite
- Added has_viewers param to storyViews
Fixes:
- File-related fixes
New Methods:
- bots.canSendMessage
- bots.allowSendMessage
- bots.invokeWebViewCustomMethod
- stories.canSendStory
Changed Constructors:
- Added from_request param to messageActionBotAllowed
- Added verified param to chatInvite
- Added scam param to chatInvite
- Added fake param to chatInvite
- Added has_viewers param to storyViews
Fixes:
- File-related fixes
docs.madelineproto.xyz
messageActionBotAllowed
We have given the bot permission to send us direct messages.
Docs are still being built, the links should work in ~10 mins :)
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
MadelineProto was updated (8.0.0-beta156)!
Features:
- Added support for request cancellation to all methods.
- You can now specify a custom
Fixes:
- Multiple bugfixes, improved abstractions
- Improve queue logic
- Improve performance & cleanup method call code
Features:
- Added support for request cancellation to all methods.
- You can now specify a custom
floodWaitLimit
for each API method call.Fixes:
- Multiple bugfixes, improved abstractions
- Improve queue logic
- Improve performance & cleanup method call code
docs.madelineproto.xyz
Async
MadelineProto now features async, for incredible speed improvements, and parallel processing, all powered by amphp.
MadelineProto was updated (8.0.0-beta170)!
Features:
- Added a RestartPlugin that can be included to offer a /restart command to admins
- Add
- Add
- Add
- Update to layer 167
- Added support for ephemeral filesystems (i.e. docker containers with no volumes, storing all data on Mysql/Postgres/Redis) by setting a table prefix manually in the settings, see here » for more info.
- Enable jemalloc and function JIT in docker image to improve performance, and bumped the PHP version to 8.3.
- The login page now features an invitation to translate MadelineProto in your language, using weblate.madelineproto.xyz!
- Added an
- Support forwarding stories through sendMedia
Fixes:
- Fixed composer plugins
- Fix importAuthorization
- Improved public API a bit
- Multiple improvements
- Switch to LONGBLOB for session database, to cover some edge cases with event handlers with a lot of non-ORM properties.
- UNIX socket database connections
- Fix revoltphp bug
- Fix updatePinnedMessages conversion
- Fix QR code login in certain conditions
- Use different escaping rules for single-backtick codeblocks (only ` and \ need to be escaped inside of them now, escaping can be done with the new markdownCodeEscape method).
- Small auth logic bugfix
- Fix backwards conversion in the entitiesToHtml method
- Fix broadcasts with the broadcast API!
Features:
- Added a RestartPlugin that can be included to offer a /restart command to admins
- Add
sendText
method to AbstractMessage
- Add
BotCommands
, MessageForwards
, MessageViewsChanged
, UpdateChannel
, BotChatInviteRequest
, PendingJoinRequests
, DeleteChannelMessages
, DeleteMessages
, DeleteScheduledMessages
PinnedChannelMessages
, PinnedGroupMessages
, PinnedPrivateMessages
SimpleEventHandler updates- Add
ChatInvite
, ChatInviteExported
, ChatInvitePublicJoin
, Command
SimpleEventHandler objects- Update to layer 167
- Added support for ephemeral filesystems (i.e. docker containers with no volumes, storing all data on Mysql/Postgres/Redis) by setting a table prefix manually in the settings, see here » for more info.
- Enable jemalloc and function JIT in docker image to improve performance, and bumped the PHP version to 8.3.
- The login page now features an invitation to translate MadelineProto in your language, using weblate.madelineproto.xyz!
- Added an
htmlEscape
helper function for MadelineProto's HTML entity converter- Support forwarding stories through sendMedia
Fixes:
- Fixed composer plugins
- Fix importAuthorization
- Improved public API a bit
- Multiple improvements
- Switch to LONGBLOB for session database, to cover some edge cases with event handlers with a lot of non-ORM properties.
- UNIX socket database connections
- Fix revoltphp bug
- Fix updatePinnedMessages conversion
- Fix QR code login in certain conditions
- Use different escaping rules for single-backtick codeblocks (only ` and \ need to be escaped inside of them now, escaping can be done with the new markdownCodeEscape method).
- Small auth logic bugfix
- Fix backwards conversion in the entitiesToHtml method
- Fix broadcasts with the broadcast API!
docs.madelineproto.xyz
Database
MadelineProto optionally can keep some of its internal data in a database, such as mysql, mariadb, postgres or redis (you can also add your own!), reducing RAM usage.
New Methods:
- account.updateColor
- account.getDefaultBackgroundEmojis
- messages.searchEmojiStickerSets
- help.getPeerColors
- help.getPeerProfileColors
- channels.updateColor
- channels.toggleViewForumAsMessages
- channels.getChannelRecommendations
- payments.getPremiumGiftCodeOptions
- payments.checkGiftCode
- payments.applyGiftCode
- payments.getGiveawayInfo
- payments.launchPrepaidGiveaway
- stats.getStoryStats
- stats.getStoryPublicForwards
- premium.getBoostsList
- premium.getMyBoosts
- premium.applyBoost
- premium.getBoostsStatus
- premium.getUserBoosts
Changed Methods:
Added invert_media param to messages.sendMessage
Added invert_media param to messages.sendMedia
Added invert_media param to messages.editMessage
Added invert_media param to messages.editInlineBotMessage
Added invert_media param to messages.saveDraft
Added reply_to param to messages.saveDraft
Added media param to messages.saveDraft
Removed reply_to_msg_id param from messages.saveDraft
Removed top_msg_id param from messages.saveDraft
Added invert_media param to messages.sendMultiMedia
Added for_both param to messages.setChatWallPaper
Added revert param to messages.setChatWallPaper
Added fwd_modified param to stories.sendStory
Added fwd_from_id param to stories.sendStory
Added fwd_from_story param to stories.sendStory
New Constructors:
- inputMediaWebPage
- messageMediaGiveaway
- messageActionGiftCode
- messageActionGiveawayLaunch
- messageActionGiveawayResults
- updateBotChatBoost
- updateChannelViewForumAsMessages
- updatePeerWallpaper
- inputBotInlineMessageMediaWebPage
- botInlineMessageMediaWebPage
- channelAdminLogEventActionChangeColor
- channelAdminLogEventActionChangeBackgroundEmoji
- inputInvoicePremiumGiftCode
- inputStorePaymentPremiumGiftCode
- inputStorePaymentPremiumGiveaway
- premiumGiftCodeOption
- payments.checkedGiftCode
- payments.giveawayInfo
- payments.giveawayInfoResults
- prepaidGiveaway
- boost
- premium.boostsList
- myBoost
- premium.myBoosts
- premium.boostsStatus
- storyFwdHeader
- postInteractionCountersMessage
- postInteractionCountersStory
- stats.storyStats
- publicForwardMessage
- publicForwardStory
- stats.publicForwards
- peerColor
- help.peerColorSet
- help.peerColorProfileSet
- help.peerColorOption
- help.peerColorsNotModified
- help.peerColors
- account.updateColor
- account.getDefaultBackgroundEmojis
- messages.searchEmojiStickerSets
- help.getPeerColors
- help.getPeerProfileColors
- channels.updateColor
- channels.toggleViewForumAsMessages
- channels.getChannelRecommendations
- payments.getPremiumGiftCodeOptions
- payments.checkGiftCode
- payments.applyGiftCode
- payments.getGiveawayInfo
- payments.launchPrepaidGiveaway
- stats.getStoryStats
- stats.getStoryPublicForwards
- premium.getBoostsList
- premium.getMyBoosts
- premium.applyBoost
- premium.getBoostsStatus
- premium.getUserBoosts
Changed Methods:
Added invert_media param to messages.sendMessage
Added invert_media param to messages.sendMedia
Added invert_media param to messages.editMessage
Added invert_media param to messages.editInlineBotMessage
Added invert_media param to messages.saveDraft
Added reply_to param to messages.saveDraft
Added media param to messages.saveDraft
Removed reply_to_msg_id param from messages.saveDraft
Removed top_msg_id param from messages.saveDraft
Added invert_media param to messages.sendMultiMedia
Added for_both param to messages.setChatWallPaper
Added revert param to messages.setChatWallPaper
Added fwd_modified param to stories.sendStory
Added fwd_from_id param to stories.sendStory
Added fwd_from_story param to stories.sendStory
New Constructors:
- inputMediaWebPage
- messageMediaGiveaway
- messageActionGiftCode
- messageActionGiveawayLaunch
- messageActionGiveawayResults
- updateBotChatBoost
- updateChannelViewForumAsMessages
- updatePeerWallpaper
- inputBotInlineMessageMediaWebPage
- botInlineMessageMediaWebPage
- channelAdminLogEventActionChangeColor
- channelAdminLogEventActionChangeBackgroundEmoji
- inputInvoicePremiumGiftCode
- inputStorePaymentPremiumGiftCode
- inputStorePaymentPremiumGiveaway
- premiumGiftCodeOption
- payments.checkedGiftCode
- payments.giveawayInfo
- payments.giveawayInfoResults
- prepaidGiveaway
- boost
- premium.boostsList
- myBoost
- premium.myBoosts
- premium.boostsStatus
- storyFwdHeader
- postInteractionCountersMessage
- postInteractionCountersStory
- stats.storyStats
- publicForwardMessage
- publicForwardStory
- stats.publicForwards
- peerColor
- help.peerColorSet
- help.peerColorProfileSet
- help.peerColorOption
- help.peerColorsNotModified
- help.peerColors
Changed Constructors:
Added color param to user
Added profile_color param to user
Added color param to channel
Added view_forum_as_messages param to channelFull
Added invert_media param to message
Added force_large_media param to messageMediaWebPage
Added force_small_media param to messageMediaWebPage
Added manual param to messageMediaWebPage
Added safe param to messageMediaWebPage
Added same param to messageActionSetChatWallPaper
Added for_both param to messageActionSetChatWallPaper
Added view_forum_as_messages param to dialog
Added wallpaper_overridden param to userFull
Added invert_media param to updateServiceNotification
Added url param to webPageEmpty
Added url param to webPagePending
Added has_large_media param to webPage
Added color param to chatInvite
Added text_color param to stickerSet
Added invert_media param to inputBotInlineMessageMediaAuto
Added invert_media param to inputBotInlineMessageText
Added invert_media param to botInlineMessageMediaAuto
Added invert_media param to botInlineMessageText
Added invert_media param to draftMessage
Added reply_to param to draftMessage
Added media param to draftMessage
Removed reply_to_msg_id param from draftMessage
Added reactions_per_post param to stats.broadcastStats
Added views_per_story param to stats.broadcastStats
Added shares_per_story param to stats.broadcastStats
Added reactions_per_story param to stats.broadcastStats
Added reactions_by_emotion_graph param to stats.broadcastStats
Added story_interactions_graph param to stats.broadcastStats
Added story_reactions_by_emotion_graph param to stats.broadcastStats
Added recent_posts_interactions param to stats.broadcastStats
Removed recent_message_interactions param from stats.broadcastStats
Added quote param to messageReplyHeader
Added reply_from param to messageReplyHeader
Added reply_media param to messageReplyHeader
Added quote_text param to messageReplyHeader
Added quote_entities param to messageReplyHeader
Added quote_offset param to messageReplyHeader
Added reactions_by_emotion_graph param to stats.messageStats
Added app param to sponsoredMessage
Added button_text param to sponsoredMessage
Added trial_remains_num param to messages.transcribedAudio
Added trial_remains_until_date param to messages.transcribedAudio
Added fwd_from param to storyItem
Added reply_to_peer_id param to inputReplyToMessage
Added quote_text param to inputReplyToMessage
Added quote_entities param to inputReplyToMessage
Added quote_offset param to inputReplyToMessage
Added color param to user
Added profile_color param to user
Added color param to channel
Added view_forum_as_messages param to channelFull
Added invert_media param to message
Added force_large_media param to messageMediaWebPage
Added force_small_media param to messageMediaWebPage
Added manual param to messageMediaWebPage
Added safe param to messageMediaWebPage
Added same param to messageActionSetChatWallPaper
Added for_both param to messageActionSetChatWallPaper
Added view_forum_as_messages param to dialog
Added wallpaper_overridden param to userFull
Added invert_media param to updateServiceNotification
Added url param to webPageEmpty
Added url param to webPagePending
Added has_large_media param to webPage
Added color param to chatInvite
Added text_color param to stickerSet
Added invert_media param to inputBotInlineMessageMediaAuto
Added invert_media param to inputBotInlineMessageText
Added invert_media param to botInlineMessageMediaAuto
Added invert_media param to botInlineMessageText
Added invert_media param to draftMessage
Added reply_to param to draftMessage
Added media param to draftMessage
Removed reply_to_msg_id param from draftMessage
Added reactions_per_post param to stats.broadcastStats
Added views_per_story param to stats.broadcastStats
Added shares_per_story param to stats.broadcastStats
Added reactions_per_story param to stats.broadcastStats
Added reactions_by_emotion_graph param to stats.broadcastStats
Added story_interactions_graph param to stats.broadcastStats
Added story_reactions_by_emotion_graph param to stats.broadcastStats
Added recent_posts_interactions param to stats.broadcastStats
Removed recent_message_interactions param from stats.broadcastStats
Added quote param to messageReplyHeader
Added reply_from param to messageReplyHeader
Added reply_media param to messageReplyHeader
Added quote_text param to messageReplyHeader
Added quote_entities param to messageReplyHeader
Added quote_offset param to messageReplyHeader
Added reactions_by_emotion_graph param to stats.messageStats
Added app param to sponsoredMessage
Added button_text param to sponsoredMessage
Added trial_remains_num param to messages.transcribedAudio
Added trial_remains_until_date param to messages.transcribedAudio
Added fwd_from param to storyItem
Added reply_to_peer_id param to inputReplyToMessage
Added quote_text param to inputReplyToMessage
Added quote_entities param to inputReplyToMessage
Added quote_offset param to inputReplyToMessage
docs.madelineproto.xyz
account.updateColor
account.updateColor parameters, return type and example
MadelineProto | Official Channel
MadelineProto was updated (8.0.0-beta170)! Features: - Added a RestartPlugin that can be included to offer a /restart command to admins - Add sendText method to AbstractMessage - Add BotCommands, MessageForwards, MessageViewsChanged, UpdateChannel, BotChatInviteRequest…
The next release will probably feature a takeout API :)
This holiday release updates MadelineProto to layer 169, and brings a number of fixes (8.0.0-beta187)!
Breaking changes:
- Remove low-level peerChannel, peerChat, peerUser constructors everywhere from the API, replacing them with bot API IDs (integers).
- Remove legacy to_id field from legacy raw updates (the new SimpleEventHandler API has not changed, because it's covered by the backwards compatibility promise, unlike legacy raw updates)
- Remove flush() method: the postpone flag will now only postpone flushing to the end of the event loop queue, instead of never triggering it until flush() or a non-postponed method is called by
- Removed the deprecated getDialogs method, please use getDialogIds instead
Features:
- Add a getDiscussion method to ChannelMessage to obtain the comment section of a post as a GroupMessage.
- Document the built-in ORM: https://docs.madelineproto.xyz/docs/UPDATES.html#built-in-orm
- Add ChannelParticipant update, received whenever a participant leaves, joins or is banned or admined in a channel or supergroup by
@ahjdev
(github)- Add a FilterTopicId filter to filter messages by topic ID by
@ahjdev
(github)- Add queueId parameter to methods to allow enforcing server-side execution order when using postpone or invoking methods concurrently
- Add delete, pin, unpin, report methods to ChatButtonQuery and ChatGameQuery by
@mtalaeii
(github)Fixes:
- Fix PHP 8.3 FFI usage for opus conversion.
- Misc usability and performance improvements.
More specifically, the access_hash field was removed from all public APIs, to avoid usage of outdated values.
- Fix various peer database issues
- Fix broadcasts
- Improve TL traces of IPC exceptions
- Misc update handling fixes
- Fix BotChatInviteRequest
- Update the source code of downloadRenameBot.php by
@ahjdev
(github)- Report exceptions thrown from event handler to the report peer(s) of the current event handler when using multiple event handler with startAndLoopMulti or EventLoop::queue(MyEventHandler::startAndLoop(...), '...madeline');
Note that for performance reasons, some internal or connection exceptions not thrown from the event handler and exceptions thrown from onStart may still get reported (only to, or also to) the last started event handler.
- Completely remove postponing from the API to avoid unwanted side effects (sequentially queued requests are still bundled in a single container anyway)
- Use async output buffer stream with downloadToBrowser
- Secret chat media improvements
Please open Telegram to view this post
VIEW IN TELEGRAM
Changed Methods:
- Added requested_peers param to messages.sendBotRequestedPeer
- Removed requested_peer param from messages.sendBotRequestedPeer
- Added for_profile param to channels.updateColor
- Added offset param to stats.getMessagePublicForwards
- Removed offset_rate param from stats.getMessagePublicForwards
- Removed offset_peer param from stats.getMessagePublicForwards
- Removed offset_id param from stats.getMessagePublicForwards
- Added forwards_first param to stories.getStoryViewsList
docs.madelineproto.xyz
messages.sendBotRequestedPeer
Send a chosen peer, as requested by a [keyboardButtonRequestPeer](../constructors/keyboardButtonRequestPeer.html) button.