Swiftgram/submodules/Postbox/Postbox/PeerPresence.swift
2019-07-26 15:03:21 +01:00

13 lines
327 B
Swift

public protocol PeerPresence: class, 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)
}
}