Open saberistic opened 1 year ago
// This might be more of a client-side function where you fetch the relevant accounts and filter by invitations.
// However, if you want to handle it on-chain:
#[derive(Accounts)]
pub struct ViewInvitations<'info> {
pub player: Signer<'info>,
pub game_sessions: Vec<Account<'info, GameSession>>,
}
pub fn view_invitations(ctx: Context<ViewInvitations>) -> ProgramResult {
// Logic to filter game_sessions by invitations for the player.
Ok(())
}
Title: View Game Invitations As a: Player I want to: Be able to view a list of game invitations I've received So that: I can decide which games to join.