From 5fa65a4b18926477fc5f8fac83b654146673b4ce Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 8 Dec 2019 06:00:15 +0300 Subject: [PATCH] Instance: a way to check if we have Pleroma with Mastodon API extensions --- app/src/main/java/com/keylesspalace/tusky/entity/Instance.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/entity/Instance.kt b/app/src/main/java/com/keylesspalace/tusky/entity/Instance.kt index a9f6f499..f6d33dfb 100644 --- a/app/src/main/java/com/keylesspalace/tusky/entity/Instance.kt +++ b/app/src/main/java/com/keylesspalace/tusky/entity/Instance.kt @@ -43,6 +43,10 @@ data class Instance ( val instance = other as Instance? return instance?.uri.equals(uri) } + + fun isPleroma(): Boolean { + return version.contains(" (compatible; Pleroma "); + } } data class PollLimits (