Block voice calls in saved messages channel.

Add messages for desc / icon change for group chats.
This commit is contained in:
Paul
2021-05-14 22:44:35 +01:00
parent 6716a2d32b
commit 10f116b4a3
3 changed files with 28 additions and 2 deletions

View File

@@ -111,7 +111,29 @@ pub async fn req(user: User, target: Ref, data: Json<Data>) -> Result<()> {
Message::create(
"00000000000000000000000000".to_string(),
id.clone(),
Content::SystemMessage(SystemMessage::ChannelRenamed { name, by: user.id }),
Content::SystemMessage(SystemMessage::ChannelRenamed { name, by: user.id.clone() }),
)
.publish(&target)
.await
.ok();
}
if let Some(_) = data.description {
Message::create(
"00000000000000000000000000".to_string(),
id.clone(),
Content::SystemMessage(SystemMessage::ChannelDescriptionChanged { by: user.id.clone() }),
)
.publish(&target)
.await
.ok();
}
if let Some(_) = data.icon {
Message::create(
"00000000000000000000000000".to_string(),
id.clone(),
Content::SystemMessage(SystemMessage::ChannelIconChanged { by: user.id }),
)
.publish(&target)
.await