Strict typing for system messages; add a way to rename group.
This commit is contained in:
@@ -56,8 +56,7 @@ pub async fn req(user: User, target: Ref, member: Ref) -> Result<()> {
|
||||
Message::create(
|
||||
"00000000000000000000000000".to_string(),
|
||||
id.clone(),
|
||||
// ! FIXME: make a schema for this
|
||||
format!("{{\"type\":\"user_remove\",\"id\":\"{}\",\"by\":\"{}\"}}", member.id, user.id),
|
||||
Content::SystemMessage(SystemMessage::UserRemove { id: member.id, by: user.id })
|
||||
)
|
||||
.publish(&channel)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user