pl-api: Detect iceshrimp.net

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-11-27 10:17:49 +01:00
parent fd15332d6a
commit f13a7649e3

View file

@ -47,6 +47,14 @@ const GOTOSOCIAL = 'GoToSocial';
*/ */
const ICESHRIMP = 'Iceshrimp'; const ICESHRIMP = 'Iceshrimp';
/**
* Iceshrimp.NET, a decentralized and federated social networking service, powered by .NET.
*
* @category Software
* @see {@link https://iceshrimp.dev/}
*/
const ICESHRIMP_NET = 'Iceshrimp.NET';
/** /**
* Mastodon, the software upon which this is all based. * Mastodon, the software upon which this is all based.
* *
@ -1285,7 +1293,7 @@ interface Backend {
/** Get information about the software from its version string */ /** Get information about the software from its version string */
const parseVersion = (version: string): Backend => { const parseVersion = (version: string): Backend => {
const regex = /^([\w+.-]*)(?: \(compatible; ([\w]*) (.*)\))?$/; const regex = /^([\w+.-]*)(?: \(compatible; ([\w.]*) (.*)\))?$/;
const match = regex.exec(version.replace('/', ' ')); const match = regex.exec(version.replace('/', ' '));
const semverString = match && (match[3] || match[1]); const semverString = match && (match[3] || match[1]);
@ -1318,6 +1326,7 @@ export {
FRIENDICA, FRIENDICA,
GOTOSOCIAL, GOTOSOCIAL,
ICESHRIMP, ICESHRIMP,
ICESHRIMP_NET,
MASTODON, MASTODON,
MITRA, MITRA,
PIXELFED, PIXELFED,