Some small work on group chats done.

This commit is contained in:
irungentoo 2013-09-11 19:22:48 -04:00
parent 55499933be
commit 9bd7e56db8
3 changed files with 12 additions and 3 deletions

View File

@ -44,7 +44,9 @@
#define PACKET_ID_RECEIPT 65
#define PACKET_ID_MESSAGE 64
#define PACKET_ID_ACTION 63
#define PACKET_ID_INVITE_GROUPCHAT 144
#define PACKET_ID_JOIN_GROUPCHAT 145
#define PACKET_ID_ACCEPT_GROUPCHAT 146
/* Status definitions. */
enum {
@ -134,7 +136,7 @@ typedef struct Messenger {
Friend *friendlist;
uint32_t numfriends;
Group_Chat *chats;
Group_Chat **chats;
uint32_t numchats;
uint64_t last_LANdiscovery;

View File

@ -581,3 +581,10 @@ void chat_bootstrap(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id)
{
send_getnodes(chat, ip_port, addpeer(chat, client_id));
}
void chat_bootstrap_nonlazy(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id)
{
send_getnodes(chat, ip_port, addpeer(chat, client_id));
add_closepeer(chat, client_id, ip_port);
}

View File

@ -115,7 +115,7 @@ int handle_groupchatpacket(Group_Chat *chat, IP_Port source, uint8_t *packet, ui
void chat_bootstrap(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id);
void chat_bootstrap_nonlazy(Group_Chat *chat, IP_Port ip_port, uint8_t *client_id);
#ifdef __cplusplus
}
#endif