Check version for Friendica features

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-03-25 10:02:21 +01:00
parent 52172c923f
commit 4990e1eaa7

View file

@ -359,7 +359,7 @@ const getInstanceFeatures = (instance: Instance) => {
]), ]),
editStatuses: any([ editStatuses: any([
v.software === FRIENDICA, v.software === FRIENDICA && gte(v.version, '2022.12.0'),
v.software === MASTODON && gte(v.version, '3.5.0'), v.software === MASTODON && gte(v.version, '3.5.0'),
features.includes('editing'), features.includes('editing'),
]), ]),
@ -857,7 +857,7 @@ const getInstanceFeatures = (instance: Instance) => {
* @see GET /api/v1/trends/statuses * @see GET /api/v1/trends/statuses
*/ */
trendingStatuses: any([ trendingStatuses: any([
v.software === FRIENDICA, v.software === FRIENDICA && gte(v.version, '2022.12.0'),
v.software === MASTODON && gte(v.compatVersion, '3.5.0'), v.software === MASTODON && gte(v.compatVersion, '3.5.0'),
]), ]),
@ -872,7 +872,7 @@ const getInstanceFeatures = (instance: Instance) => {
* @see GET /api/v1/trends * @see GET /api/v1/trends
*/ */
trends: any([ trends: any([
v.software === FRIENDICA, v.software === FRIENDICA && gte(v.version, '2022.12.0'),
v.software === MASTODON && gte(v.compatVersion, '3.0.0'), v.software === MASTODON && gte(v.compatVersion, '3.0.0'),
v.software === TRUTHSOCIAL, v.software === TRUTHSOCIAL,
]), ]),