aboutsummaryrefslogtreecommitdiff
path: root/src/server/cmd/commands/room/parse.rs
blob: 70bd0a82573bbe4e50cd442d201546000e7ce8fb (plain) (blame)
1
2
3
4
5
6
7
8
// Copyleft 2021-2021 Whirlsplash
// 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()
}