aboutsummaryrefslogtreecommitdiff
path: root/src/chat/messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat/messenger.c')
-rw-r--r--src/chat/messenger.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/chat/messenger.c b/src/chat/messenger.c
index 9bfe11b..27ba1bd 100644
--- a/src/chat/messenger.c
+++ b/src/chat/messenger.c
@@ -24,8 +24,19 @@
24 24
25#include "messenger.h" 25#include "messenger.h"
26 26
27#include "../contact.h"
27#include "../event.h" 28#include "../event.h"
28 29
30int
31_chat_messenger_iterate_contacts(UNUSED void *cls,
32 UNUSED struct GNUNET_CHAT_Handle *handle,
33 struct GNUNET_CHAT_Contact *contact)
34{
35 if (contact)
36 contact_destroy_info(contact);
37 return GNUNET_YES;
38}
39
29static void 40static void
30_chat_messenger_idle(void *cls) 41_chat_messenger_idle(void *cls)
31{ 42{
@@ -43,6 +54,12 @@ _chat_messenger_idle(void *cls)
43 return; 54 return;
44 } 55 }
45 56
57 GNUNET_CHAT_iterate_contacts(
58 app->chat.messenger.handle,
59 _chat_messenger_iterate_contacts,
60 NULL
61 );
62
46 GNUNET_CHAT_stop(app->chat.messenger.handle); 63 GNUNET_CHAT_stop(app->chat.messenger.handle);
47 app->chat.messenger.handle = NULL; 64 app->chat.messenger.handle = NULL;
48 65
@@ -98,8 +115,12 @@ _chat_messenger_message(void *cls,
98 } 115 }
99 case GNUNET_CHAT_KIND_CONTACT: 116 case GNUNET_CHAT_KIND_CONTACT:
100 { 117 {
101 // TODO: update messages and content related to a contacts information 118 application_call_message_event(
102 // (name and key) 119 app,
120 event_update_contacts,
121 context,
122 message
123 );
103 break; 124 break;
104 } 125 }
105 case GNUNET_CHAT_KIND_INVITATION: 126 case GNUNET_CHAT_KIND_INVITATION: