From a7308b22bf24131c5a0bf715e4f79e375e4bcfa2 Mon Sep 17 00:00:00 2001 From: TheJackiMonster Date: Tue, 21 Dec 2021 00:32:18 +0100 Subject: Fixed contexts to re-check for being contact related when unknown type Signed-off-by: TheJackiMonster --- src/gnunet_chat_handle.c | 5 ++++- src/gnunet_chat_lib.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gnunet_chat_handle.c b/src/gnunet_chat_handle.c index 0a0b743..1456acb 100644 --- a/src/gnunet_chat_handle.c +++ b/src/gnunet_chat_handle.c @@ -221,7 +221,9 @@ handle_request_context_by_room (struct GNUNET_CHAT_Handle *handle, struct GNUNET_CHAT_CheckHandleRoomMembers check; - if (context) + if ((context) && (context->type == GNUNET_CHAT_CONTEXT_TYPE_UNKNOWN)) + goto check_type; + else if (context) return GNUNET_OK; context = context_create_from_room(handle, room); @@ -238,6 +240,7 @@ handle_request_context_by_room (struct GNUNET_CHAT_Handle *handle, if (GNUNET_CHAT_CONTEXT_TYPE_GROUP == context->type) goto setup_group; +check_type: check.ignore_key = GNUNET_MESSENGER_get_key(handle->messenger); check.contact = NULL; diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c index 87692ec..0e86499 100644 --- a/src/gnunet_chat_lib.c +++ b/src/gnunet_chat_lib.c @@ -410,7 +410,7 @@ GNUNET_CHAT_group_get_user_pointer (const struct GNUNET_CHAT_Group *group) void -GNUNET_CHAT_group_invite_contact (struct GNUNET_CHAT_Group *group, +GNUNET_CHAT_group_invite_contact (const struct GNUNET_CHAT_Group *group, struct GNUNET_CHAT_Contact *contact) { if ((!group) || (!contact)) -- cgit v1.2.3