From 68b4713ef77f77951b692e8dd2b858967dc957f3 Mon Sep 17 00:00:00 2001 From: jfreegman Date: Thu, 2 Jun 2022 10:20:38 -0400 Subject: [PATCH] Update group API --- src/groupchats.c | 2 +- src/toxic.h | 2 +- src/windows.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/groupchats.c b/src/groupchats.c index c31a310..fdd35a4 100644 --- a/src/groupchats.c +++ b/src/groupchats.c @@ -1372,7 +1372,7 @@ static void send_group_message(ToxWindow *self, Tox *m, uint32_t groupnumber, co Tox_Err_Group_Send_Message err; - if (!tox_group_send_message(m, groupnumber, type, (uint8_t *) msg, strlen(msg), &err)) { + if (!tox_group_send_message(m, groupnumber, type, (uint8_t *) msg, strlen(msg), NULL, &err)) { if (err == TOX_ERR_GROUP_SEND_MESSAGE_PERMISSIONS) { const Tox_Group_Role role = tox_group_self_get_role(m, groupnumber, NULL); diff --git a/src/toxic.h b/src/toxic.h index a7def1a..1a1d097 100644 --- a/src/toxic.h +++ b/src/toxic.h @@ -152,7 +152,7 @@ void on_group_invite(Tox *m, uint32_t friendnumber, const uint8_t *invite_data, const uint8_t *group_name, size_t group_name_length, void *userdata); void on_group_message(Tox *m, uint32_t groupnumber, uint32_t peernumber, TOX_MESSAGE_TYPE type, - const uint8_t *message, size_t length, void *userdata); + const uint8_t *message, size_t length, uint32_t message_id, void *userdata); void on_group_private_message(Tox *m, uint32_t groupnumber, uint32_t peernumber, TOX_MESSAGE_TYPE type, const uint8_t *message, size_t length, void *userdata); diff --git a/src/windows.c b/src/windows.c index 98edfc2..ea15a87 100644 --- a/src/windows.c +++ b/src/windows.c @@ -395,8 +395,10 @@ void on_group_invite(Tox *m, uint32_t friendnumber, const uint8_t *invite_data, } void on_group_message(Tox *m, uint32_t groupnumber, uint32_t peer_id, TOX_MESSAGE_TYPE type, - const uint8_t *message, size_t length, void *userdata) + const uint8_t *message, size_t length, uint32_t message_id, void *userdata) { + UNUSED_VAR(message_id); + char msg[MAX_STR_SIZE + 1]; length = copy_tox_str(msg, sizeof(msg), (const char *) message, length);