1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Can set to follow a friend

This commit is contained in:
2019-05-01 19:46:13 +02:00
parent 7c3390f8af
commit eba12736e9
3 changed files with 56 additions and 8 deletions

View File

@ -52,6 +52,20 @@ class FriendsHelper {
return response.code == 200;
}
/// Update following status for a friend
Future<bool> setFollowing(int friendID, bool follow) async {
final response = await APIRequest(
uri: "friends/setFollowing",
needLogin: true,
args: {
"friendID" : friendID.toString(),
"follow": follow.toString()
}
).exec();
return response.code == 200;
}
/// Remove a friend from the list
Future<bool> removeFriend(int friendID) async {
final response = await APIRequest(