mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:38:59 +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.
|
* 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
|
* @return DialogSetTTL
|
||||||
*/
|
*/
|
||||||
public function enableTTL(int $seconds = 86400): DialogSetTTL
|
public function enableTTL(int $seconds = 86400): DialogSetTTL
|
||||||
{
|
{
|
||||||
Assert::false($seconds === 0);
|
Assert::false($seconds <= 0);
|
||||||
$client = $this->getClient();
|
$client = $this->getClient();
|
||||||
$result = $client->methodCallAsyncRead(
|
$result = $client->methodCallAsyncRead(
|
||||||
'messages.setHistoryTTL',
|
'messages.setHistoryTTL',
|
||||||
|
Loading…
Reference in New Issue
Block a user