use the new functions to check for friend ID in the auto accept list

This commit is contained in:
otavepto 2024-01-22 01:24:22 +02:00
parent a98baef856
commit d73faeff38
2 changed files with 3 additions and 3 deletions

View File

@ -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<uint64>(msg->source_id())), msg->friend_messages().connect_str().c_str());

View File

@ -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 {