From 6026f5b1ca4c186946ad29da529fa6b363ca9677 Mon Sep 17 00:00:00 2001 From: lesion Date: Fri, 17 Jan 2025 16:47:40 +0100 Subject: [PATCH] fix: display resources from fediverse in chronological order, fix #483 --- server/api/controller/event.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/controller/event.js b/server/api/controller/event.js index 2d4e9f78..9f587fe2 100644 --- a/server/api/controller/event.js +++ b/server/api/controller/event.js @@ -148,7 +148,7 @@ const eventController = { }, { model: Event, required: false, as: 'parent', attributes: ['id', 'recurrent', 'is_visible', 'start_datetime'] }, ], - order: [[Resource, 'id', 'DESC']], + order: [[Resource, 'id', 'ASC']], }) } catch (e) { log.error('[EVENT]', e) @@ -885,7 +885,7 @@ const eventController = { where, attributes: { exclude: [ - 'likes', 'boost', 'userId', 'createdAt', 'resources', 'placeId', 'image_path', 'ap_object', 'ap_id', + 'likes', 'boost', 'userId', 'createdAt', 'resources', 'placeId', 'image_path', 'ap_object', 'ap_id', ...(!include_parent ? ['recurrent']: []), ...(!include_unconfirmed ? ['is_visible']: []), ...(!include_description ? ['description']: [])