mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Fix bot logon, should do nested match.
Add comment to migrations. Fix attachment deletes on messages.
This commit is contained in:
@@ -467,7 +467,7 @@ impl Message {
|
||||
let attachment_ids: Vec<String> =
|
||||
attachments.iter().map(|f| f.id.to_string()).collect();
|
||||
get_collection("attachments")
|
||||
.update_one(
|
||||
.update_many(
|
||||
doc! {
|
||||
"_id": {
|
||||
"$in": attachment_ids
|
||||
@@ -482,7 +482,7 @@ impl Message {
|
||||
)
|
||||
.await
|
||||
.map_err(|_| Error::DatabaseError {
|
||||
operation: "update_one",
|
||||
operation: "update_many",
|
||||
with: "attachment",
|
||||
})?;
|
||||
}
|
||||
|
||||
@@ -284,6 +284,8 @@ pub async fn run_migrations(revision: i32) -> i32 {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
// Need to migrate fields on attachments, change `user_id`, `object_id`, etc to `parent`.
|
||||
|
||||
// Reminder to update LATEST_REVISION when adding new migrations.
|
||||
LATEST_REVISION
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user