1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-15 02:43:03 +01:00

Group API changes

This commit is contained in:
Jfreegman 2015-07-22 14:55:52 -04:00
parent 15ef50e46c
commit 8e23ce1b83
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
2 changed files with 4 additions and 4 deletions

View File

@ -135,7 +135,7 @@ void cmd_ban(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX
return;
}
uint16_t ban_list[num_banned];
uint32_t ban_list[num_banned];
if (!tox_group_ban_get_list(m, self->num, ban_list, &err)) {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to get the ban list (error %d).", err);
@ -145,7 +145,7 @@ void cmd_ban(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX
uint16_t i;
for (i = 0; i < num_banned; ++i) {
uint16_t id = ban_list[i];
uint32_t id = ban_list[i];
size_t len = tox_group_ban_get_name_size(m, self->num, id, &err);
if (err != TOX_ERR_GROUP_BAN_QUERY_OK) {

View File

@ -538,8 +538,8 @@ static void groupchat_onGroupPeerlistUpdate(ToxWindow *self, Tox *m, uint32_t gr
name_length = MIN(name_length, TOX_MAX_NAME_LENGTH - 1);
if (!tox_group_peer_get_name(m, groupnum, i, (uint8_t *) chat->peer_list[i].name, NULL)) {
chat->peer_list[i].name_length = strlen(UNKNOWN_NAME);
memcpy(chat->peer_list[i].name, UNKNOWN_NAME, chat->peer_list[i].name_length);
name_length = strlen(UNKNOWN_NAME);
memcpy(chat->peer_list[i].name, UNKNOWN_NAME, name_length);
}
chat->peer_list[i].name[name_length] = '\0';