mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Can update group conversation settings
This commit is contained in:
@ -183,6 +183,16 @@ pub fn set_settings(settings: NewConversationSettings) -> Res {
|
||||
.exec()
|
||||
}
|
||||
|
||||
/// Change minimal membership level to join a group conversation
|
||||
pub fn set_min_group_conversation_membership_level(conv_id: ConvID, level: GroupMembershipLevel) -> Res {
|
||||
database::UpdateInfo::new(CONV_LIST_TABLE)
|
||||
.cond_conv_id("id", conv_id)
|
||||
.set_u32("min_group_membership_level", level.to_db())
|
||||
.exec()?;
|
||||
|
||||
update_members_list_for_group_conversation(conv_id)
|
||||
}
|
||||
|
||||
/// Search for private conversation between two users
|
||||
pub fn find_private(user_1: &UserID, user_2: &UserID) -> ResultBoxError<Vec<ConvID>> {
|
||||
database::QueryInfo::new(CONV_MEMBERS_TABLE)
|
||||
|
Reference in New Issue
Block a user