blob: 6505acea636d20efb81ab77b2553923f35c0f333 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only
use std::str::from_utf8;
use crate::server::cmd::commands::text::structure::Text;
pub fn parse_text(data: Vec<u8>, username: &str) -> Text {
Text {
sender: username.to_string(),
content: from_utf8(&data[6..]).unwrap().to_string(),
}
}
|