Skip to main content

Reject a Party Invitation

Last updated on

When a player has been invited to a party, they can choose to reject the invitation. Party invitees will receive a notification that they've rejected the invitation and current party members will also receive a notification that someone has rejected the party invitation.

FRegistry::Lobby.Connect();
FRegistry::Lobby.SetInvitePartyRejectResponseDelegate(AccelByte::Api::Lobby::FPartyRejectResponse::CreateLambda([](const FAccelByteModelsPartyRejectResponse& Result)
{
if (Result.Code == "0")
{
// Do something if InvitePartyRejectResponseDelegate has been successful
}
else
{
// Do something if InvitePartyRejectResponseDelegate has an error
}
}));

FString PartyId = FString("SomePartyId");
FString InvitationToken = FString("SomeInvitationToken");

FRegistry::Lobby.SendRejectInvitationRequest(PartyId, InvitationToken);