another.im-ios/AnotherIM/xmpp/models/Roster.swift

30 lines
472 B
Swift
Raw Normal View History

2024-12-16 13:11:46 +00:00
import Foundation
enum RosterSubsriptionType: String {
case both
case from
case none
case remove
case to
var isFrom: Bool {
switch self {
case .from, .both:
return true
case .none, .to, .remove:
return false
}
}
var isTo: Bool {
switch self {
case .to, .both:
return true
case .none, .from, .remove:
return false
}
}
}