Update UI and migrations, fix dockerfile

This commit is contained in:
Your Name
2026-07-18 21:29:05 +05:00
parent 580c75cbf6
commit 26ef145ccf
95 changed files with 9541 additions and 111 deletions
+14
View File
@@ -155,6 +155,20 @@ class VKAPIClient:
raise VKAPIError(None, f"photos.saveWallPhoto returned invalid response: {json.dumps(saved)[:300]}")
return saved[0]
async def upload_wall_photo_url(self, group_id: int, url: str) -> dict:
if not self.session:
raise RuntimeError("VKAPIClient is not initialized")
async with self.session.get(url) as resp:
resp.raise_for_status()
content_type = resp.headers.get("content-type") or "image/jpeg"
data = await resp.read()
suffix = ".jpg"
if "png" in content_type:
suffix = ".png"
elif "webp" in content_type:
suffix = ".webp"
return await self.upload_wall_photo_bytes(group_id, data, filename=f"photo{suffix}")
async def create_wall_post(
self,
owner_id: int,