1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:19:00 +01:00

Update enableTTL method

This commit is contained in:
AhJ 2023-09-25 23:00:32 +03:30 committed by GitHub
parent d7d67eaea0
commit e5a18d9bb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,12 +347,13 @@ abstract class AbstractMessage extends Update implements SimpleFilters
/**
* Set maximum Time-To-Live of all messages in the specified chat.
*
* @param integer $seconds Automatically delete all messages sent in the chat after this many seconds
* @param positive-integer $seconds Automatically delete all messages sent in the chat after this many seconds
* @throws InvalidArgumentException
* @return DialogSetTTL
*/
public function enableTTL(int $seconds = 86400): DialogSetTTL
{
Assert::false($seconds === 0);
Assert::false($seconds <= 0);
$client = $this->getClient();
$result = $client->methodCallAsyncRead(
'messages.setHistoryTTL',