aboutsummaryrefslogtreecommitdiff
path: root/src/server/cmd/commands/room/parse.rs
blob: 79ec8afe56f926139b82183eb55204542ca41f8a (plain) (blame)
1
2
3
4
5
6
7
8
// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only

use std::str::from_utf8;

pub fn parse_room_id_request(data: Vec<u8>) -> String {
  from_utf8(&data[4..data[0] as usize]).unwrap().to_string()
}