Closed aMytho closed 2 years ago
I switched the title
scope to stream_info
. The functions have been modified as well. changeTitle
mutation is now updateStreamInfo
but it currently only accepts a title argument. We can modify that later to add more fields.
For now stream_info
scope can only modify the title. Later we need to decide which fields it is allowed to change. I think the basic stream fields (Title, Category, Subcategory, Tags) are fine. However, there are some other fields that users could change per stream that probably shouldn't be in that scope (mature setting, language, etc). For those fields we will need to make a new scope channel_settings
or similar. I prefer things to be as fine grained as possible (least privilege) so we may want to add a few scopes to match what is on the channel settings page (channel_customization
, stream_information
(we have this now), chat_customization
, homepage
). That can be decided later though.
Totally agree with you on granular controls. I think Stream Info is the first logical grouping (title, category, subcategory, tags), and then as you said, as we add more to the API we can add additional scopes as necessary. For the GQL side though we can limit the params based on the scope if necessary.
This PR adds the ability to set a title from the API. Useful for third party devs and the mobile app.
If a title is too short (empty string) the default title is set. If the title is too long, the channel doesn't exist, or the user doesn't have permission the user is sent a message informing them of the error.
I also added a new scope
title
. The scope works fine but I'm having issues getting the project to recognize the new scope. I added the scope to theoauth_migration
file and did a DB reset which solved the problem. I don't know if you can run that migration file again or If I need to write a new one. If there is something I need to change let me know!