This repository has been archived by the owner. It is now read-only.

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

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+6 −0
Diff settings

Always

Just for now

@@ -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"