feat: QR-Code für alle Kanäle (contact_id in ConversationResponse)

This commit is contained in:
2026-03-17 15:19:40 +01:00
parent 7c237836e8
commit 28d3b36b78
3 changed files with 9 additions and 10 deletions

View File

@@ -289,17 +289,14 @@ class MainScreen(Screen):
asyncio.create_task(self._generate_telegram_qr())
async def _generate_telegram_qr(self) -> None:
if not self._current_conv:
if not self._current_conv_id:
self.notify("Bitte erst eine Konversation auswählen.", severity="warning")
return
conv = self._current_conv
if conv.get("channel") != "telegram":
self.notify("QR-Code nur für Telegram-Konversationen.", severity="warning")
return
conv = self._current_conv or {}
contact_id = conv.get("contact_id")
if not contact_id:
try:
details = await self._api.get_conversation(conv["id"])
details = await self._api.get_conversation(self._current_conv_id)
contact_id = (details or {}).get("contact_id")
except Exception:
pass