fix(client): hopefully fix random MEDIA_EMPTY errors when editing inline

This commit is contained in:
teidesu 2022-07-10 01:38:23 +03:00
parent 715f4f8a68
commit 2c54751029

View file

@ -97,6 +97,9 @@ export async function editInlineMessage(
)
}
let retries = 3
while (retries--) {
try {
await this.call(
{
_: 'messages.editInlineBotMessage',
@ -109,4 +112,13 @@ export async function editInlineMessage(
},
{ connection }
)
return
} catch (e) {
if (e instanceof tl.errors.MediaEmptyError) {
continue
}
throw e
}
}
}