habulaj commited on
Commit
0305b83
·
verified ·
1 Parent(s): 9364a1e

Update routes/support.py

Browse files
Files changed (1) hide show
  1. routes/support.py +4 -0
routes/support.py CHANGED
@@ -141,6 +141,10 @@ async def get_user_tickets(
141
  if last_msg["user"] != user_id:
142
  status = "Answered"
143
  else:
 
 
 
 
144
  last_msg_time = format_datetime(last_msg["created_at"])
145
  history.append(f"Last updated on {last_msg_time}")
146
 
 
141
  if last_msg["user"] != user_id:
142
  status = "Answered"
143
  else:
144
+ status = "Open" # já está por padrão, mas pode ser útil explicitar
145
+
146
+ if len(all_messages) > 1:
147
+ # Sempre adicionar o last updated se houver mais de uma mensagem
148
  last_msg_time = format_datetime(last_msg["created_at"])
149
  history.append(f"Last updated on {last_msg_time}")
150