Skip to content

Commit ad4921d

Browse files
committed
cleanup: A more descriptive error for group invite accept function
1 parent 3e05824 commit ad4921d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

toxcore/tox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4269,7 +4269,7 @@ uint32_t tox_group_invite_accept(Tox *tox, uint32_t friend_number, const uint8_t
42694269
}
42704270

42714271
case -6: {
4272-
SET_ERROR_PARAMETER(error, TOX_ERR_GROUP_INVITE_ACCEPT_CORE);
4272+
SET_ERROR_PARAMETER(error, TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND);
42734273
return UINT32_MAX;
42744274
}
42754275

toxcore/tox.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4888,9 +4888,9 @@ typedef enum Tox_Err_Group_Invite_Accept {
48884888
TOX_ERR_GROUP_INVITE_ACCEPT_PASSWORD,
48894889

48904890
/**
4891-
* There was a core error when initiating the group.
4891+
* The friend number passed did not designate a valid friend.
48924892
*/
4893-
TOX_ERR_GROUP_INVITE_ACCEPT_CORE,
4893+
TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND,
48944894

48954895
/**
48964896
* Packet failed to send.

toxcore/tox_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,8 +1451,8 @@ const char *tox_err_group_invite_accept_to_string(Tox_Err_Group_Invite_Accept va
14511451
case TOX_ERR_GROUP_INVITE_ACCEPT_PASSWORD:
14521452
return "TOX_ERR_GROUP_INVITE_ACCEPT_PASSWORD";
14531453

1454-
case TOX_ERR_GROUP_INVITE_ACCEPT_CORE:
1455-
return "TOX_ERR_GROUP_INVITE_ACCEPT_CORE";
1454+
case TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND:
1455+
return "TOX_ERR_GROUP_INVITE_ACCEPT_FRIEND_NOT_FOUND";
14561456

14571457
case TOX_ERR_GROUP_INVITE_ACCEPT_FAIL_SEND:
14581458
return "TOX_ERR_GROUP_INVITE_ACCEPT_FAIL_SEND";

0 commit comments

Comments
 (0)