Skip to content

Commit

Permalink
fix: wrong references in qr button
Browse files Browse the repository at this point in the history
  • Loading branch information
JamzumSum committed Nov 8, 2023
1 parent 96a74d2 commit 52fda25
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 29 deletions.
2 changes: 0 additions & 2 deletions config/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ qzone:
block: [2333, 1234]
block_self: false
qr_config:
min_login_interval: 86400
max_refresh_times: 6
poll_freq: 3.0
up_config:
min_login_interval: 1800
vcode_timeout: 60

bot:
Expand Down
44 changes: 22 additions & 22 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "Qzone3TG"
version = "0.9.3.dev1"
version = "0.9.3.dev2"
description = "Forward Qzone feeds to telegram."
authors = ["aioqzone <zzzzss990315@gmail.com>"]
readme = "README.md"
Expand Down
3 changes: 1 addition & 2 deletions src/qzone3tg/app/interact/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ async def up_login(self, message: Message, command: CommandObject):
await self.login.up.new_cookie()

async def qr_login(self, message: Message, command: CommandObject):
async with ChatActionSender.upload_photo(self.admin, self.bot):
await self.login.qr.new_cookie()
await self.login.qr.new_cookie()

async def like(self, message: Message, command: CommandObject):
assert message
Expand Down
4 changes: 2 additions & 2 deletions src/qzone3tg/app/interact/_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ async def like_trans(likedata: LikeData | None) -> bool:
async def btn_qr(self: InteractApp, query: CallbackQuery, callback_data: SerialCbData):
match callback_data.sub_command:
case "refresh":
self._qrlogin.refresh_qr.set()
self.login.qr.refresh_qr.set()
case "cancel":
self._qrlogin.cancel_qr.set()
self.login.qr.cancel_qr.set()
case _:
self.log.warning(f"Unexpected qr button callback: {query.data}")
if query.message:
Expand Down

0 comments on commit 52fda25

Please sign in to comment.