Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make /r/mod/comments work correctly (currently just shows /r/all/comments) #399

Closed
wants to merge 1 commit into from

3 participants

Chad Birch Keith Mitchell Neil Williams
Chad Birch
Owner

No description provided.

Keith Mitchell
Collaborator

"MultiRedditBase" would be appropriate to me.

Neil Williams
Owner

Agreed with @kemitche

Neil Williams
Owner

Closing because this was implemented (by making ModContribSR extend MultiReddit) in 91b7856.

Neil Williams spladug closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 31, 2012
  1. Chad Birch
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 r2/r2/models/subreddit.py
6 r2/r2/models/subreddit.py
View
@@ -935,6 +935,12 @@ def sr_ids(self):
def get_links(self, sort, time):
return self.get_links_sr_ids(self.sr_ids, sort, time)
+
+ def get_all_comments(self):
+ from r2.lib.db.queries import get_sr_comments, merge_results
+ srs = Subreddit._byID(self.sr_ids, return_dict=False)
+ results = [get_sr_comments(sr) for sr in srs]
+ return merge_results(*results)
class ModSR(ModContribSR):
name = "communities you moderate"
Something went wrong with that request. Please try again.