feat: QR-Code für alle Kanäle (contact_id in ConversationResponse)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user