Compare commits
2
Commits
20251020-2
...
20251022-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5eb48450b | ||
|
|
6ba48a0197 |
No files matched your search
@@ -295,7 +295,9 @@ pub enum EventV1 {
|
|||||||
},
|
},
|
||||||
UserMoveVoiceChannel {
|
UserMoveVoiceChannel {
|
||||||
node: String,
|
node: String,
|
||||||
token: String
|
from: String,
|
||||||
|
to: String,
|
||||||
|
token: String,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ struct MigrationInfo {
|
|||||||
revision: i32,
|
revision: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const LATEST_REVISION: i32 = 48; // MUST BE +1 to last migration
|
pub const LATEST_REVISION: i32 = 49; // MUST BE +1 to last migration
|
||||||
|
|
||||||
pub async fn migrate_database(db: &MongoDb) {
|
pub async fn migrate_database(db: &MongoDb) {
|
||||||
let migrations = db.col::<Document>("migrations");
|
let migrations = db.col::<Document>("migrations");
|
||||||
@@ -1246,8 +1246,8 @@ pub async fn run_migrations(db: &MongoDb, revision: i32) -> i32 {
|
|||||||
.expect("Failed to update voice channels");
|
.expect("Failed to update voice channels");
|
||||||
};
|
};
|
||||||
|
|
||||||
if revision <= 47 {
|
if revision <= 48 {
|
||||||
info!("Running migration [revision 47 / 29-04-2025]: Add Video to default permissions");
|
info!("Running migration [revision 48 / 22-10-2025]: Add Video + Listen to default permissions");
|
||||||
|
|
||||||
db.col::<Document>("servers")
|
db.col::<Document>("servers")
|
||||||
.update_many(
|
.update_many(
|
||||||
@@ -1255,7 +1255,7 @@ pub async fn run_migrations(db: &MongoDb, revision: i32) -> i32 {
|
|||||||
doc! {
|
doc! {
|
||||||
"$bit": {
|
"$bit": {
|
||||||
"default_permissions": {
|
"default_permissions": {
|
||||||
"or": ChannelPermission::Video as i64
|
"or": (ChannelPermission::Video + ChannelPermission::Speak + ChannelPermission::Listen) as i64
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,6 +217,8 @@ pub async fn edit(
|
|||||||
|
|
||||||
EventV1::UserMoveVoiceChannel {
|
EventV1::UserMoveVoiceChannel {
|
||||||
node: new_node,
|
node: new_node,
|
||||||
|
from: old_voice_channel.id().to_string(),
|
||||||
|
to: new_voice_channel.id().to_string(),
|
||||||
token,
|
token,
|
||||||
}
|
}
|
||||||
.p_user(target_user.id.clone(), db)
|
.p_user(target_user.id.clone(), db)
|
||||||
|
|||||||
Reference in new issue
Block a user