Split notification routes, hard wrap, sort order
Change the notifications subpages to be distinct route handlers with actual paths rather than query parameters. They already were a massive conditional chain with almost no common logic. Hard wrap some of the more egregious query lines. Use less duplicated code for shadowban exclusion. Only major functionality change which is somewhat related to #476 is to sort subtrees by Comment.id DESC. Otherwise, upstream is substantially the same as TheMotte. Given that upstream didn't experience #476, I think the issue may have been resolved by prior changes to filtering / comment visibility & moderation.
This commit is contained in:
parent
edafe22024
commit
695e6b6dbd
5 changed files with 158 additions and 87 deletions
|
@ -26,7 +26,7 @@ def pusher_thread2(interests, notifbody, username):
|
|||
'notification': {
|
||||
'title': f'New message from @{username}',
|
||||
'body': notifbody,
|
||||
'deep_link': f'{SITE_FULL}/notifications?messages=true',
|
||||
'deep_link': f'{SITE_FULL}/notifications/messages',
|
||||
'icon': SITE_FULL + assetcache_path(f'images/{SITE_ID}/icon.webp'),
|
||||
}
|
||||
},
|
||||
|
@ -36,7 +36,7 @@ def pusher_thread2(interests, notifbody, username):
|
|||
'body': notifbody,
|
||||
},
|
||||
'data': {
|
||||
'url': '/notifications?messages=true',
|
||||
'url': '/notifications/messages',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue