Skip to content

Conversation

@TeksuSiK
Copy link
Contributor

This pull request ensures that all code snippets containing JSON payloads are correct and can be copied with a single click by a developer, for example, to test receiving data from a webhook. All comments and headers that were included in the JSON have been moved above.

"profile_picture": "https://example.com/sender_avatar.jpg", // null if is_anonymous=true
"channel_slug": "gifter_channel", // null if is_anonymous=true
"identity": null // null if is_anonymous=true
"user_id": 987654321,
Copy link
Contributor

Choose a reason for hiding this comment

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

After this change it's valid JSON. On the other hand, information about null fields when is_anonymous=true is lost and can be confusing to new people.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That’s exactly why I moved this information higher up - it hasn’t been forgotten, but it isn’t included as part of the payload.

Fields in `gifter` are null if the gifter is anonymous (`gifter.is_anonymous`).

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