fix(client): hopefully fix random MEDIA_EMPTY errors when editing inline
This commit is contained in:
parent
715f4f8a68
commit
2c54751029
1 changed files with 24 additions and 12 deletions
|
@ -97,6 +97,9 @@ export async function editInlineMessage(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let retries = 3
|
||||||
|
while (retries--) {
|
||||||
|
try {
|
||||||
await this.call(
|
await this.call(
|
||||||
{
|
{
|
||||||
_: 'messages.editInlineBotMessage',
|
_: 'messages.editInlineBotMessage',
|
||||||
|
@ -109,4 +112,13 @@ export async function editInlineMessage(
|
||||||
},
|
},
|
||||||
{ connection }
|
{ connection }
|
||||||
)
|
)
|
||||||
|
return
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof tl.errors.MediaEmptyError) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue