diff options
author | zugz (tox) <mbays+tox@sdf.org> | 2020-03-01 00:00:00 +0000 |
---|---|---|
committer | zugz (tox) <mbays+tox@sdf.org> | 2020-03-18 00:00:00 +0000 |
commit | db07bda7f7b1ab7f5f219a9ed3d7f732b7da66b0 (patch) | |
tree | e5b4e5b43320c4073b619c006c1b32040cd06b8d /auto_tests/conference_double_invite_test.c | |
parent | 84e6a8d05704d9f4db79898984af861d759c478a (diff) |
Add "member" invite response
This allows invitations to work in the case that the invitee is already
in the group, which can happen if the group becomes split. Such an
invitation is automatically accepted, leading to the peers becoming
connected in the group and sharing peer lists.
Diffstat (limited to 'auto_tests/conference_double_invite_test.c')
-rw-r--r-- | auto_tests/conference_double_invite_test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/auto_tests/conference_double_invite_test.c b/auto_tests/conference_double_invite_test.c index 17124f1c..c9e64e5b 100644 --- a/auto_tests/conference_double_invite_test.c +++ b/auto_tests/conference_double_invite_test.c | |||
@@ -28,6 +28,8 @@ static void handle_conference_invite( | |||
28 | state->index, friend_number, type, (unsigned)length); | 28 | state->index, friend_number, type, (unsigned)length); |
29 | fprintf(stderr, "tox%u joining conference\n", state->index); | 29 | fprintf(stderr, "tox%u joining conference\n", state->index); |
30 | 30 | ||
31 | ck_assert_msg(!state->joined, "invitation callback generated for already joined conference"); | ||
32 | |||
31 | if (friend_number != -1) { | 33 | if (friend_number != -1) { |
32 | Tox_Err_Conference_Join err; | 34 | Tox_Err_Conference_Join err; |
33 | state->conference = tox_conference_join(tox, friend_number, cookie, length, &err); | 35 | state->conference = tox_conference_join(tox, friend_number, cookie, length, &err); |
@@ -71,7 +73,7 @@ static void conference_double_invite_test(Tox **toxes, State *state) | |||
71 | 73 | ||
72 | fprintf(stderr, "Invitations accepted\n"); | 74 | fprintf(stderr, "Invitations accepted\n"); |
73 | 75 | ||
74 | // Invite one more time, resulting in friend -1 inviting tox1 (toxes[1]). | 76 | fprintf(stderr, "Sending second invitation; should be ignored\n"); |
75 | tox_conference_invite(toxes[0], 0, state[0].conference, nullptr); | 77 | tox_conference_invite(toxes[0], 0, state[0].conference, nullptr); |
76 | 78 | ||
77 | iterate_all_wait(2, toxes, state, ITERATION_INTERVAL); | 79 | iterate_all_wait(2, toxes, state, ITERATION_INTERVAL); |