mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
13 lines
331 B
Swift
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)
|
|
}
|
|
}
|