fix: return empty list at the moment

This commit is contained in:
Namekuji 2023-09-05 19:32:37 -04:00
parent 1ec54db257
commit 970bf99c09
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532

View file

@ -86,6 +86,11 @@ export default define(meta, paramDef, async (ps, user) => {
} }
if (scyllaClient) { if (scyllaClient) {
if (ps.unreadOnly) {
// FIXME: isRead is always true at the moment
return await Notifications.packMany([], user.id);
}
const client = scyllaClient as Client; const client = scyllaClient as Client;
const [ const [
followingUserIds, followingUserIds,
@ -104,10 +109,6 @@ export default define(meta, paramDef, async (ps, user) => {
const filter = async (notifications: ScyllaNotification[]) => { const filter = async (notifications: ScyllaNotification[]) => {
let filtered = notifications; let filtered = notifications;
if (ps.unreadOnly) {
// FIXME: isRead is always true at the moment
filtered = [];
}
if (ps.following) { if (ps.following) {
filtered = filtered.filter( filtered = filtered.filter(
(n) => n.notifierId && validUserIds.includes(n.notifierId), (n) => n.notifierId && validUserIds.includes(n.notifierId),