Servers: Add TextChannel.

This commit is contained in:
Paul committed 2021-06-01 20:38:35 +01:00
1 parent 6bb4501c52
commit 46bf5fcdd1
6 files changed
+45 -3

No files matched your search

+12 -1
View File
@@ -39,13 +39,24 @@ pub async fn req(user: User, info: Json<Data>) -> Result<JsonValue> {
}
let id = Ulid::new().to_string();
let cid = Ulid::new().to_string();
Channel::TextChannel {
id: cid.clone(),
server: id.clone(),
nonce: Some(info.nonce.clone()),
name: "general".to_string(),
description: None,
icon: None,
}.publish().await?;
let server = Server {
id: id.clone(),
nonce: Some(info.nonce.clone()),
owner: user.id.clone(),
name: info.name.clone(),
channels: vec![],
channels: vec![ cid ],
icon: None,
banner: None,