aboutsummaryrefslogtreecommitdiff
path: root/src/gnunet_chat_handle_intern.c
diff options
context:
space:
mode:
authorJacki <jacki@thejackimonster.de>2024-02-24 00:41:09 +0100
committerJacki <jacki@thejackimonster.de>2024-02-24 00:41:09 +0100
commitb3c45b010e65a1ba08b6cc64d12bf5e720f2df30 (patch)
treeaf590f2c823aa2eee96a1aa1d1e8acb276b2d40b /src/gnunet_chat_handle_intern.c
parent410b228231d29974ddf90329708731a7b50762f6 (diff)
downloadlibgnunetchat-b3c45b010e65a1ba08b6cc64d12bf5e720f2df30.tar.gz
libgnunetchat-b3c45b010e65a1ba08b6cc64d12bf5e720f2df30.zip
Delay automatic requests for messages
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat (limited to 'src/gnunet_chat_handle_intern.c')
-rw-r--r--src/gnunet_chat_handle_intern.c12
1 files changed, 6 insertions, 6 deletions
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,
1017 if ((handle->destruction) || 1017 if ((handle->destruction) ||
1018 (GNUNET_OK != handle_request_context_by_room(handle, room))) 1018 (GNUNET_OK != handle_request_context_by_room(handle, room)))
1019 return; 1019 return;
1020
1021 struct GNUNET_CHAT_Context *context = GNUNET_CONTAINER_multihashmap_get(
1022 handle->contexts, GNUNET_MESSENGER_room_get_key(room)
1023 );
1020 1024
1021 GNUNET_MESSENGER_get_message(room, &(msg->header.previous)); 1025 context_request_message(context, &(msg->header.previous));
1022 1026
1023 if (GNUNET_MESSENGER_KIND_MERGE == msg->header.kind) 1027 if (GNUNET_MESSENGER_KIND_MERGE == msg->header.kind)
1024 GNUNET_MESSENGER_get_message(room, &(msg->body.merge.previous)); 1028 context_request_message(context, &(msg->body.merge.previous));
1025 1029
1026 if ((GNUNET_CHAT_KIND_UNKNOWN == util_message_kind_from_kind(msg->header.kind)) || 1030 if ((GNUNET_CHAT_KIND_UNKNOWN == util_message_kind_from_kind(msg->header.kind)) ||
1027 (GNUNET_OK != intern_provide_contact_for_member(handle, sender, NULL))) 1031 (GNUNET_OK != intern_provide_contact_for_member(handle, sender, NULL)))
1028 return; 1032 return;
1029 1033
1030 struct GNUNET_CHAT_Context *context = GNUNET_CONTAINER_multihashmap_get(
1031 handle->contexts, GNUNET_MESSENGER_room_get_key(room)
1032 );
1033
1034 const struct GNUNET_TIME_Absolute timestamp = GNUNET_TIME_absolute_ntoh( 1034 const struct GNUNET_TIME_Absolute timestamp = GNUNET_TIME_absolute_ntoh(
1035 msg->header.timestamp 1035 msg->header.timestamp
1036 ); 1036 );