Replace Promise.delay with promise utils sleep
This commit is contained in:
parent
6850c14739
commit
0a21957b2c
4 changed files with 13 additions and 9 deletions
|
@ -25,6 +25,7 @@ import Analytics from "../../../../../Analytics";
|
|||
import Promise from "bluebird";
|
||||
import Modal from "../../../../../Modal";
|
||||
import sdk from "../../../../..";
|
||||
import {sleep} from "../../../../../utils/promise";
|
||||
|
||||
export class IgnoredUser extends React.Component {
|
||||
static propTypes = {
|
||||
|
@ -129,7 +130,7 @@ export default class SecurityUserSettingsTab extends React.Component {
|
|||
if (e.errcode === "M_LIMIT_EXCEEDED") {
|
||||
// Add a delay between each invite change in order to avoid rate
|
||||
// limiting by the server.
|
||||
await Promise.delay(e.retry_after_ms || 2500);
|
||||
await sleep(e.retry_after_ms || 2500);
|
||||
|
||||
// Redo last action
|
||||
i--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue