Change isAkkoma to be based on version code

Iceshrimp.NET now also implements some APIs using the pleroma field, so
only checking for that would create false positives for Iceshrimp.NET
This commit is contained in:
Jacocococo
2024-09-14 21:21:41 +02:00
parent f016b87ea0
commit a554059cce

View File

@@ -146,8 +146,12 @@ public class Instance extends BaseModel{
return ci; return ci;
} }
// This method has almost exclusively been used to improve support for
// Akkoma with no regard for Pleroma, hence its name. However, it is
// more likely than not that most uses should also apply to Pleroma,
// so checking for that too probably causes more good than harm.
public boolean isAkkoma() { public boolean isAkkoma() {
return pleroma != null; return version.contains("compatible; Akkoma") || version.contains("compatible; Pleroma");
} }
public boolean isPixelfed() { public boolean isPixelfed() {