mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 17:05:16 +00:00
Update can_post_texts parameter
This commit is contained in:
@ -172,6 +172,15 @@ pub fn set_following(user_id: &UserID, friend_id: &UserID, follow: bool) -> Resu
|
||||
.exec()
|
||||
}
|
||||
|
||||
/// Specify whether a friend is allowed to create posts on current user's page or not
|
||||
pub fn set_can_post_texts(user_id: &UserID, friend_id: &UserID, allow: bool) -> ResultBoxError {
|
||||
database::UpdateInfo::new(FRIENDS_TABLE)
|
||||
.cond_user_id("ID_personne", user_id)
|
||||
.cond_user_id("ID_amis", friend_id)
|
||||
.set_legacy_bool("autoriser_post_page", allow)
|
||||
.exec()
|
||||
}
|
||||
|
||||
/// Get the status of a friendship
|
||||
pub fn get_status(user_id: &UserID, friend_id: &UserID) -> ResultBoxError<FriendshipStatus> {
|
||||
let mut status = FriendshipStatus {
|
||||
|
Reference in New Issue
Block a user