mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix mass redaction /command
This commit is contained in:
parent
5abd4bb07a
commit
246a6d35f5
1 changed files with 6 additions and 3 deletions
|
@ -1490,9 +1490,12 @@ TimelineModel::redactEvent(const QString &id, const QString &reason)
|
|||
[this, id, reason](const mtx::responses::EventId &, mtx::http::RequestErr err) {
|
||||
if (err) {
|
||||
if (err->status_code == 429 && err->matrix_error.retry_after.count() != 0) {
|
||||
QTimer::singleShot(err->matrix_error.retry_after, this, [this, id, reason]() {
|
||||
ChatPage::instance()->callFunctionOnGuiThread(
|
||||
[this, id, reason, interval = err->matrix_error.retry_after] {
|
||||
QTimer::singleShot(interval * 2, this, [this, id, reason]() {
|
||||
this->redactEvent(id, reason);
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
emit redactionFailed(tr("Message redaction failed: %1")
|
||||
|
|
Loading…
Reference in a new issue