summaryrefslogtreecommitdiff
path: root/toxcore/group.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-07 10:43:51 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-07 16:02:00 +0000
commit08ff19a63b487cbcaac971615bcc0b804e289820 (patch)
tree86f5f636ce565e468e374f1b81226700f099fd3b /toxcore/group.h
parent3c1025d2dc07b41fd5c0b621e68be3a7c85611d8 (diff)
Call the "peer leaves" callback only once on group delete.
We used to pass the actual peer numbers of peers leaving, but we no longer know these in the PGC world, so we don't pass them anymore.
Diffstat (limited to 'toxcore/group.h')
-rw-r--r--toxcore/group.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/toxcore/group.h b/toxcore/group.h
index 684f7972..6eeeeff8 100644
--- a/toxcore/group.h
+++ b/toxcore/group.h
@@ -104,7 +104,7 @@ typedef struct {
104 void *object; 104 void *object;
105 105
106 void (*peer_on_join)(void *, uint32_t, uint32_t); 106 void (*peer_on_join)(void *, uint32_t, uint32_t);
107 void (*peer_on_leave)(void *, uint32_t, uint32_t, void *); 107 void (*peer_on_leave)(void *, uint32_t, void *);
108 void (*group_on_delete)(void *, uint32_t); 108 void (*group_on_delete)(void *, uint32_t);
109} Group_c; 109} Group_c;
110 110
@@ -377,13 +377,12 @@ int callback_groupchat_peer_new(const Group_Chats *g_c, uint32_t groupnumber, vo
377 377
378/* Set a function to be called when a peer leaves a group chat. 378/* Set a function to be called when a peer leaves a group chat.
379 * 379 *
380 * Function(void *group object (set with group_set_object), uint32_t groupnumber, uint32_t friendgroupnumber, void *group peer object (set with group_peer_set_object)) 380 * Function(void *group object (set with group_set_object), uint32_t groupnumber, void *group peer object (set with group_peer_set_object))
381 * 381 *
382 * return 0 on success. 382 * return 0 on success.
383 * return -1 on failure. 383 * return -1 on failure.
384 */ 384 */
385int callback_groupchat_peer_delete(Group_Chats *g_c, uint32_t groupnumber, void (*function)(void *, uint32_t, uint32_t, 385int callback_groupchat_peer_delete(Group_Chats *g_c, uint32_t groupnumber, void (*function)(void *, uint32_t, void *));
386 void *));
387 386
388/* Set a function to be called when the group chat is deleted. 387/* Set a function to be called when the group chat is deleted.
389 * 388 *