Bump collab min version (#9521)
We made a change last week to allow creating files with names. This means some files have null saved_mtime, which old versions of zed panic on. A fix is available in 0.126.3 and above Release Notes: - N/A
This commit is contained in:
parent
d8e32c3e3c
commit
0c82585ea2
4 changed files with 13 additions and 21 deletions
|
@ -909,7 +909,7 @@ pub async fn handle_websocket_request(
|
||||||
.into_response();
|
.into_response();
|
||||||
};
|
};
|
||||||
|
|
||||||
if !version.is_supported() {
|
if !version.can_collaborate() {
|
||||||
return (
|
return (
|
||||||
StatusCode::UPGRADE_REQUIRED,
|
StatusCode::UPGRADE_REQUIRED,
|
||||||
"client must be upgraded".to_string(),
|
"client must be upgraded".to_string(),
|
||||||
|
@ -1347,19 +1347,6 @@ async fn set_room_participant_role(
|
||||||
let user_id = UserId::from_proto(request.user_id);
|
let user_id = UserId::from_proto(request.user_id);
|
||||||
let role = ChannelRole::from(request.role());
|
let role = ChannelRole::from(request.role());
|
||||||
|
|
||||||
if role == ChannelRole::Talker {
|
|
||||||
let pool = session.connection_pool().await;
|
|
||||||
|
|
||||||
for connection in pool.user_connections(user_id) {
|
|
||||||
if !connection.zed_version.supports_talker_role() {
|
|
||||||
Err(anyhow!(
|
|
||||||
"This user is on zed {} which does not support unmute",
|
|
||||||
connection.zed_version
|
|
||||||
))?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let (live_kit_room, can_publish) = {
|
let (live_kit_room, can_publish) = {
|
||||||
let room = session
|
let room = session
|
||||||
.db()
|
.db()
|
||||||
|
|
|
@ -4,7 +4,7 @@ use collections::{BTreeMap, HashMap, HashSet};
|
||||||
use rpc::ConnectionId;
|
use rpc::ConnectionId;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use tracing::instrument;
|
use tracing::instrument;
|
||||||
use util::SemanticVersion;
|
use util::{semver, SemanticVersion};
|
||||||
|
|
||||||
#[derive(Default, Serialize)]
|
#[derive(Default, Serialize)]
|
||||||
pub struct ConnectionPool {
|
pub struct ConnectionPool {
|
||||||
|
@ -29,11 +29,8 @@ impl fmt::Display for ZedVersion {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ZedVersion {
|
impl ZedVersion {
|
||||||
pub fn is_supported(&self) -> bool {
|
pub fn can_collaborate(&self) -> bool {
|
||||||
self.0 != SemanticVersion::new(0, 123, 0)
|
self.0 >= semver(0, 127, 3) || (self.0 >= semver(0, 126, 3) && self.0 < semver(0, 127, 0))
|
||||||
}
|
|
||||||
pub fn supports_talker_role(&self) -> bool {
|
|
||||||
self.0 >= SemanticVersion::new(0, 125, 0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,14 @@ pub struct SemanticVersion {
|
||||||
pub patch: usize,
|
pub patch: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn semver(major: usize, minor: usize, patch: usize) -> SemanticVersion {
|
||||||
|
SemanticVersion {
|
||||||
|
major,
|
||||||
|
minor,
|
||||||
|
patch,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl SemanticVersion {
|
impl SemanticVersion {
|
||||||
pub fn new(major: usize, minor: usize, patch: usize) -> Self {
|
pub fn new(major: usize, minor: usize, patch: usize) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub mod test;
|
||||||
use futures::Future;
|
use futures::Future;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use rand::{seq::SliceRandom, Rng};
|
use rand::{seq::SliceRandom, Rng};
|
||||||
pub use semantic_version::SemanticVersion;
|
pub use semantic_version::*;
|
||||||
use std::{
|
use std::{
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
cmp::{self, Ordering},
|
cmp::{self, Ordering},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue