From d73faeff38e1573f36bf885a04bc4671ddc0f144 Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Mon, 22 Jan 2024 01:24:22 +0200 Subject: [PATCH] use the new functions to check for friend ID in the auto accept list --- dll/dll/steam_friends.h | 4 ++-- overlay_experimental/steam_overlay.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/dll/steam_friends.h b/dll/dll/steam_friends.h index 70ce0a77..64cc739c 100644 --- a/dll/dll/steam_friends.h +++ b/dll/dll/steam_friends.h @@ -1241,7 +1241,7 @@ void Callback(Common_Message *msg) data.m_ulGameID = f->appid(); callbacks->addCBResult(data.k_iCallback, &data, sizeof(data)); - if (overlay->Ready() && !settings->auto_accept_invites.count(msg->source_id())) + if (overlay->Ready() && !settings->hasOverlayAutoAcceptInviteFromFriend(msg->source_id())) { //TODO: the user should accept the invite first but we auto accept it because there's no gui yet // Then we will handle it ! @@ -1260,7 +1260,7 @@ void Callback(Common_Message *msg) if (msg->friend_messages().type() == Friend_Messages::GAME_INVITE) { PRINT_DEBUG("Steam_Friends Got Game Invite\n"); //TODO: I'm pretty sure that the user should accept the invite before this is posted but we do like above - if (overlay->Ready() && !settings->auto_accept_invites.count(msg->source_id())) + if (overlay->Ready() && !settings->hasOverlayAutoAcceptInviteFromFriend(msg->source_id())) { // Then we will handle it ! overlay->SetRichInvite(*find_friend(static_cast(msg->source_id())), msg->friend_messages().connect_str().c_str()); diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index c37bc95e..b56b7ad0 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -242,7 +242,7 @@ void Steam_Overlay::OpenOverlayInvite(CSteamID lobbyId) void Steam_Overlay::OpenOverlay(const char* pchDialog) { // TODO: Show pages depending on pchDialog - if ((strncmp(pchDialog, "Friends", sizeof("Friends") - 1) == 0) && (settings->auto_accept_invites.size() > 0)) { + if ((strncmp(pchDialog, "Friends", sizeof("Friends") - 1) == 0) && (settings->overlayAutoAcceptInvitesCount() > 0)) { PRINT_DEBUG("Not opening overlay's friends list because some friends are defined in the auto accept list\n"); AddAutoAcceptInviteNotification(); } else {