Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for news channels #800

Merged
merged 4 commits into from
Aug 7, 2020
Merged

Add support for news channels #800

merged 4 commits into from
Aug 7, 2020

Conversation

adityaxdiwakar
Copy link
Contributor

Resolves #799

Adds support for the following endpoints:

  • @/channels/:id/messages/:id/crosspost: publishes a message in a news channel to followers
  • @/channels/:id/followers: follows a news channel

Endpoint support added:
- @/channels/:id/messages/:id/crosspost - publishes a message in a news
  channel to followers
- @/channels/:id/followers - follows a news channel
@CarsonHoffman
Copy link
Collaborator

It doesn't appear that there's any way to extract the webhook ID from the ChannelNewsFollow method if I'm understanding the docs PR correctly; we'd definitely want to support getting back any available information on any new requests we add.

@adityaxdiwakar
Copy link
Contributor Author

My bad, I've implemented that now in eb70c17.

@CarsonHoffman
Copy link
Collaborator

It also seems that the error on s.RequestWithBucketID in ChannelNewsFollow isn't checked; this leads to nil errors being incorrectly being returned by the function as long as the body is empty or valid JSON, so errors like 401, 403 or 404 result in nil errors.

@adityaxdiwakar
Copy link
Contributor Author

Not sure how I missed that, thanks, resolved!

@CarsonHoffman
Copy link
Collaborator

Awesome, the methods look great now. Thank you for the PR!

@CarsonHoffman CarsonHoffman merged commit 7b0771c into bwmarrin:master Aug 7, 2020
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.

Add Support for /followers and /crosspost endpoints
2 participants