mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 08:25:16 +00:00
Can set conversation image
This commit is contained in:
@ -615,6 +615,18 @@ pub trait BaseRequestHandler {
|
||||
Ok(membership)
|
||||
}
|
||||
|
||||
/// Get information about a conversation included in the request. The user must be an admin
|
||||
/// of the target conversation
|
||||
fn post_conv_admin(&mut self, name: &str) -> ResultBoxError<ConversationMember> {
|
||||
let conv = self.post_conv(name)?;
|
||||
|
||||
if !conv.is_admin {
|
||||
self.forbidden("You are not an administrator of this conversation!".to_string())?;
|
||||
}
|
||||
|
||||
Ok(conv)
|
||||
}
|
||||
|
||||
/// Get the ID
|
||||
fn post_group_id(&mut self, name: &str) -> ResultBoxError<GroupID> {
|
||||
let group_id = GroupID::new(self.post_u64(name)?);
|
||||
|
Reference in New Issue
Block a user