Skip to content

Commit

Permalink
Change isAkkoma to be based on version code
Browse files Browse the repository at this point in the history
Iceshrimp.NET now also implements some APIs using the pleroma field, so
only checking for that would create false positives for Iceshrimp.NET
  • Loading branch information
Jacocococo committed Sep 14, 2024
1 parent f016b87 commit a554059
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ public CatalogInstance toCatalogInstance(){
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() {
return pleroma != null;
return version.contains("compatible; Akkoma") || version.contains("compatible; Pleroma");
}

public boolean isPixelfed() {
Expand Down

0 comments on commit a554059

Please sign in to comment.