(20241212) Day-end push.
This commit is contained in:
@@ -144,7 +144,8 @@ class MessageController(BaseModel):
|
||||
|
||||
return await mongo_conn.bulk_write(
|
||||
collection = self.MESSAGES_COLLECTION,
|
||||
requests = mongo_operations
|
||||
requests = mongo_operations,
|
||||
raise_exception = True
|
||||
)
|
||||
|
||||
# ┏┓┳┓┳┳┳┓ ┳┓ •
|
||||
@@ -222,6 +223,7 @@ class MessageController(BaseModel):
|
||||
projection = {
|
||||
"_id": True,
|
||||
"ts": True,
|
||||
"tokenId": True,
|
||||
"markedAsUnread": True,
|
||||
"serviceType": True,
|
||||
"client": True,
|
||||
@@ -232,7 +234,6 @@ class MessageController(BaseModel):
|
||||
"sentSuccessfully": True,
|
||||
"aiSnippet": True,
|
||||
"preview": True,
|
||||
"message": {},
|
||||
"tags": True,
|
||||
"usedAi": True
|
||||
},
|
||||
@@ -240,6 +241,7 @@ class MessageController(BaseModel):
|
||||
)
|
||||
|
||||
# Convert the fetched records to instances of the data model and return:
|
||||
for record in records: record["message"] = {}
|
||||
return [CoreMessageModel(**record) for record in records]
|
||||
|
||||
async def get_messages(
|
||||
|
||||
Reference in New Issue
Block a user