Skip to content

Commit

Permalink
FORGOT TO ADD THIS
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-d committed Oct 21, 2019
1 parent e69a75f commit d5b6038
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ieddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,11 @@ def view_user(username):

p.remote_url_parsed = post_url_parse(p.url)

if hasattr(p, 'text'):
p.new_text = pseudo_markup(p.text)
if thumb_exists(p.id):
p.thumbnail = 'thumbnails/thumb-' + str(p.id) + '.PNG'

comments_with_posts = []

for c in comments:
Expand Down Expand Up @@ -1414,12 +1419,11 @@ def user_messages(username=None):
unread = unread.order_by((Message.created).desc()).limit(50).all()

read = [x for x in read if x.sender == None or get_user_from_name(x.sender).id not in session['blocked']['other_user']]
unread = [x for x in unread if x.sender == None or get_user_from_name(x.sender).id not in session['blocked']['other_user']]

for r in unread:
r.read = True

unread = [x for x in unread if x.sender == None or get_user_from_name(x.sender).id not in session['blocked']['other_user']]

sent = db.session.query(Message).filter_by(sender=username, read=False)
sent = sent.order_by((Message.created).desc()).limit(5).all()

Expand Down

0 comments on commit d5b6038

Please sign in to comment.