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: align group send err enum order #2731

Merged
merged 1 commit into from
Mar 8, 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
10 changes: 5 additions & 5 deletions toxcore/tox.h
Original file line number Diff line number Diff line change
Expand Up @@ -4533,6 +4533,11 @@ typedef enum Tox_Err_Group_Send_Private_Message {
*/
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_EMPTY,

/**
* The message type is invalid.
*/
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE,

/**
* The caller does not have the required permissions to send group messages.
*/
Expand All @@ -4548,11 +4553,6 @@ typedef enum Tox_Err_Group_Send_Private_Message {
*/
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_DISCONNECTED,

/**
* The message type is invalid.
*/
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE,

} Tox_Err_Group_Send_Private_Message;

const char *tox_err_group_send_private_message_to_string(Tox_Err_Group_Send_Private_Message value);
Expand Down
6 changes: 3 additions & 3 deletions toxcore/tox_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,9 @@
case TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_EMPTY:
return "TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_EMPTY";

case TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE:
return "TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE";

Check warning on line 1344 in toxcore/tox_api.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox_api.c#L1343-L1344

Added lines #L1343 - L1344 were not covered by tests

case TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_PERMISSIONS:
return "TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_PERMISSIONS";

Expand All @@ -1348,9 +1351,6 @@

case TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_DISCONNECTED:
return "TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_DISCONNECTED";

case TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE:
return "TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE";
}

return "<invalid Tox_Err_Group_Send_Private_Message>";
Expand Down
Loading