madelineproto | Unsorted

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

7257

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

Subscribe to a channel

MadelineProto | Official Channel

Released beta108 with a few additional features and fixes:

Features:
- Allow specifying command types in FilterCommand

Fixes:
- Fix localization issues
- Fix the IPC server when using a standalone madeline.phar

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

MadelineProto | Official 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());
}
}

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta101)!

After introducing plugins », bound methods », filters », a built-in cron system », IPC support for the event handler » and automatic static analysis for event handler code » in beta100, beta101 brings some bugfixes and the getDownloadLink function!

getDownloadLink can be used to fetch a direct download link for any file up to 4GB, even using a bot API file ID!

Other features:
- Added an openFileAppendOnly function, that can be used to asynchronously open a file in append-only mode!

Fixes:
- Improved the markdownEscape function!
- Translated even more MadelineProto UI elements!
- Improve the static analyzer.
- Fixed some bugs in simple filters.
- Relax markdown parser.


Here's an example on how to use the new getDownloadLink() function:

<?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');

$fileId = '...'; // bot API file ID

$link = $MadelineProto->getDownloadLink($fileId);


$MessageMedia can be a a media object or even a bot API file ID (files up to 4GB are supported!).

You can also use the new getDownloadLink() bound method:

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());
}
}


In both cases, the download link will be generated automatically if running via web.

The generated download $link will point to your own server, and the link will stream files directly to the browser (no temporary files will be created, 0 disk space will be used).

If running via cli (or if URL rewriting is enabled), an additional step is required, see the documentation for more info.

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

MadelineProto | Official Channel

Here's a more detailed explanation of the most important new features of MadelineProto 8.0.0-beta100!

- Native plugin system

To create a plugin, simply create an event handler that extends PluginEventHandler.

For example, create a plugins/Danogentili/PingPlugin.php file:

<?php declare(strict_types=1);

namespace MadelinePlugin\Danogentili\PingPlugin;

use danog\MadelineProto\PluginEventHandler;
use danog\MadelineProto\EventHandler\Filter\FilterText;
use danog\MadelineProto\EventHandler\Message;
use danog\MadelineProto\EventHandler\SimpleFilter\Incoming;

class PingPlugin extends PluginEventHandler
{
#[FilterCommand('echo')]
public function echoCmd(Incoming & Message $message): void
{
// Contains the arguments of the command
$args = $message->commandArgs;

$message->reply($args[0] ?? '');
}

#[FilterRegex('/.*(mt?proto).*/i')]
public function testRegex(Incoming & Message $message): void
{
$message->reply("Did you mean to write MadelineProto instead of ".$message->matches[1].'?');
}

#[FilterText('ping')]
public function pingCommand(Incoming&Message $message): void
{
$message->reply("Pong");
}
}


And use a plugin base to run all plugins included in the plugins folder.

See the documentation for more info on how to create MadelineProto plugins!

- Message objects with bound methods

Both plugins and normal bots can make use of bound update methods like reply(), delete(), getReply(), getHTML() and simplified properties like chatId, senderId, command, commandArgs and many more, see the documentation for more info!

- Filters

Plugins and bots can now use three different filtering systems, to easily receive only updates satisfying certain conditions (incoming/outgoing, from group, channel, private, from an admin or a specific peer, with an audio/sticker/..., satisfying a certain regex or a certain /command, and much more!), see the documentation for more info!

- Built-in cron system

All event handler methods marked by the Cron attribute are now automatically invoked by MadelineProto every period seconds:

use danog\MadelineProto\EventHandler\Attributes\Cron;

class MyEventHandler extends SimpleEventHandler
{
/**
* This cron function will be executed forever, every 60 seconds.
*/
#[Cron(period: 60.0)]
public function cron1(): void
{
$this->sendMessageToAdmins("The bot is online, current time ".date(DATE_RFC850)."!");
}
}


See the documentation for more info!

- IPC support for the event handler

You can now call event handler and plugin methods from outside of the event handler, using getEventHandler() on an API instance, see the docs for more info!

- Automatic static analysis of event handler code

Finally, all new bots and plugins will be automatically analyzed by MadelineProto, blocking execution if performance or security issues are detected!

See the documentation for info!

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

MadelineProto | Official Channel

Verification emails for weblate should now be sent correctly!

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

MadelineProto | Official Channel

MadelineProto can now be translated in your language!

Just head over to https://weblate.madelineproto.xyz/projects/madelineproto/madelineproto/ to start localizing MadelineProto's UI and TUI strings :D

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta97)!

Features:
- Added support for automatic QR code login both via CLI and via web with start()!
- Added a new QR code login API!
- restart() can now be used to restart the IPC daemon (useful in order to apply updates after running composer update)

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta94)!

Fixes:
- Fixed call aggregation syntax. Will introduce a PHP 8 named arguments version of this syntax in future versions.

Features:
- The docker image now uses libuv instead of the libev/libeio event loop drivers: libuv is the same event loop library used by V8/Node.js!
- The image now also includes the ext-memprof extension for optional memory profiling.

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

MadelineProto | Official Channel

Fixed a small issue with the broadcast API that may be triggered when serializing the session in beta90!

Run composer update to update to the latest version if you're using composer, otherwise run docker compose restart if you're using the phar version in docker to restart the daemon.

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

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

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.

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

MadelineProto | Official Channel

Update: fixed a small issue with getDownloadLink with bot api file ids (up to 4gb) and quality selections of photos, run composer update to get the latest version (8.0.0-beta102)!

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

MadelineProto | Official Channel

Coming up next, even more abstracted media methods, keyboard builders, a new web UI, MadelineProto in the browser with WASM, a getDownloadLink method and much more!

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

MadelineProto | Official Channel

Introducing MadelineProto's biggest update yet, 8.0.0-beta100!

This version introduces plugins », bound methods », filters », a built-in cron system », IPC support for the event handler » and automatic static analysis for event handler code ».

See the following post for examples!

Other features:
- Thanks to the many translation contributors @ https://weblate.madelineproto.xyz/, MadelineProto is now localized in Hebrew, Persian, Kurdish, Uzbek, Russian, French and Italian!
- Added simplified sendMessage, sendDocument, sendPhoto methods that return abstract Message objects with simplified properties and bound methods!
- You can now use Tools::callFork to fork a new green thread!
- You can now automatically pin messages broadcasted using broadcastMessages, broadcastForwardMessages by using the new pin: true parameter!
- You can now use sendMessageToAdmins to send messages to the bot's admin (the peers returned by getReportPeers).
- Added wrapUpdate, wrapMessage, wrapMedia methods to wrap low-level MTProto updates into an abstracted Message object with bound methods!
- The waveform attribute of Voice objects is now automatically encoded and decoded to an array of 100 integer values!
- Added a custom PeerNotInDbException class for "This peer is not present in the internal peer database" errors
- Added a label property to the Button class, directly indicating the button label (instead of manually fetching it as an array key).
- Added isForum method to check whether a given supergroup is a forum
- Added an entitiesToHtml method to convert a message and a set of Telegram entities to an HTML string!
- You can now use reportMemoryProfile() to generate and send a pprof memory profile to all report peers to debug the causes of high memory usage.
- Added support for pay, loginurl, webapp and tg://user?id= buttons in bot API syntax!
- Added a getAdminIds function that returns the IDs of the admin of the bot (equal to the peers returned by getReportPeers in the event handler).
- Added a new ParseMode enum!
- Added support for HTML lists in parseMode!
- Fixed parsing of markdown code blocks!

Breaking changes:
- Switched to a custom markdown parser with bot API MarkdownV2 syntax, which differs from the previous Markdown syntax supported by parsedown.
- Markdown text can't contain HTML anymore.

Fixes:
- Fixed file uploads with ext-uv!
- Fixed file re-uploads!
- Improve background broadcasting with the broadcast API using a pre-defined list of whitelist IDs!
- Fixed a bug that caused updates to get paused if an exception is thrown during onStart.
- Broadcast IDs are now unique across multiple broadcasts, even if previous broadcasts already completed their ID will never be re-used.
- Now uploadMedia, sendMedia and upload can upload files from string buffers created using ReadableBuffer.
- Reduced memory usage during flood waits by tweaking config defaults.
- Reduced memory usage by clearing the min database automatically as needed.
- Automatically try caching all dialogs if a peer not found error is about to be thrown.
- Fixed some issues with pure phar installs.
- Fixed splitting of HTML and markdown messages
- Fixed formatting of multiline markdown codeblocks
- And many other performance improvements and bugfixes!

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

MadelineProto | Official Channel

While I'm preparing the biggest MadelineProto update yet for beta100 (with plugins, filters, attributes and much more!), check out the new FAQ section of the MadelineProto docs: https://docs.madelineproto.xyz/docs/FAQ.html

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

MadelineProto | Official Channel

Fixed a few issues in 8.0.0-beta98.

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

MadelineProto | Official Channel

MadelineProto was updated (8.0.0-beta95)!

Fixes:
- Improved self-restart logic on some webhosts
- Fixed redis driver

Also, I've updated the official docker image documentation to include detailed instructions on how to use mysql, postgres and redis with the official MadelineProto image!

I've also included a detailed example on how to use the official MadelineProto docker image via web with automatic HTTPS thanks to the caddy webserver!

I heavily recommend you use the official docker image instead of aapanel/cpanel/apache.

See here for more info: https://docs.madelineproto.xyz/docs/DOCKER.html

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

MadelineProto | Official Channel

Fixed an issue caused by a migration of the backend for the madeline.php alpha channel.

As usual, a warning: NEVER use this install method in production.
The madeline.php install script is as an alpha-level distribution channel for MadelineProto with frequent breaking changes distributed with automatic updates.
If you require a stable, semantically versioned install of MadelineProto with no automatic updates, please install MadelineProto using composer », or by downloading the phar file from the latest release.

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

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.

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