diff --git a/files/classes/comment.py b/files/classes/comment.py index c08022c83c..b3f680ee48 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -246,7 +246,7 @@ class Comment(Base): return self.child_comments.order_by(Comment.id).all() comments = self.child_comments.filter(Comment.author_id.notin_((AUTOPOLLER_ID, AUTOBETTER_ID, AUTOCHOICE_ID))) - return sort_comments(sort, comments) + return sort_comments(sort, comments).all() @property diff --git a/files/helpers/offsitementions.py b/files/helpers/offsitementions.py index 4e45f71bef..6865d97fdc 100644 --- a/files/helpers/offsitementions.py +++ b/files/helpers/offsitementions.py @@ -43,9 +43,14 @@ def get_mentions(queries): # Special case: PokemonGoRaids says 'Marsey' a lot unrelated to us. if i['subreddit'] == 'PokemonGoRaids': continue + if kind == 'comment': + text = f'
{i["body"]}
' + else: + text = f'
{i["title"]}

{i["selftext"][:5000]}
' + mentions.append({ 'permalink': i['permalink'], - 'text': i['body' if kind == 'comment' else 'title'], + 'text': text, }) return mentions @@ -57,8 +62,7 @@ def notify_mentions(send_to, mentions, mention_str='site mention'): notif_text = \ f'

New {mention_str}: ' \ - f'https://old.reddit.com{permalink}?context=89

' \ - f'
{text}
' + f'https://old.reddit.com{permalink}?context=89

{text}' \ existing_comment = g.db.query(Comment.id).filter_by( author_id=const.NOTIFICATIONS_ID, diff --git a/files/routes/posts.py b/files/routes/posts.py index 4fc0f06598..fbe542042a 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -322,7 +322,7 @@ def viewmore(v, pid, sort, offset): comments2.append(comment) ids.add(comment.id) count += g.db.query(Comment).filter_by(parent_submission=post.id, top_comment_id=comment.id).count() + 1 - if count > 50: break + if count > 100: break else: for comment in comments: comments2.append(comment) diff --git a/files/templates/comments.html b/files/templates/comments.html index dd028908d1..fd435aed2f 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -449,7 +449,7 @@ Context - + {% if v %} @@ -652,7 +652,7 @@ Context - Copy link + Copy link {% if v %} Report diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index b3325d4bde..e9d5cc72de 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -12,7 +12,7 @@ Give Award {% endif %} -Copy link +Copy link {% if v %} Subscribe diff --git a/files/templates/post_actions_mobile.html b/files/templates/post_actions_mobile.html index 9d7a267b21..d4f291fd07 100644 --- a/files/templates/post_actions_mobile.html +++ b/files/templates/post_actions_mobile.html @@ -8,7 +8,7 @@ {% if not p.ghost or v.id == AEVANN_ID %}{% endif %} - +