Swiftgram/submodules/Postbox/Sources/PeerPresence.swift
2021-09-03 00:45:22 +04:00

13 lines
331 B
Swift

public protocol PeerPresence: AnyObject, PostboxCoding {
func isEqual(to: PeerPresence) -> Bool
}
public func arePeerPresencesEqual(_ lhs: PeerPresence?, _ rhs: PeerPresence?) -> Bool {
if let lhs = lhs, let rhs = rhs {
return lhs.isEqual(to: rhs)
} else {
return (lhs == nil) == (rhs == nil)
}
}