From f1461505ff3dcc9e206b7185ffa99fe471abf691 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 1 Sep 2021 18:16:38 +0200 Subject: [PATCH] fd --- files/routes/front.py | 9 +++++++-- files/templates/notifications.html | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index 3fb1d3d8c..8865882fb 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -17,10 +17,15 @@ def slash_post(): def notifications(v): try: page = int(request.args.get('page', 1)) except: page = 1 - all_ = request.args.get('all', False) messages = request.args.get('messages', False) + modmail = request.args.get('modmail', False) posts = request.args.get('posts', False) - if messages: + if modmail and v.admin_level == 6: + cids = v.notification_modmail(page=page) + next_exists = (len(cids) == 26) + cids = cids[:25] + comments = get_comments(cids, v=v) + elif messages: cids = v.notification_messages(page=page) next_exists = (len(cids) == 26) cids = cids[:25] diff --git a/files/templates/notifications.html b/files/templates/notifications.html index 7fb80c762..68692b612 100644 --- a/files/templates/notifications.html +++ b/files/templates/notifications.html @@ -30,6 +30,11 @@ Messages +