mitodl / open-discussions

BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

keep track of channel followers #1420

Closed pdpinch closed 6 years ago

pdpinch commented 6 years ago

In discussing #1249 we learned that reddit does not have an API for getting a list of subreddit subscribers ("channel followers" in discussions). In order to be able to count and list followers, we will need to store this relationship in django.

acceptance criteria

related issues

mbertrand commented 6 years ago

@pdpinch does it make sense to add 'Update the Elasticsearch profile doc (author_channel_membership) when channel subscription status changes' to this issue, or create a new issue for it?

pdpinch commented 6 years ago

@mbertrand I added it to the checklist for this issue, since we're going to be updating the APIs anyway

mbertrand commented 6 years ago

@pdpinch is it correct that a channel follower is not necessarily a moderator or contributor? I don't see any option in the UI to follow a channel (just posts), but the Channel object returned by the API includes the following attributes:

 user_is_contributor
 user_is_moderator
 user_is_subscriber

I'm assuming that a user is a follower if user_is_subscriber is true? And we should store all the above in Django: a channel's moderators, contributors, and subscribers?

Ferdi commented 6 years ago

is it correct that a channel follower is not necessarily a moderator or contributor? Yes. Private channels have: contributors, moderators, and subscribers Public channels have : Moderators and subscribers

"Subscribe" just affects your front page feed . So for example, you can be a member of a private channel but you unsubscribe because the channel is noisy and you dont want that channel to dominate your feed. But you are still a member and can access the channel if you wanted.

pdpinch commented 6 years ago

Just to be as clear as possible:

is it correct that a channel follower is not necessarily a moderator or contributor?

Yes.

I don't see any option in the UI to follow a channel

We haven't implemented it yet, but there is a design: https://zpl.io/VQEJqKk

So clicking the red "follow" button would add the user as subscriber.

I'm assuming that a user is a follower if user_is_subscriber is true?

We're working on a mapping of roles in code to roles in the UI. This is preliminary:

user_is_contributor => member user_is_moderator => moderator user_is_subscriber => follower

As Ferdi said, each of those are independent, and not all of them are available in all channels.

we should store all the above in Django: a channel's moderators, contributors, and subscribers?

yep

mbertrand commented 6 years ago

@pdpinch I checked the last checkbox, ok to close?