refactor(database): update default source values to 'surfsense' for chat threads and messages

This commit is contained in:
Anish Sarkar 2026-05-28 13:11:05 +05:30
parent c958fe5bc6
commit 3faaa25af6
4 changed files with 11 additions and 8 deletions

View file

@ -88,7 +88,10 @@ async def call_agent_for_gateway(
await stream.aclose()
await session.execute(
update(NewChatMessage)
.where(NewChatMessage.thread_id == thread.id, NewChatMessage.source == "web")
.where(
NewChatMessage.thread_id == thread.id,
NewChatMessage.source == "surfsense",
)
.values(source="telegram")
)
await session.commit()