1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 16:35:17 +00:00

Can remove conversation image

This commit is contained in:
2021-03-07 15:27:34 +01:00
parent 385a800b7a
commit 466cf1903f
2 changed files with 11 additions and 0 deletions

View File

@ -121,6 +121,16 @@ pub fn change_image(r: &mut HttpRequestHandler) -> RequestResult {
r.ok()
}
/// Delete conversation image
pub fn delete_image(r: &mut HttpRequestHandler) -> RequestResult {
let conv_membership = r.post_conv_admin("convID")?;
let conv = conversations_helper::get_single(conv_membership.conv_id)?;
conversations_helper::remove_conversation_image(&conv)?;
r.ok()
}
/// Add a new member to a conversation
pub fn add_member(r: &mut HttpRequestHandler) -> RequestResult {
let conv_membership = r.post_conv("convID")?;