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,16 +97,28 @@ export async function editInlineMessage(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.call(
|
let retries = 3
|
||||||
{
|
while (retries--) {
|
||||||
_: 'messages.editInlineBotMessage',
|
try {
|
||||||
id,
|
await this.call(
|
||||||
noWebpage: params.disableWebPreview,
|
{
|
||||||
replyMarkup: BotKeyboard._convertToTl(params.replyMarkup),
|
_: 'messages.editInlineBotMessage',
|
||||||
message: content,
|
id,
|
||||||
entities,
|
noWebpage: params.disableWebPreview,
|
||||||
media,
|
replyMarkup: BotKeyboard._convertToTl(params.replyMarkup),
|
||||||
},
|
message: content,
|
||||||
{ connection }
|
entities,
|
||||||
)
|
media,
|
||||||
|
},
|
||||||
|
{ connection }
|
||||||
|
)
|
||||||
|
return
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof tl.errors.MediaEmptyError) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue