1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-07-10 01:22:48 +00:00

Can update following status of a conversation

This commit is contained in:
2020-06-15 08:23:23 +02:00
parent fad9300771
commit b15a09cf07
3 changed files with 103 additions and 2 deletions

@ -66,7 +66,14 @@ pub fn update_settings(r: &mut HttpRequestHandler) -> RequestResult {
let conv_id = r.post_conv_id("conversationID")?;
let is_moderator = conversations_helper::is_user_moderator(r.user_id()?, conv_id)?;
println!("conv id: {} / is moderator: {}", conv_id, is_moderator);
// Update following state, if required
if r.has_post_parameter("following") {
conversations_helper::set_following(
r.user_id()?,
conv_id,
r.post_bool("following")?
)?;
}
r.success("implement it")
r.success("Conversation information successfully updated!")
}