| 50 | } |
| 51 | |
| 52 | void SelfDestruct::updateAccountTTL(int days) { |
| 53 | _api.request(_accountTTL.requestId).cancel(); |
| 54 | _accountTTL.requestId = _api.request(MTPaccount_SetAccountTTL( |
| 55 | MTP_accountDaysTTL(MTP_int(days)) |
| 56 | )).done([=] { |
| 57 | _accountTTL.requestId = 0; |
| 58 | }).fail([=] { |
| 59 | _accountTTL.requestId = 0; |
| 60 | }).send(); |
| 61 | _accountTTL.days = days; |
| 62 | } |
| 63 | |
| 64 | void SelfDestruct::updateDefaultHistoryTTL(TimeId period) { |
| 65 | _api.request(_defaultHistoryTTL.requestId).cancel(); |