From b3c45b010e65a1ba08b6cc64d12bf5e720f2df30 Mon Sep 17 00:00:00 2001 From: Jacki Date: Sat, 24 Feb 2024 00:41:09 +0100 Subject: Delay automatic requests for messages Signed-off-by: Jacki --- src/gnunet_chat_handle_intern.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gnunet_chat_handle_intern.c') diff --git a/src/gnunet_chat_handle_intern.c b/src/gnunet_chat_handle_intern.c index d1fd051..b0d6458 100644 --- a/src/gnunet_chat_handle_intern.c +++ b/src/gnunet_chat_handle_intern.c @@ -1017,20 +1017,20 @@ on_handle_message (void *cls, if ((handle->destruction) || (GNUNET_OK != handle_request_context_by_room(handle, room))) return; + + struct GNUNET_CHAT_Context *context = GNUNET_CONTAINER_multihashmap_get( + handle->contexts, GNUNET_MESSENGER_room_get_key(room) + ); - GNUNET_MESSENGER_get_message(room, &(msg->header.previous)); + context_request_message(context, &(msg->header.previous)); if (GNUNET_MESSENGER_KIND_MERGE == msg->header.kind) - GNUNET_MESSENGER_get_message(room, &(msg->body.merge.previous)); + context_request_message(context, &(msg->body.merge.previous)); if ((GNUNET_CHAT_KIND_UNKNOWN == util_message_kind_from_kind(msg->header.kind)) || (GNUNET_OK != intern_provide_contact_for_member(handle, sender, NULL))) return; - struct GNUNET_CHAT_Context *context = GNUNET_CONTAINER_multihashmap_get( - handle->contexts, GNUNET_MESSENGER_room_get_key(room) - ); - const struct GNUNET_TIME_Absolute timestamp = GNUNET_TIME_absolute_ntoh( msg->header.timestamp ); -- cgit v1.2.3