mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-22 17:33:26 +01:00
Update group API
This commit is contained in:
parent
46eb69412e
commit
68b4713ef7
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user