[+] backup bugfix

pull/156/head
ZetGo | Aleksej K. 2025-06-16 14:15:27 +03:00 committed by GitHub
parent bde62d52d9
commit 238df7552a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -227,11 +227,11 @@ class HerokuBackupMod(loader.Module):
with modzip.open(name, "r") as module: with modzip.open(name, "r") as module:
path.write_bytes(module.read()) path.write_bytes(module.read())
await call.answer(self.strings("all_restored"), show_alert=True) await self.inline.bot(call.answer(self.strings("all_restored"), show_alert=True))
await self.invoke("restart", "-f", peer=call.message.peer_id) await self.invoke("restart", "-f", peer=call.message.peer_id)
except Exception: except Exception:
logger.exception("Restore from backupall failed") logger.exception("Restore from backupall failed")
await call.answer(self.strings("reply_to_file"), show_alert=True) await self.inline.bot(call.answer(self.strings("reply_to_file"), show_alert=True))
def _convert(self, backup): def _convert(self, backup):
fixed = re.sub(r'(hikka\.)(\S+\":)', lambda m: 'heroku.' + m.group(2), backup) fixed = re.sub(r'(hikka\.)(\S+\":)', lambda m: 'heroku.' + m.group(2), backup)
@ -481,4 +481,4 @@ class HerokuBackupMod(loader.Module):
return return
await utils.answer(message, self.strings["all_restored"]) await utils.answer(message, self.strings["all_restored"])
await self.invoke("restart", "-f", peer=message.peer_id) await self.invoke("restart", "-f", peer=message.peer_id)