increase pixelfed compatibility

This commit is contained in:
sk
2023-06-07 21:12:30 +02:00
parent cd46ed565f
commit b93b1847c3
5 changed files with 37 additions and 8 deletions

View File

@@ -65,7 +65,6 @@ public class Account extends BaseModel implements Searchable{
/**
* An image banner that is shown above the profile and in profile cards.
*/
@RequiredField
public String header;
/**
* A static version of the header. Equal to header if its value is a static image; different if header is an animated GIF.

View File

@@ -148,6 +148,10 @@ public class Instance extends BaseModel{
return pleroma != null;
}
public boolean isPixelfed() {
return version.contains("compatible; Pixelfed");
}
public boolean hasFeature(Feature feature) {
Optional<List<String>> pleromaFeatures = Optional.ofNullable(pleroma)
.map(p -> p.metadata)