From 08cd43bd7d4225434af40b03d48f70c888b33d7a Mon Sep 17 00:00:00 2001 From: ari melody Date: Fri, 5 Jul 2024 15:49:20 +0100 Subject: [PATCH] fixed notifications only getting older notifs instead of newer ones --- src/lib/api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/api.js b/src/lib/api.js index c9a70b6..9cbf898 100644 --- a/src/lib/api.js +++ b/src/lib/api.js @@ -148,15 +148,15 @@ export async function getStreamingHealth(host) { * GET /api/v1/notifications * @param {string} host - The domain of the target server. * @param {string} token - The application token. - * @param {string} max_id - If provided, only shows notifications after this ID. + * @param {string} min_id - If provided, only shows notifications after this ID. * @param {string} limit - The maximum number of notifications to retrieve (default 40). * @param {string} types - A list of notification types to filter to. */ -export async function getNotifications(host, token, max_id, limit, types) { +export async function getNotifications(host, token, min_id, limit, types) { let url = `https://${host}/api/v1/notifications`; let params = new URLSearchParams(); - if (max_id) params.append("max_id", max_id); + if (min_id) params.append("min_id", min_id); if (limit) params.append("limit", limit); if (types) params.append("types", types.join(',')); const params_string = params.toString();