Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: A more descriptive error for group invite accept function #2736

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -4269,7 +4269,7 @@
}

case -6: {
SET_ERROR_PARAMETER(error, TOX_ERR_GROUP_INVITE_ACCEPT_CORE);
SET_ERROR_PARAMETER(error, TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND);

Check warning on line 4272 in toxcore/tox.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox.c#L4272

Added line #L4272 was not covered by tests
return UINT32_MAX;
}

Expand Down
4 changes: 2 additions & 2 deletions toxcore/tox.h
Original file line number Diff line number Diff line change
Expand Up @@ -4888,9 +4888,9 @@ typedef enum Tox_Err_Group_Invite_Accept {
TOX_ERR_GROUP_INVITE_ACCEPT_PASSWORD,

/**
* There was a core error when initiating the group.
* The friend number passed did not designate a valid friend.
*/
TOX_ERR_GROUP_INVITE_ACCEPT_CORE,
TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND,

/**
* Packet failed to send.
Expand Down
4 changes: 2 additions & 2 deletions toxcore/tox_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,8 +1451,8 @@
case TOX_ERR_GROUP_INVITE_ACCEPT_PASSWORD:
return "TOX_ERR_GROUP_INVITE_ACCEPT_PASSWORD";

case TOX_ERR_GROUP_INVITE_ACCEPT_CORE:
return "TOX_ERR_GROUP_INVITE_ACCEPT_CORE";
case TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND:
return "TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND";

Check warning on line 1455 in toxcore/tox_api.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox_api.c#L1454-L1455

Added lines #L1454 - L1455 were not covered by tests

case TOX_ERR_GROUP_INVITE_ACCEPT_FAIL_SEND:
return "TOX_ERR_GROUP_INVITE_ACCEPT_FAIL_SEND";
Expand Down
Loading