Invites And Join Requests

Invites And Join Requests

Discord invite flows use a joinable Rich Presence activity. DiscordPulse transports the join secret; your game decides what the secret means and how to join the correct lobby, server, or session.

Invite features depend on the Discord Social SDK connection and your Discord application configuration. First confirm normal Rich Presence works.

Publish A Joinable Activity

Create a full activity with:

PartyId = "lobby-eu-42"
PartySize = 2
PartyMax = 4
JoinSecret = "opaque-join-token"

Recommended rules:

  • Keep PartyId stable for the lobby lifetime.
  • Keep JoinSecret opaque.
  • Ensure PartySize < PartyMax while the party is joinable.
  • Validate every received secret in your own game/session system.
  • Update the activity when party size changes.

Local User Accepts An Invite

Bind:

On Discord Join Requested

The event supplies the join secret:

On Discord Join Requested(Secret)
  -> Validate Secret
  -> Resolve Lobby Or Server
  -> Join Session

Never trust the secret without application-side validation.

Another User Requests To Join

Bind:

On Discord Join Request Received

The current wrapper populates UserId from the Social SDK invite. Other FDiscordPresenceUser fields may be empty.

Respond with:

Respond To Discord Join Request(UserId, Response)
ResponseBehavior
YesSends a positive reply through the Social SDK
NoRemoves the pending request locally
IgnoreRemoves the pending request locally

The SDK helper used by DiscordPulse exposes a positive reply operation but no distinct reject reply. Therefore, No and Ignore are local dismissals.

Pending Request Lifetime

Pending requests:

  • Exist only in the current subsystem session
  • Are matched by UserId
  • Are removed after a successful positive reply
  • Are removed after No or Ignore
  • Are cleared during shutdown

Spectate And Match Secrets

SpectateSecret and MatchSecret remain in FDiscordPresenceActivity for migration compatibility. The current Social SDK Rich Presence API does not publish them.

On Discord Spectate Requested is retained for compatibility and is not expected to fire from the current activity implementation.

Invite Verification

Use two Discord accounts when possible:

  1. Publish a joinable activity.
  2. Confirm normal activity visibility first.
  3. Send or accept an invite.
  4. Confirm On Discord Join Requested receives the expected secret.
  5. Confirm incoming join requests trigger On Discord Join Request Received.
  6. Test Yes, No, and Ignore.