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

List all posts a group is subscribed to and/or include them in get_user_following_posts() if user is in groups #304

Open
jerclarke opened this issue Apr 9, 2015 · 2 comments

Comments

@jerclarke
Copy link
Contributor

I looked everwhere and searched for keywords that made sense but can't find an equivalent to get_user_following_posts() (notifications.php) that instead gets posts a group is following (i.e. get_group_following_posts())

The utility of such a function seems pretty obvious, but I need it specifically to soup up the "myposts" widget, which currently doesn't list posts the user is subscribed to because they are in a group (i.e. it only shows posts where their name is ticked in notifications, not their group).

This means they are still addicted to email notifications for group subscriptions, which is annoying in many contexts, not least of which would be instances where the groups shift regularly.

FWIW this problem (and many related ones) would also be satisfied if get_user_following_posts() also checked for relevant group subscriptions and included them. IMHO that's what most users would expect (my users did and were confused).

From a quick analysis it seems the solution for that (souping up get_user_following_posts()) is to complicate it's tax_query to also query against $this->following_usergroups_taxonomy with terms for each group the user is in. Not a fast query but a logical one.

Any thoughts on this? Would a patch with that update get committed, or should I work on this in an external silo?

@cojennin
Copy link
Contributor

Makes sense to me. I would expect to see both posts that have my name ticked and posts that have the usergroup ticked in anything that dealt with showing me posts to which I'm subscribed. Unsure what kind of overhead it would add to the tax_query, but if you have some time to work on it that would be great! Can always figure out if it'll need improvement once we've got somewhere to start.

@cojennin
Copy link
Contributor

@jeremyclarke any further thoughts on this? I would definitely be interested to see a patch for it!

Might be useful to make a function similar to get_user_following_posts called get_usergroups_following_posts as well as one that combines the functionality of the two (with the more complicated query you noted in your comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants