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

Update group API

This commit is contained in:
jfreegman 2022-04-23 13:14:44 -04:00
parent f47b4c1c3c
commit 46eb69412e
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -90,20 +90,20 @@ void cmd_ignore(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[
return; return;
} }
Tox_Err_Group_Toggle_Ignore err; Tox_Err_Group_Set_Ignore err;
tox_group_toggle_ignore(m, self->num, peer_id, true, &err); tox_group_set_ignore(m, self->num, peer_id, true, &err);
switch (err) { switch (err) {
case TOX_ERR_GROUP_TOGGLE_IGNORE_OK: { case TOX_ERR_GROUP_SET_IGNORE_OK: {
break; break;
} }
case TOX_ERR_GROUP_TOGGLE_IGNORE_SELF: { case TOX_ERR_GROUP_SET_IGNORE_SELF: {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "You cannot ignore yourself."); line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "You cannot ignore yourself.");
return; return;
} }
case TOX_ERR_GROUP_TOGGLE_IGNORE_PEER_NOT_FOUND: { case TOX_ERR_GROUP_SET_IGNORE_PEER_NOT_FOUND: {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "The specified nick or public key is invalid."); line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "The specified nick or public key is invalid.");
return; return;
} }
@ -791,20 +791,20 @@ void cmd_unignore(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv
return; return;
} }
Tox_Err_Group_Toggle_Ignore err; Tox_Err_Group_Set_Ignore err;
tox_group_toggle_ignore(m, self->num, peer_id, false, &err); tox_group_set_ignore(m, self->num, peer_id, false, &err);
switch (err) { switch (err) {
case TOX_ERR_GROUP_TOGGLE_IGNORE_OK: { case TOX_ERR_GROUP_SET_IGNORE_OK: {
break; break;
} }
case TOX_ERR_GROUP_TOGGLE_IGNORE_SELF: { case TOX_ERR_GROUP_SET_IGNORE_SELF: {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "You cannot unignore yourself."); line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "You cannot unignore yourself.");
return; return;
} }
case TOX_ERR_GROUP_TOGGLE_IGNORE_PEER_NOT_FOUND: { case TOX_ERR_GROUP_SET_IGNORE_PEER_NOT_FOUND: {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "The specified nick or public key is invalid."); line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "The specified nick or public key is invalid.");
return; return;
} }