Skip to content

Commit

Permalink
Return Vortex version in Authenticate reply
Browse files Browse the repository at this point in the history
  • Loading branch information
fatalerrorcoded committed Oct 6, 2021
1 parent 0712a64 commit 8f11036
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/info.rs
Original file line number Diff line number Diff line change
@@ -1,6 1,8 @@
use crate::util::variables;
use serde::Serialize;

pub static VORTEX_VERSION: &'static str = env!("CARGO_PKG_VERSION");

#[derive(Serialize)]
pub struct Info {
vortex: &'static str,
Expand All @@ -19,7 21,7 @@ pub fn get_info() -> Info {
};

Info {
vortex: env!("CARGO_PKG_VERSION"),
vortex: VORTEX_VERSION,
features,
ws: &variables::WS_URL,
}
Expand Down
1 change: 1 addition & 0 deletions src/ws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 64,7 @@ async fn handle(
ws_sink
.send(
WSReplyType::Authenticate {
vortex_version: crate::info::VORTEX_VERSION,
user_id: id.clone(),
room_id: room.id().to_string(),
rtp_capabilities: room
Expand Down
2 changes: 2 additions & 0 deletions src/ws/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 88,8 @@ pub struct WSReply {
pub enum WSReplyType {
#[serde(rename_all = "camelCase")]
Authenticate {
#[serde(rename = "version")]
vortex_version: &'static str,
user_id: String,
room_id: String,
rtp_capabilities: RtpCapabilitiesFinalized,
Expand Down

0 comments on commit 8f11036

Please sign in to comment.