BinaryONe
commited on
Commit
·
9fdad73
1
Parent(s):
8d71270
Changes in Database
Browse files
FileStream/Database/database.py
CHANGED
@@ -286,6 +286,11 @@ class Database:
|
|
286 |
{"$set": {
|
287 |
"file_ids": file_ids
|
288 |
}})
|
|
|
|
|
|
|
|
|
|
|
289 |
else:
|
290 |
return None
|
291 |
|
@@ -307,7 +312,13 @@ class Database:
|
|
307 |
}
|
308 |
})
|
309 |
else:
|
310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
|
312 |
|
313 |
|
|
|
286 |
{"$set": {
|
287 |
"file_ids": file_ids
|
288 |
}})
|
289 |
+
elif privacy_type=="PRIVATE":
|
290 |
+
await self.tfiles.update_one({"_id": ObjectId(_id)},
|
291 |
+
{"$set": {
|
292 |
+
"file_ids": file_ids
|
293 |
+
}})
|
294 |
else:
|
295 |
return None
|
296 |
|
|
|
312 |
}
|
313 |
})
|
314 |
else:
|
315 |
+
await self.tfiles.update_one({"_id": ObjectId(_id)}, {
|
316 |
+
"$set": {
|
317 |
+
"message_id": file_info['message_id'],
|
318 |
+
"location": file_info['location'],
|
319 |
+
"file": file_info['file']
|
320 |
+
}
|
321 |
+
})
|
322 |
|
323 |
|
324 |
|