Update url in Client.removeFriend

This commit is contained in:
Mads Marquart
2019-06-30 13:23:28 +02:00
parent 144e81bd46
commit b10b14c8e9

View File

@@ -2054,17 +2054,17 @@ class Client(object):
Removes a specifed friend from your friend list Removes a specifed friend from your friend list
:param friend_id: The ID of the friend that you want to remove :param friend_id: The ID of the friend that you want to remove
:return: Returns error if the removing was unsuccessful, returns True when successful. :return: True
:raises: FBchatException if request failed
""" """
payload = {"friend_id": friend_id, "unref": "none", "confirm": "Confirm"} data = {"uid": friend_id}
r = self._post("https://m.facebook.com/a/removefriend.php", payload) j = self._post(
query = parse_qs(urlparse(r.url).query) "/ajax/profile/removefriendconfirm.php",
if "err" not in query: data,
log.debug("Remove was successful!") fix_request=True,
return True as_json=True,
else: )
log.warning("Error while removing friend") return True
return False
def blockUser(self, user_id): def blockUser(self, user_id):
""" """