Skip to content

Ask to Join Documentation + Cleanup of Existing#407

Merged
msciotti merged 5 commits into
masterfrom
ask-to-join
Oct 12, 2017
Merged

Ask to Join Documentation + Cleanup of Existing#407
msciotti merged 5 commits into
masterfrom
ask-to-join

Conversation

@msciotti
Copy link
Copy Markdown
Contributor

I ended up refactoring a bunch of stuff that I didn't think was necessary. Mainly this includes the example secret hashing section. If there is strong feelings, I can add it back in, but I rarely saw it referenced or implemented and it felt a bit like bloat when trying to get to the actual information.

Overall, I went with a more to-the-point approach in the hopes of making it easier to read and find what you're looking for.

@msciotti msciotti requested a review from night October 12, 2017 18:22
Comment thread docs/topics/Rich_Presence.md Outdated

## It's always better when we're together
>warn
>Asset keys are automatically stored as **all lowercase** strings. Be mindful of this when referring to them in your code.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normalized to lowercase

Comment thread docs/topics/Rich_Presence.md Outdated
Other Discord users can click "Join" on the invitation. Their game will then launch, and the `joinGame()` callback will fire in their client with the inviting player's `joinSecret`. The client should reverse hash or otherwise unencrypt this secret and match the players together.

#### How good is your security?
To enable the Ask to Join button on your players' profiles, you'll need to be whitelisted by us—send an email to [gamedevs@discordapp.com](mailto:gamedevs@discordapp.com) to request access. Once whitelisted, you'll have access to the `joinRequest()` callback which sends the following data:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be below the next heading

also pls make this an info/warn callout

Copy link
Copy Markdown
Member

@night night Oct 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also they dont need a whitelist to get access to the callback.. they just need a whitelist for the button to even show/work in our client

Comment thread docs/topics/Rich_Presence.md Outdated

unsigned char* myMessage = "a super secret message for Discord";
printf("Original text: %s \n \n", myMessage);
When it fires, your game should surface this data with a Yes or No choice for the player to accept whether or not they wish to play with the other user. If no, return false. If yes, return true and the `userId` from the request.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false, true

Comment thread docs/topics/Rich_Presence.md Outdated
| largeImageText | x | | | | |
| smallImageText | x | | | | |
| partyId | | | | x | x |
| partySize | | | | | |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

party size + max is still required atm for join stuff

@msciotti
Copy link
Copy Markdown
Contributor Author

@night Fixed comments in 89c70f0. Decided to make ATJ a subsection of join instead, for clear delineation.

@msciotti msciotti merged commit e2fa3b0 into master Oct 12, 2017
@msciotti msciotti deleted the ask-to-join branch October 12, 2017 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants