summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/Messenger.h6
-rw-r--r--toxcore/group_chats.c7
-rw-r--r--toxcore/group_chats.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index 40617d08..7649a779 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -44,7 +44,9 @@
44#define PACKET_ID_RECEIPT 65 44#define PACKET_ID_RECEIPT 65
45#define PACKET_ID_MESSAGE 64 45#define PACKET_ID_MESSAGE 64
46#define PACKET_ID_ACTION 63 46#define PACKET_ID_ACTION 63
47 47#define PACKET_ID_INVITE_GROUPCHAT 144
48#define PACKET_ID_JOIN_GROUPCHAT 145
49#define PACKET_ID_ACCEPT_GROUPCHAT 146
48 50
49/* Status definitions. */ 51/* Status definitions. */
50enum { 52enum {
@@ -134,7 +136,7 @@ typedef struct Messenger {
134 Friend *friendlist; 136 Friend *friendlist;
135 uint32_t numfriends; 137 uint32_t numfriends;
136 138
137 Group_Chat *chats; 139 Group_Chat **chats;
138 uint32_t numchats; 140 uint32_t numchats;
139 141
140 uint64_t last_LANdiscovery; 142 uint64_t last_LANdiscovery;
diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c
index 4581eb38..ffef6046 100644
--- a/toxcore/group_chats.c
+++ b/toxcore/group_chats.c
@@ -581,3 +581,10 @@ void chat_bootstrap(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id)
581{ 581{
582 send_getnodes(chat, ip_port, addpeer(chat, client_id)); 582 send_getnodes(chat, ip_port, addpeer(chat, client_id));
583} 583}
584
585void chat_bootstrap_nonlazy(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id)
586{
587 send_getnodes(chat, ip_port, addpeer(chat, client_id));
588 add_closepeer(chat, client_id, ip_port);
589}
590
diff --git a/toxcore/group_chats.h b/toxcore/group_chats.h
index 7af13d8d..535b46db 100644
--- a/toxcore/group_chats.h
+++ b/toxcore/group_chats.h
@@ -115,7 +115,7 @@ int handle_groupchatpacket(Group_Chat *chat, IP_Port source, uint8_t *packet, ui
115 115
116 116
117void chat_bootstrap(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id); 117void chat_bootstrap(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id);
118 118void chat_bootstrap_nonlazy(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id);
119#ifdef __cplusplus 119#ifdef __cplusplus
120} 120}
121#endif 121#endif