mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Ready to update the list of members of a conversation
This commit is contained in:
@ -115,6 +115,14 @@ pub fn is_user_moderator(user_id: UserID, conv_id: u64) -> ResultBoxError<bool>
|
||||
.exec_count()? > 0)
|
||||
}
|
||||
|
||||
/// Check out whether all the members of a conversation can add members to it or not
|
||||
pub fn can_everyone_add_members(conv_id: u64) -> ResultBoxError<bool> {
|
||||
database::QueryInfo::new(CONV_LIST_TABLE)
|
||||
.cond_u64("id", conv_id)
|
||||
.add_field("can_everyone_add_members")
|
||||
.query_row(|f|f.get_legacy_bool("can_everyone_add_members"))
|
||||
}
|
||||
|
||||
/// Set whether a user is following a conversation or not
|
||||
pub fn set_following(user_id: UserID, conv_id: u64, following: bool) -> ResultBoxError<()> {
|
||||
database::UpdateInfo::new(CONV_USERS_TABLE)
|
||||
|
Reference in New Issue
Block a user