Merge branch 'friendica' into 'develop'
Update features.ts for Friendica See merge request soapbox-pub/soapbox!2380
This commit is contained in:
commit
a45be78b97
1 changed files with 11 additions and 2 deletions
|
@ -359,6 +359,7 @@ const getInstanceFeatures = (instance: Instance) => {
|
||||||
]),
|
]),
|
||||||
|
|
||||||
editStatuses: any([
|
editStatuses: any([
|
||||||
|
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'),
|
||||||
]),
|
]),
|
||||||
|
@ -432,6 +433,7 @@ const getInstanceFeatures = (instance: Instance) => {
|
||||||
|
|
||||||
/** Whether the accounts who favourited or emoji-reacted to a status can be viewed through the API. */
|
/** Whether the accounts who favourited or emoji-reacted to a status can be viewed through the API. */
|
||||||
exposableReactions: any([
|
exposableReactions: any([
|
||||||
|
v.software === FRIENDICA,
|
||||||
v.software === MASTODON,
|
v.software === MASTODON,
|
||||||
v.software === TAKAHE && gte(v.version, '0.6.1'),
|
v.software === TAKAHE && gte(v.version, '0.6.1'),
|
||||||
v.software === TRUTHSOCIAL,
|
v.software === TRUTHSOCIAL,
|
||||||
|
@ -775,6 +777,7 @@ const getInstanceFeatures = (instance: Instance) => {
|
||||||
* @see {@link https://docs.joinmastodon.org/methods/scheduled_statuses/}
|
* @see {@link https://docs.joinmastodon.org/methods/scheduled_statuses/}
|
||||||
*/
|
*/
|
||||||
scheduledStatuses: any([
|
scheduledStatuses: any([
|
||||||
|
v.software === FRIENDICA,
|
||||||
v.software === MASTODON && gte(v.version, '2.7.0'),
|
v.software === MASTODON && gte(v.version, '2.7.0'),
|
||||||
v.software === PLEROMA,
|
v.software === PLEROMA,
|
||||||
]),
|
]),
|
||||||
|
@ -853,7 +856,10 @@ const getInstanceFeatures = (instance: Instance) => {
|
||||||
* Trending statuses.
|
* Trending statuses.
|
||||||
* @see GET /api/v1/trends/statuses
|
* @see GET /api/v1/trends/statuses
|
||||||
*/
|
*/
|
||||||
trendingStatuses: v.software === MASTODON && gte(v.compatVersion, '3.5.0'),
|
trendingStatuses: any([
|
||||||
|
v.software === FRIENDICA && gte(v.version, '2022.12.0'),
|
||||||
|
v.software === MASTODON && gte(v.compatVersion, '3.5.0'),
|
||||||
|
]),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Truth Social trending statuses API.
|
* Truth Social trending statuses API.
|
||||||
|
@ -866,6 +872,7 @@ const getInstanceFeatures = (instance: Instance) => {
|
||||||
* @see GET /api/v1/trends
|
* @see GET /api/v1/trends
|
||||||
*/
|
*/
|
||||||
trends: any([
|
trends: any([
|
||||||
|
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,
|
||||||
]),
|
]),
|
||||||
|
@ -919,7 +926,9 @@ export const parseVersion = (version: string): Backend => {
|
||||||
const match = regex.exec(version);
|
const match = regex.exec(version);
|
||||||
|
|
||||||
const semverString = match && (match[3] || match[1]);
|
const semverString = match && (match[3] || match[1]);
|
||||||
const semver = match ? semverParse(semverString) || semverCoerce(semverString) : null;
|
const semver = match ? semverParse(semverString) || semverCoerce(semverString, {
|
||||||
|
loose: true,
|
||||||
|
}) : null;
|
||||||
const compat = match ? semverParse(match[1]) || semverCoerce(match[1]) : null;
|
const compat = match ? semverParse(match[1]) || semverCoerce(match[1]) : null;
|
||||||
|
|
||||||
if (match && semver && compat) {
|
if (match && semver && compat) {
|
||||||
|
|
Loading…
Reference in a new issue