mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-23 19:05:16 +02:00
fix: critical timestamp parsing and audit fixes
- Fix timestamp conversion: String(epochMs) → new Date(epochMs).toISOString() in use-messages-sync, use-comments-sync, use-documents, use-inbox. Without this, date comparisons (isEdited, cutoff filters) would fail. - Fix updated_at: undefined → null in use-inbox to match InboxItem type - Fix ZeroProvider: skip Zero connection for unauthenticated users - Clean 30+ stale "Electric SQL" comments in backend Python code
This commit is contained in:
parent
f04ab89418
commit
cf21eaacfc
33 changed files with 62 additions and 57 deletions
|
|
@ -456,7 +456,7 @@ async def create_comment(
|
|||
thread = message.thread
|
||||
comment = ChatComment(
|
||||
message_id=message_id,
|
||||
thread_id=thread.id, # Denormalized for efficient Electric subscriptions
|
||||
thread_id=thread.id, # Denormalized for efficient per-thread sync
|
||||
author_id=user.id,
|
||||
content=content,
|
||||
)
|
||||
|
|
@ -569,7 +569,7 @@ async def create_reply(
|
|||
thread = parent_comment.message.thread
|
||||
reply = ChatComment(
|
||||
message_id=parent_comment.message_id,
|
||||
thread_id=thread.id, # Denormalized for efficient Electric subscriptions
|
||||
thread_id=thread.id, # Denormalized for efficient per-thread sync
|
||||
parent_id=comment_id,
|
||||
author_id=user.id,
|
||||
content=content,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
"""Service for creating and managing notifications with Electric SQL sync."""
|
||||
"""Service for creating and managing notifications with Zero sync."""
|
||||
|
||||
import logging
|
||||
from datetime import UTC, datetime
|
||||
|
|
@ -1045,7 +1045,7 @@ class PageLimitNotificationHandler(BaseNotificationHandler):
|
|||
|
||||
|
||||
class NotificationService:
|
||||
"""Service for creating and managing notifications that sync via Electric SQL."""
|
||||
"""Service for creating and managing notifications that sync via Zero."""
|
||||
|
||||
# Handler instances
|
||||
connector_indexing = ConnectorIndexingNotificationHandler()
|
||||
|
|
@ -1065,7 +1065,7 @@ class NotificationService:
|
|||
notification_metadata: dict[str, Any] | None = None,
|
||||
) -> Notification:
|
||||
"""
|
||||
Create a notification - Electric SQL will automatically sync it to frontend.
|
||||
Create a notification - Zero will automatically sync it to frontend.
|
||||
|
||||
Args:
|
||||
session: Database session
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue