def keep(item): wouldkeep = item.keep_item(item) # TODO: Consider a flag to disable this (and see above plus builder.py) if (item._deleted or item._spam) and not c.user_is_admin: return False if item.author_id in c.user.enemies: return False # don't show user their own unread stuff if (self.where == "unread" or self.subwhere == "unread") and (item.author_id == c.user._id or not item.new): return False if item.message_style == "mention" and c.user.name.lower() not in extract_user_mentions(item.body): return False return wouldkeep
def keep(item): wouldkeep = item.keep_item(item) # TODO: Consider a flag to disable this (and see above plus builder.py) if (item._deleted or item._spam) and not c.user_is_admin: return False if item.author_id in c.user.enemies: return False # don't show user their own unread stuff if ((self.where == 'unread' or self.subwhere == 'unread') and (item.author_id == c.user._id or not item.new)): return False if (item.message_style == "mention" and c.user.name.lower() not in extract_user_mentions(item.body)): return False return wouldkeep