diff --git a/briar_wrapper/exceptions/pending_already_exists_contact.py b/briar_wrapper/exceptions/pending_already_exists_contact.py index 4c9bf3262d064eaa88aa87027811ea7408c82074..e012133e6cd30d2630d2f7e2a51432ebb3133ef3 100644 --- a/briar_wrapper/exceptions/pending_already_exists_contact.py +++ b/briar_wrapper/exceptions/pending_already_exists_contact.py @@ -12,5 +12,5 @@ class PendingContactAlreadyExistsContact(BriarWrapperException): def __init__(self, response, message=""): self.response = response error = response.json() - self.remoteAuthorName = error["remoteAuthorName"] + self.remote_author_name = error["remoteAuthorName"] super().__init__(message) diff --git a/briar_wrapper/exceptions/pending_already_exists_pending_contact.py b/briar_wrapper/exceptions/pending_already_exists_pending_contact.py index c7d71a342818a1d347c213ab819d051b46cbd035..55525730fc6b52063150494bc774a68b1217bb20 100644 --- a/briar_wrapper/exceptions/pending_already_exists_pending_contact.py +++ b/briar_wrapper/exceptions/pending_already_exists_pending_contact.py @@ -12,6 +12,6 @@ class PendingContactAlreadyExistsPendingContact(BriarWrapperException): def __init__(self, response, message=""): self.response = response error = response.json() - self.pendingContactAlias = error["pendingContactAlias"] - self.pendingContactId = error["pendingContactId"] + self.pending_contact_alias = error["pendingContactAlias"] + self.pending_contact_id = error["pendingContactId"] super().__init__(message) diff --git a/briar_wrapper/models/contacts.py b/briar_wrapper/models/contacts.py index 031f74151fe2ed19d69d31dab515b8ad74e02a27..de443ff8e8da9aea56f4bcbb1429d858cc240b28 100644 --- a/briar_wrapper/models/contacts.py +++ b/briar_wrapper/models/contacts.py @@ -57,7 +57,7 @@ class Contacts(Model): return self._handle_add_pending_error(response) - def delete_pending(self, id: str) -> None: + def delete_pending(self, contact_id: str) -> None: # pylint: disable=line-too-long """ Deletes pending contact with `id` @@ -68,7 +68,7 @@ class Contacts(Model): """ url = urljoin(BASE_HTTP_URL, self._API_ENDPOINT + "add/pending/") response = _delete(url, headers=self._headers, - json={"pendingContactId": id}) + json={"pendingContactId": contact_id}) if response.status_code == 200: return raise BriarWrapperException(response, "An unknown error occurred while"