mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 05:57:21 -05:00
Use timezone-aware timestamps and update tests
This commit is contained in:
@@ -10,6 +10,7 @@ from app.database import get_db
|
||||
from app.models.user import User
|
||||
from app.models.ai_chat import Conversation, Message, MessageRole
|
||||
from app.auth import get_current_active_user
|
||||
from app.utils import utc_now
|
||||
|
||||
router = APIRouter(prefix="/api/ai-chat", tags=["AI Chat"])
|
||||
|
||||
@@ -188,7 +189,7 @@ async def send_message(
|
||||
|
||||
# Update conversation
|
||||
conversation.message_count += 2
|
||||
conversation.updated_at = datetime.utcnow()
|
||||
conversation.updated_at = utc_now()
|
||||
|
||||
if not conversation.title or conversation.title == "New Conversation":
|
||||
# Auto-generate title from first message
|
||||
|
||||
Reference in New Issue
Block a user