Skip to content
Snippets Groups Projects
Verified Commit 246a6d35 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix mass redaction /command

parent 5abd4bb0
No related branches found
No related tags found
No related merge requests found
......@@ -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]() {
this->redactEvent(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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment