fix: display resources from fediverse in chronological order, fix #483

This commit is contained in:
lesion 2025-01-17 16:47:40 +01:00
parent 5f0728eb3e
commit 6026f5b1ca
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -148,7 +148,7 @@ const eventController = {
}, },
{ model: Event, required: false, as: 'parent', attributes: ['id', 'recurrent', 'is_visible', 'start_datetime'] }, { model: Event, required: false, as: 'parent', attributes: ['id', 'recurrent', 'is_visible', 'start_datetime'] },
], ],
order: [[Resource, 'id', 'DESC']], order: [[Resource, 'id', 'ASC']],
}) })
} catch (e) { } catch (e) {
log.error('[EVENT]', e) log.error('[EVENT]', e)
@ -885,7 +885,7 @@ const eventController = {
where, where,
attributes: { attributes: {
exclude: [ 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_parent ? ['recurrent']: []),
...(!include_unconfirmed ? ['is_visible']: []), ...(!include_unconfirmed ? ['is_visible']: []),
...(!include_description ? ['description']: []) ...(!include_description ? ['description']: [])