JSON system messages.

This commit is contained in:
Paul
2021-02-19 14:03:41 +00:00
parent 10cac358a9
commit 5baf85a8e9
3 changed files with 6 additions and 3 deletions

View File

@@ -56,7 +56,8 @@ pub async fn req(user: User, target: Ref, member: Ref) -> Result<()> {
Message::create(
"00000000000000000000000000".to_string(),
id.clone(),
format!("<@{}> removed <@{}> from the group.", user.id, member.id),
// ! FIXME: make a schema for this
format!("{{\"type\":\"user_remove\",\"id\":\"{}\",\"by\":\"{}\"}}", member.id, user.id),
)
.publish(&channel)
.await