forked from shadowfacts/Tusker
25 lines
465 B
Swift
25 lines
465 B
Swift
//
|
|
// InstanceType.swift
|
|
// Pachyderm
|
|
//
|
|
// Created by Shadowfacts on 9/11/19.
|
|
// Copyright © 2019 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public enum InstanceType {
|
|
case mastodon, pleroma
|
|
}
|
|
|
|
public extension Instance {
|
|
var instanceType: InstanceType {
|
|
let lowercased = version.lowercased()
|
|
if lowercased.contains("pleroma") {
|
|
return .pleroma
|
|
} else {
|
|
return .mastodon
|
|
}
|
|
}
|
|
}
|