fix: correct syntax error from suggestion application
The individual line suggestions created invalid Python when applied separately. Combined the ternary expression properly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
182e3684dd
commit
aabe9d8bc0
1 changed files with 5 additions and 3 deletions
8
main.py
8
main.py
|
|
@ -943,9 +943,11 @@ async def list_chats(chat_type: str = None, limit: int = 20) -> str:
|
||||||
unread_count = getattr(dialog, "unread_count", 0) or 0
|
unread_count = getattr(dialog, "unread_count", 0) or 0
|
||||||
# Also check unread_mark (manual "mark as unread" flag)
|
# Also check unread_mark (manual "mark as unread" flag)
|
||||||
inner_dialog = getattr(dialog, "dialog", None)
|
inner_dialog = getattr(dialog, "dialog", None)
|
||||||
unread_mark = bool(
|
unread_mark = (
|
||||||
getattr(inner_dialog, "unread_mark", False))
|
bool(getattr(inner_dialog, "unread_mark", False))
|
||||||
if inner_dialog else False
|
if inner_dialog
|
||||||
|
else False
|
||||||
|
)
|
||||||
|
|
||||||
if unread_count > 0:
|
if unread_count > 0:
|
||||||
chat_info += f", Unread: {unread_count}"
|
chat_info += f", Unread: {unread_count}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue