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:
parent
d7d67eaea0
commit
e5a18d9bb7
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user