Fix button callback event registration, release notes handler, and menu navigation

This commit is contained in:
Antigravity Bot
2026-08-30 01:09:59 +03:30
parent 93da699a0f
commit 73035f8c19
6 changed files with 68 additions and 32 deletions
+1
View File
@@ -18,6 +18,7 @@ async def _cleanup(repo):
await conn.execute("DELETE FROM posts WHERE source_channel_id = $1;", SRC)
await conn.execute("DELETE FROM sources WHERE channel_id = $1;", SRC)
await conn.execute("DELETE FROM targets WHERE channel_id = $1;", TRG)
await conn.execute("DELETE FROM channel_categories;")
def button_data(rows):
+1 -1
View File
@@ -17,7 +17,7 @@ class FakeQueue:
async def get_target_queue_size(self, target_id):
return len(self.items)
async def pop_target_post(self, target_id):
async def pop_target_post(self, target_id, dispatch_order="order"):
return self.items.pop(0) if self.items else None
async def push_target_post(self, target_id, payload):
+1 -1
View File
@@ -90,7 +90,7 @@ async def run_tests():
assert progress[-1].startswith(""), f"repeat scrape must be explained: {progress[-1]}"
assert "قبلا ذخیره شده" in progress[-1]
stored = await repo.get_posts_by_status("pending_review", limit=100)
stored = await repo.get_posts_by_status("pending_review", limit=5000)
mine = [p for p in stored if p.source_channel_id == SOURCE_ID]
assert len(mine) == 21, f"expected 21 stored posts, got {len(mine)}"