diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 100e57480..3883cb857 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c @@ -39,7 +39,7 @@ void print_message(Tox *m, uint32_t friendnumber, TOX_MESSAGE_TYPE type, const u if (*((uint32_t *)userdata) != 974536) return; - if (type != TOX_MESSAGE_TYPE_MESSAGE) { + if (type != TOX_MESSAGE_TYPE_NORMAL) { ck_abort_msg("Bad type"); } @@ -401,9 +401,9 @@ START_TEST(test_few_clients) uint8_t msgs[TOX_MAX_MESSAGE_LENGTH + 1]; memset(msgs, 'G', sizeof(msgs)); TOX_ERR_FRIEND_SEND_MESSAGE errm; - tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_MESSAGE, msgs, TOX_MAX_MESSAGE_LENGTH + 1, &errm); + tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_NORMAL, msgs, TOX_MAX_MESSAGE_LENGTH + 1, &errm); ck_assert_msg(errm == TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG, "TOX_MAX_MESSAGE_LENGTH is too small\n"); - tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_MESSAGE, msgs, TOX_MAX_MESSAGE_LENGTH, &errm); + tox_friend_send_message(tox2, 0, TOX_MESSAGE_TYPE_NORMAL, msgs, TOX_MAX_MESSAGE_LENGTH, &errm); ck_assert_msg(errm == TOX_ERR_FRIEND_SEND_MESSAGE_OK, "TOX_MAX_MESSAGE_LENGTH is too big\n"); while (1) { diff --git a/testing/nTox.c b/testing/nTox.c index 6b3bfd0d1..3cb88edc5 100644 --- a/testing/nTox.c +++ b/testing/nTox.c @@ -395,7 +395,7 @@ void line_eval(Tox *m, char *line) int num = strtoul(line + prompt_offset, posi, 0); if (**posi != 0) { - if (tox_friend_send_message(m, num, TOX_MESSAGE_TYPE_MESSAGE, (uint8_t *) *posi + 1, strlen(*posi + 1), NULL) < 1) { + if (tox_friend_send_message(m, num, TOX_MESSAGE_TYPE_NORMAL, (uint8_t *) *posi + 1, strlen(*posi + 1), NULL) < 1) { char sss[256]; sprintf(sss, "[i] could not send message to friend num %u", num); new_lines(sss); @@ -607,7 +607,7 @@ void line_eval(Tox *m, char *line) if (conversation_default != 0) { if (conversation_default > 0) { int friendnumber = conversation_default - 1; - uint32_t res = tox_friend_send_message(m, friendnumber, TOX_MESSAGE_TYPE_MESSAGE, (uint8_t *)line, strlen(line), NULL); + uint32_t res = tox_friend_send_message(m, friendnumber, TOX_MESSAGE_TYPE_NORMAL, (uint8_t *)line, strlen(line), NULL); if (res == 0) { char sss[128]; diff --git a/testing/tox_shell.c b/testing/tox_shell.c index 64a0517d9..23fa320ad 100644 --- a/testing/tox_shell.c +++ b/testing/tox_shell.c @@ -149,7 +149,7 @@ int main(int argc, char *argv[]) if (ret <= 0) break; - tox_friend_send_message(tox, num, TOX_MESSAGE_TYPE_MESSAGE, buf, ret, 0); + tox_friend_send_message(tox, num, TOX_MESSAGE_TYPE_NORMAL, buf, ret, 0); } tox_iterate(tox); diff --git a/toxcore/tox.h b/toxcore/tox.h index eec41fc7b..f880f71c0 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -300,7 +300,7 @@ typedef enum TOX_MESSAGE_TYPE { /** * Normal text message. Similar to PRIVMSG on IRC. */ - TOX_MESSAGE_TYPE_MESSAGE, + TOX_MESSAGE_TYPE_NORMAL, /** * A message describing an user action. This is similar to /me (CTCP ACTION) * on IRC.