21 lines
496 B
Swift
21 lines
496 B
Swift
|
//
|
||
|
// InstanceFeatures.swift
|
||
|
// Tusker
|
||
|
//
|
||
|
// Created by Shadowfacts on 1/23/22.
|
||
|
// Copyright © 2022 Shadowfacts. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
import Pachyderm
|
||
|
|
||
|
struct InstanceFeatures {
|
||
|
private(set) var maxStatusChars = 500
|
||
|
private(set) var localOnlyPosts = false
|
||
|
|
||
|
mutating func update(instance: Instance, nodeInfo: NodeInfo?) {
|
||
|
maxStatusChars = instance.maxStatusCharacters ?? 500
|
||
|
localOnlyPosts = nodeInfo?.software.name == "hometown"
|
||
|
}
|
||
|
}
|