madelineproto | Unsorted

Telegram-канал madelineproto - MadelineProto | Official Channel

7257

Official MadelineProto channel. Italian Channel: @MadelineProtoIta Group: @pwrtelegramgroup

Subscribe to a channel

MadelineProto | Official Channel

Made some performance improvements to the broadcast API in the new beta89!

Note that the process may still take up to 30 minutes to start depending on the number of users of the bot, but afterwards all messages are broadcasted as quickly as possible, and in parallel :)

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta87)!

MadelineProto now offers an official docker image for the linux/amd64, linux/arm64 and linux/riscv64 platforms!

The image comes with all dependencies pre-configured.

To get started, install docker:

curl -fsSL https://get.docker.com | sudo sh


Then increase the max_map_count sysctl configuration to avoid "Fiber stack allocate failed" and "Fiber stack protect failed" errors, since the PHP engine mmaps two memory regions per fiber.

echo 262144 | sudo tee /proc/sys/vm/max_map_count
echo vm.max_map_count=262144 | sudo tee /etc/sysctl.d/40-madelineproto.conf


Then, create the following docker-compose.yml file:

services:
bot:
image: hub.madelineproto.xyz/danog/madelineproto
restart: unless-stopped
tty: true
volumes:
- .:/app
command: php /app/bot.php


Then, create a bot.php file with your code, and run this command to log into the bot:

docker run --rm -it --init -v $PWD:/app hub.madelineproto.xyz/danog/madelineproto php /app/bot.php


After logging in, press ctrl-c to close the temporary container.

Finally, simply run this command to start the bot in the background.

docker compose up --pull always -d


Use docker compose logs to view MadelineProto logs and docker compose ps to view the status of your bot!

See the documentation for more info about the docker image.

Other features:
- Add getType method
- Add support for emojis with <emoji id="1234">👍</emoji>, <tg-emoji emoji-id="1234>👍</tg-emoji> HTML tags and tg://emoji?id=1234 HTML/markdown links, in addition to the pre-existing emoji:id HTML/markdown links.
- Add showPrompt AppInfo setting, to allow throwing an exception instead of showing a readline/UI prompt if no API ID was configured.

Fixes:
- Change name of parameter of broadcastForwardMessages from ids to message_ids to avoid confusion.

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

MadelineProto | Official Channel

MadelineProto now offers a simple broadcast API, that can be used to asynchronously broadcast messages to all users of a bot or userbot in the background, without incurring in timeouts or other issues.

Note that unlike the bot API, MadelineProto can be used to fetch the full list of users, chats and channels of a normal bot, simply using its bot token.

Here's a simple example, explaining how to broadcast a message and a photo to every user of a bot:

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

$MadelineProto = new \danog\MadelineProto\API('bot.madeline');

// The UI will ask you to insert your bot token here
$MadelineProto->start();

$id = $MadelineProto->broadcastMessages([
['message' => 'This broadcast is powered by @MadelineProto!'],
['message' => 'This media broadcast is powered by @MadelineProto!', 'media' => [
'_' => 'inputMediaUploadedPhoto',
'file' => 'https://docs.madelineproto.xyz/logo-hover.png'
]],
]);


You can also forward messages:

// Send messages, showing the "Forwarded from" header
$id = $MadelineProto->broadcastForwardMessages(
from_peer: 101374607,
ids: [1, 2, 3, 4],
drop_author: false,
);

// Send messages WITHOUT showing the "Forwarded from" header
$id = $MadelineProto->broadcastForwardMessages(
from_peer: 101374607,
ids: [1, 2, 3, 4],
drop_author: true,
);

The methods return an integer ID that can be used to:

- Get the current broadcast progress with getBroadcastProgress
- Cancel the broadcast using cancelBroadcast

Note that to avoid manually polling the progress, MadelineProto will also periodically emit updateBroadcastProgress updates to the event handler, containing a Progress object for all broadcasts currently in-progress.

Filtering is also available, as well as support for custom broadcast actions.

See here » for a full example of the broadcast API, and here » for the full documentation.

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta79)!

Features:
- Make getID work with usernames.
- Allow calling restart() and stop() from outside the event handler.
- Add a sendCustomEvent API method and an onUpdateCustomEvent event handler method
- Implement InputCheckPasswordSRP conversion: you can now provide a simple string where a InputCheckPasswordSRP object is required.

Fixes:
- Bypass eio touch issues
- Make username recaching atomic

New Methods:
- auth.resetLoginEmail
- messages.setChatWallPaper
- bots.reorderUsernames
- bots.toggleUsername
- chatlists.exportChatlistInvite
- chatlists.deleteExportedInvite
- chatlists.editExportedInvite
- chatlists.getExportedInvites
- chatlists.checkChatlistInvite
- chatlists.joinChatlistInvite
- chatlists.getChatlistUpdates
- chatlists.joinChatlistUpdates
- chatlists.hideChatlistUpdates
- chatlists.getLeaveChatlistSuggestions
- chatlists.leaveChatlist

Changed Methods:
Added for_chat param to account.uploadWallPaper
Added bot param to photos.updateProfilePhoto
Added bot param to photos.uploadProfilePhoto
Added bot param to bots.setBotInfo
Added name param to bots.setBotInfo
Added bot param to bots.getBotInfo

Deleted Methods:
- folders.deleteFolder
- messages.getAllChats (use getDialogIds/getDialogs/getFullDialogs instead)

New Constructors:
- messageActionSetChatWallPaper
- messageActionSetSameChatWallPaper
- dialogFilterChatlist
- inlineQueryPeerTypeBotPM
- inputChatlistDialogFilter
- exportedChatlistInvite
- chatlists.exportedChatlistInvite
- chatlists.exportedInvites
- chatlists.chatlistInviteAlready
- chatlists.chatlistInvite
- chatlists.chatlistUpdates
- bots.botInfo

Changed Constructors:
Added bot_can_edit param to user
Added crypto_currency param to messageActionGiftPremium
Added crypto_amount param to messageActionGiftPremium
Added wallpaper param to userFull
Added via_chatlist param to updateChannelParticipant
Added peer_types param to keyboardButtonSwitchInline
Added reset_available_period param to auth.sentCodeTypeEmailCode
Added reset_pending_date param to auth.sentCodeTypeEmailCode
Removed next_phone_login_date param from auth.sentCodeTypeEmailCode
Added via_chatlist param to channelAdminLogEventActionParticipantJoinByInvite
Added via_chatlist param to chatInviteImporter

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

MadelineProto | Official Channel

PHP 8.2.4 was finally released!

You can now use MadelineProto normally, without using older versions of PHP.

Make sure to run sudo apt-get update && sudo apt-get dist-upgrade -y on Ubuntu and Debian to pull the latest version!

The official docker image for php 8.2.4 was also released, if you want to keep using docker.

Ping your webhosts if they're still using the old version ;)

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta55)!

Fixes:
- Adapted dns-over-https for new http-client beta.

Please note that when requiring madelineproto using composer, you should now specify a minimum-stability of beta, not dev.

For example, you can use the following composer.json:


{
"require": {
"danog/madelineproto": "^8"
},
"minimum-stability": "beta"
}

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

MadelineProto | Official Channel

Telegram API Update.

Please note that due to recent updates to Telegram's handling of SMS and the integration of new SMS providers like Firebase, Telegram is changing the way login codes are handled in third-party apps based on the Telegram API, like MadelineProto.

Starting on 18.02.2023, users logging into third-party apps will only be able to receive login codes via Telegram. It will no longer be possible to request an SMS to log into your app – just like when logging into Telegram's own desktop and web clients.

Exactly like with the Telegram Desktop and Web apps, if a user doesn’t have a Telegram account yet, they will need to create one first using an official mobile Telegram app.

TL;DR: You will still be able to use MadelineProto to login, but the code will only be received via Telegram, not SMS.

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

MadelineProto | Official Channel

PSA: The garbage collector bug also affects PHP 8.1.15.

Until it is fixed, please stick to PHP 8.1.14 or PHP 8.2.1.

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

MadelineProto | Official Channel

MadelineProto was updated!

Features:
- Update to layer 152
- getDialogs now fetches the entire member list for bots

New Methods:
- auth.requestFirebaseSms
- account.getDefaultProfilePhotoEmojis
- account.getDefaultGroupPhotoEmojis
- account.getAutoSaveSettings
- account.saveAutoSaveSettings
- account.deleteAutoSaveExceptions
- messages.sendBotRequestedPeer
- messages.getEmojiGroups
- messages.getEmojiStatusGroups
- messages.getEmojiProfilePhotoGroups
- messages.searchCustomEmoji
- messages.togglePeerTranslations

Changed Methods:
Added id param to messages.translateText
Removed msg_id param from messages.translateText
Removed from_lang param from messages.translateText
Added video_emoji_markup param to photos.uploadProfilePhoto
Added video_emoji_markup param to photos.uploadContactProfilePhoto
Added forum param to channels.createChannel

New Constructors:
- messageActionRequestedPeer
- auth.sentCodeSuccess
- updateAutoSaveSettings
- keyboardButtonRequestPeer
- auth.sentCodeTypeFirebaseSms
- videoSizeEmojiMarkup
- videoSizeStickerMarkup
- requestPeerTypeUser
- requestPeerTypeChat
- requestPeerTypeBroadcast
- emojiListNotModified
- emojiList
- emojiGroup
- messages.emojiGroupsNotModified
- messages.emojiGroups
- textWithEntities
- messages.translateResult
- autoSaveSettings
- autoSaveException
- account.autoSaveSettings

Changed Constructors:
Added video_emoji_markup param to inputChatUploadedPhoto
Added translations_disabled param to chatFull
Added translations_disabled param to channelFull
Added future_auth_token param to auth.authorization
Added translations_disabled param to userFull
Added send_photos param to chatBannedRights
Added send_videos param to chatBannedRights
Added send_roundvideos param to chatBannedRights
Added send_audios param to chatBannedRights
Added send_voices param to chatBannedRights
Added send_docs param to chatBannedRights
Added send_plain param to chatBannedRights
Added allow_firebase param to codeSettings
Added token param to codeSettings
Added app_sandbox param to codeSettings
Added upgrade param to inputStorePaymentPremiumSubscription
Added transaction param to premiumSubscriptionOption

Deleted Constructors:
- messages.translateNoResult
- messages.translateResultText

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

MadelineProto | Official Channel

MadelineProto 8 was updated!

Features:
- Added a new \danog\MadelineProto\RPCError\FloodWaitError exception type, which will be thrown for FLOOD_WAIT_ errors. It contains useful getWaitTime() and wait() methods to easily fetch or wait for the required amount of time.

Also, I've created a final release for MadelineProto 7.
If you don't want to use the latest v8 beta, you can still install MadelineProto 7 using composer, or by downloading and including this phar file: https://github.com/danog/MadelineProto/releases/download/7.0.152/madeline.phar

Please note that I won't provide support for legacy installs of MadelineProto 7.

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

MadelineProto | Official Channel

Released a new beta:

Breaking changes:

- Removed the deprecated $MadelineProto->startAndLoop method. Please use MyEventHandler::startAndLoop instead, remove any new \danog\MadelineProto\API line you have in your code if you're only using the event handler.
- Removed support for the long-deprecated snake_case methods, now only camelCase is supported (get_info will not work, only getInfo; and so on).
- onStart now blocks all updates until it finishes executing. Use the amphp async primitives to start long-running processes in onStart like starting a webserver.
- You can't assign arbitrary properties to an API instance anymore.

Features:
- Added an extractMessageId method.

Fixes:
- Fixed getPwrChat
- Properly handle PTS exceptions
- Avoid fiber leaks by completely refactoring the loop API
- Fix garbage collection of API instances. To properly garbage collect API instances, run EventLoop::run() after unsetting all API instances; or if you just destroyed one instance and others are still running, keep using MadelineProto as usual, the garbage collector callbacks will be invoked by the event loop automatically.

Deprecations:
- The \danog\Loop\Generic\PeriodicLoop and \danog\Loop\Generic\GenericLoop classes were deprecated.
The alternatives are the new \danog\Loop\PeriodicLoop and \danog\Loop\GenericLoop, with a new and refactored API, see https://github.com/danog/loop for the new API. The old classes are still available, but will be removed in the next major release (v9).
- The async and loop methods were deprecated, and will be removed in the next major release (v9).
- All coroutine-related methods (Tools::callFork, etc) were deprecated, and will be removed in the next major release (v9).
Use the amphp APIs, instead (ie \Amp\async or \Revolt\EventLoop::queue instead of Tools::callFork, Amp\Promise\awaitAll instead of Tools::all etc).
- Coroutine support in the event handler will be completely removed in the next major release (v9).

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

MadelineProto | Official Channel

Fixed a bunch of long-time bugs in madeline.php (including some that were present even in v7):

- Finally fully fixed "Could not connect to MadelineProto" IPC issues.
- Fixed a fiber memory leak that caused "Fiber stack allocate failed" or "Fiber stack protect failed" issues on systems with a low max_map_count
- Fixed FILE_PART_0 issues when concurrently uploading+truncating report logs.


A note on "Fiber stack allocate failed" and "Fiber stack protect failed" errors.

MadelineProto + Amphp v3 + PHP 8.1 make use of mmap to map stack space for each fiber (aka green thread), with 2 mmap'ed areas per fiber (one area for the stack + a protected stack guard area at the end).

The "Fiber stack allocate failed" and "Fiber stack protect failed" errors occur when the maximum number of mmap'ed regions is reached: you should increase the vm.max_map_count kernel config to 262144 to fix them.

These errors will still occur on heavily-loaded instances of MadelineProto: run the following command as root to avoid these errors:

echo 262144 | sudo tee /proc/sys/vm/max_map_count

To persist the change across reboots:

echo vm.max_map_count=262144 | sudo tee /etc/sysctl.d/40-madelineproto.conf


On Windows and WSL, increasing the size of the pagefile might help; please switch to native Linux if the issue persists.

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

MadelineProto | Official Channel

The first beta of MadelineProto 8 was released!

This release switches to amphp v3, removes a bunch of legacy bloat inside of MadelineProto and features a lot of bugfixing as well!

This release is available by default using the madeline.php alpha distribution channel, and can be installed by composer by using the dev-stable tag (setting the minimum stability to dev, since some amp dependencies are still in beta).

Thanks to fibers and amp v3, you can now remove all traces of yield from your code :D

Breaking changes:
- Switched to amphp v3: this includes breaking changes in all major amphp libraries, check out the amphp github release changelogs for more info.
- Removed Promise wrapper types from return types everywhere.
- Removed support for the deprecated onLoop method.
- ORM properties can directly be iterated upon in a foreach without using getIterator (which will not return an amphp iterator anymore).
- Finalized a lot of classes that were mistakenly not marked as final.
- Made some internal details fully private.
- The session is now contained in a directory, instead of separate files.
- Automatic API ID fetching via the my.telegram.org wrapper was temporarily removed due to possible IP bans on webhosts.

The above list is not complete, as there will be more breaking changes before the final v8 release.

Features:
- Added a subscribeToUpdates method that can be used to subscribe to event handler updates for channels or supergroups we're not a member of.
- Added count, isset, unset, native iteration support to the ORM API

Fixes:
- Many many bugfixes, including:
- IPC fixes
- Proxy fixes
- Deserialization fixes
- User, group and channel information returned by getInfo, getFullInfo, getPwrChat is now correctly updated in real time
- Performance improvements for the madeline.php light startup

Internal changes:
- All of MadelineProto now uses strict_types for higher performance and type strictness!

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

MadelineProto | Official Channel

We're getting there...

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

MadelineProto | Official Channel

Merry Christmas Everyone! 🎄

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

MadelineProto | Official Channel

By the way, as you may have guessed by the linux/riscv64 images I'm providing, I got myself a visionfive2 RISC-V board precisely for the purpose of improving PHP support on RISC-V.

I'm currently working on a RISC-V port of the PHP JIT compiler, will be documenting the process on my channel: /channel/daniilgentili/691 :)

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

MadelineProto | Official Channel

Here's a simplified example, just for bots:

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

$MadelineProto = new \danog\MadelineProto\API('bot.madeline');

$MadelineProto->botLogin('1234:token');

$id = $MadelineProto->broadcastMessages([
['message' => 'This broadcast is powered by @MadelineProto!'],
['message' => 'This media broadcast is powered by @MadelineProto!', 'media' => [
'_' => 'inputMediaUploadedPhoto',
'file' => 'https://docs.madelineproto.xyz/logo-hover.png'
]],
]);

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta80)!

Features:
- Introducing a new broadcasting API!
- You can now specify a custom serializer type for your ORM properties (one of the variants of the SerializerType enum, or null to choose the best serializer automatically (the default)).

Fixes:
- The documentation was updated, including human-readable descriptions for the latest layer.
- Postgres now uses the new BYTEA amphp APIs
- Multiple fixes and improvements.

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta66)!

Bugfixes:
- Fix issues in uploadFromStream, uploadFromCallable, downloadToBrowser
- MadelineProto now requires PHP 8.1.17+, 8.2.4+

The documentation was also fully updated for MadelineProto 8 and amp v3.

New Methods:
- messages.getBotApp
- messages.requestAppWebView
- bots.setBotInfo
- bots.getBotInfo
- stickers.changeSticker
- stickers.renameStickerSet
- stickers.deleteStickerSet

Changed Methods:
Added switch_webview param to messages.setInlineBotResults
Added from_switch_webview param to messages.requestSimpleWebView
Added hash param to help.getAppConfig
Added emojis param to stickers.createStickerSet
Added text_color param to stickers.createStickerSet
Added thumb_document_id param to stickers.setStickerSetThumb

New Constructors:
- updateGroupInvitePrivacyForbidden
- help.appConfigNotModified
- help.appConfig
- inputBotAppID
- inputBotAppShortName
- botAppNotModified
- botApp
- messages.botApp
- appWebViewResultUrl
- inlineBotWebView
- readParticipantDate

Changed Constructors:
Added attach_menu param to messageActionBotAllowed
Added app param to messageActionBotAllowed
Added autologin_token param to config
Removed phonecalls_enabled param from config
Removed ignore_phone_entities param from config
Removed pfs_enabled param from config
Removed saved_gifs_limit param from config
Removed stickers_faved_limit param from config
Removed pinned_dialogs_count_max param from config
Removed pinned_infolder_count_max param from config
Added switch_webview param to messages.botResults
Added keywords param to inputStickerSetItem
Added sponsor_info param to sponsoredMessage
Added additional_info param to sponsoredMessage
Added date param to messagePeerReaction

Deleted Constructors:
- messageActionAttachMenuBotAllowed

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

MadelineProto | Official Channel

Small update regarding this PHP bug: https://github.com/php/php-src/issues/10496

MadelineProto will never run on PHP 8.1.15, 8.1.16, 8.2.2, 8.2.3 due to a PHP, not MadelineProto bug.

I can't fix the problem because it's not a MadelineProto problem, it's a PHP problem.

A patch was already committed to php-src but it wasn't released yet: the fix will probably be present in PHP 8.1.17, PHP 8.2.4.

Until these two versions are released, all applications based on fibers will not work: this includes major libraries like amphp, revolt, psl and MadelineProto.

The only workaround for now is to compile php from scratch from the PHP-8.1, PHP-8.2 or master branches (which include the fix), or using an older version of PHP like PHP 8.1.14 or 8.2.1.

An easy way to use older versions of PHP is through docker.

If you want, you ask the PHP devs to speed up the release of PHP 8.1.17 or PHP 8.2.4 by commenting on https://github.com/php/php-src/issues/10496, opening a new issue @ https://github.com/php/php-src/ and writing to the internals mailing list: internals@lists.php.net

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta52)!

Features:
- Add separate RPC resend timeout
- Remove manual inclusion limitations for the release phar file
- Check for all missing extensions

Fixes:
- Fix getPwrChat
- Peer handler bugfixes

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

MadelineProto | Official Channel

Protip: use docker to easily install and use PHP 8.2.1:

docker run --rm -it -v $PWD:/app php:8.2.1 php /app/bot.php

This will run the bot.php file present in the current directory.

You can also use the php:8.2.1-apache and php:8.2.1-fpm images to set up a webserver, though if you're just using the event handler, running bots via CLI is the more reliable.

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

MadelineProto | Official Channel

The documentation was just rebuilt, the documentation links should work fine now.

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

MadelineProto | Official Channel

PSA: PHP 8.2.2 has a garbage collector bug which completely breaks all async applications based on fibers, including MadelineProto.

Until it is fixed, please stick to PHP 8.1 or PHP 8.2.1.

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

MadelineProto | Official Channel

MadelineProto was updated!

Fixes:
- Fix -503 Timeout errors when downloading files

Features:
- Full Psalm/IDE types for all API methods!
- Test fibers before the first login, providing a helpful message if the maximum number of startable fibers is too low.

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

MadelineProto | Official Channel

You can now use the following test script to test the maximum number of fibers that can be started on a webhost:

<?php

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

var_dump(\danog\MadelineProto\Tools::testFibers());



A very basic, low-load install of MadelineProto shouldershould use around 500 fibers (though that number should decrease in the next update).

In optimal conditions, the value of maxFibers should be exactly equal to 100000.

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

MadelineProto | Official Channel

Breaking changes update:
- Removed the long-deprecated setEventHandler method, please use MyEventHandler::startAndLoop instead.

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

MadelineProto | Official Channel

2022 for me was a year of creativity and major technical accomplishments, driven by curiosity and the desire to learn and participate as much as possible in the wondrously creative field that is computer science.

I wish the same for everyone in 2023: let it be a year of inspiration, creativity and peace.

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

MadelineProto | Official Channel

MadelineProto was updated!

This release introduces layer 151 features, and simplifies internal handling of peers.

This should be the last release to support amphp v2, all future releases will only support amphp v3 (providing polyfills where possible to avoid breakage).

New Methods:
- auth.importWebTokenAuthorization
- account.reorderUsernames
- account.toggleUsername
- contacts.exportContactToken
- contacts.importContactToken
- messages.setDefaultHistoryTTL
- messages.getDefaultHistoryTTL
- channels.reorderUsernames
- channels.toggleUsername
- channels.deactivateAllUsernames
- channels.toggleForum
- channels.createForumTopic
- channels.getForumTopics
- channels.getForumTopicsByID
- channels.editForumTopic
- channels.updatePinnedForumTopic
- channels.deleteTopicHistory
- channels.reorderPinnedForumTopics
- channels.toggleAntiSpam
- channels.reportAntiSpamFalsePositive

Changed Methods:
Removed document_id param from account.getTheme
Added top_msg_id param to messages.sendMessage
Added top_msg_id param to messages.sendMedia
Added top_msg_id param to messages.forwardMessages
Added ttl_period param to messages.createChat
Added top_msg_id param to messages.sendInlineBotResult
Added top_msg_id param to messages.saveDraft
Added top_msg_id param to messages.getUnreadMentions
Added top_msg_id param to messages.readMentions
Added top_msg_id param to messages.sendMultiMedia
Added top_msg_id param to messages.getSearchCounters
Added top_msg_id param to messages.unpinAllMessages
Added top_msg_id param to messages.getUnreadReactions
Added top_msg_id param to messages.readReactions
Added top_msg_id param to messages.requestWebView
Added top_msg_id param to messages.prolongWebView
Added ttl_period param to channels.createChannel

New Constructors:
- messageActionTopicCreate
- messageActionTopicEdit
- inputNotifyForumTopic
- updateChannelPinnedTopic
- updateChannelPinnedTopics
- notifyForumTopic
- inputStickerSetEmojiDefaultTopicIcons
- auth.codeTypeFragmentSms
- auth.sentCodeTypeFragmentSms
- channelAdminLogEventActionChangeUsernames
- channelAdminLogEventActionToggleForum
- channelAdminLogEventActionCreateTopic
- channelAdminLogEventActionEditTopic
- channelAdminLogEventActionDeleteTopic
- channelAdminLogEventActionPinTopic
- channelAdminLogEventActionToggleAntiSpam
- messages.sponsoredMessagesEmpty
- stickerKeyword
- username
- forumTopicDeleted
- forumTopic
- messages.forumTopics
- defaultHistoryTTL
- exportedContactToken

Changed Constructors:
Added usernames param to user
Added forum param to channel
Added usernames param to channel
Added antispam param to channelFull
Added auto_setting_from param to messageActionSetMessagesTTL
Added ttl_period param to dialog
Added topics param to messages.channelMessages
Added usernames param to updateUserName
Removed username param from updateUserName
Added top_msg_id param to updateDraftMessage
Added top_msg_id param to updateChannelReadMessagesContents
Added top_msg_id param to updateMessageReactions
Added keywords param to messages.stickerSet
Added keywords param to stickerSetFullCovered
Added forums param to channelAdminLogEventsFilter
Added manage_topics param to chatAdminRights
Added manage_topics param to chatBannedRights
Added forum_topic param to messageReplyHeader
Added show_peer_photo param to sponsoredMessage
Added posts_between param to messages.sponsoredMessages

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

MadelineProto | Official Channel

Note when upgrading to PHP 8.1: MadelineProto will still support the legacy PHP 7 array arguments syntax, you don't have to rewrite your method calls to support PHP 8.1.

For example:


// This example uses PHP 7.1+ syntax with arrays
$MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => "Hi!\nThanks for creating MadelineProto (PHP 7)! <3"]);

// This example uses PHP 8.0+ syntax with named arguments
$MadelineProto->messages->sendMessage(peer: '@danogentili', message: "Hi!\nThanks for creating MadelineProto (PHP 8)! <3");


Both will work OK on PHP 8.1 both in current and future versions of MadelineProto.

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