summaryrefslogtreecommitdiff
path: root/testing/nTox.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/nTox.c')
-rw-r--r--testing/nTox.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index b33b1fd3..329191d7 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -1001,11 +1001,17 @@ void print_help(char *prog_name)
1001 puts(" -f keyfile [Optional] Specify a keyfile to read from and write to."); 1001 puts(" -f keyfile [Optional] Specify a keyfile to read from and write to.");
1002} 1002}
1003 1003
1004void print_invite(Tox *m, int friendnumber, const uint8_t *data, uint16_t length, void *userdata) 1004void print_invite(Tox *m, int friendnumber, uint8_t type, const uint8_t *data, uint16_t length, void *userdata)
1005{ 1005{
1006 char msg[256]; 1006 char msg[256];
1007 sprintf(msg, "[i] received group chat invite from: %u, auto accepting and joining. group number: %u", friendnumber, 1007
1008 tox_join_groupchat(m, friendnumber, data, length)); 1008 if (type == TOX_GROUPCHAT_TYPE_TEXT) {
1009 sprintf(msg, "[i] received group chat invite from: %u, auto accepting and joining. group number: %u", friendnumber,
1010 tox_join_groupchat(m, friendnumber, data, length));
1011 } else {
1012 sprintf(msg, "[i] Group chat invite received of type %u that could not be accepted by ntox.", type);
1013 }
1014
1009 new_lines(msg); 1015 new_lines(msg);
1010} 1016}
1011 1017