mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Carry over isCloseFriend from non-min user
This commit is contained in:
parent
60c6d058e6
commit
f8a7d0e2e6
@ -104,7 +104,7 @@ extension TelegramUser {
|
|||||||
|
|
||||||
static func merge(_ lhs: TelegramUser?, rhs: Api.User) -> TelegramUser? {
|
static func merge(_ lhs: TelegramUser?, rhs: Api.User) -> TelegramUser? {
|
||||||
switch rhs {
|
switch rhs {
|
||||||
case let .user(flags, flags2, _, rhsAccessHash, _, _, _, _, photo, _, _, restrictionReason, botInlinePlaceholder, _, emojiStatus, _, _):
|
case let .user(flags, _, _, rhsAccessHash, _, _, _, _, photo, _, _, restrictionReason, botInlinePlaceholder, _, emojiStatus, _, _):
|
||||||
let isMin = (flags & (1 << 20)) != 0
|
let isMin = (flags & (1 << 20)) != 0
|
||||||
if !isMin {
|
if !isMin {
|
||||||
return TelegramUser(user: rhs)
|
return TelegramUser(user: rhs)
|
||||||
@ -137,7 +137,8 @@ extension TelegramUser {
|
|||||||
if (flags & (1 << 28)) != 0 {
|
if (flags & (1 << 28)) != 0 {
|
||||||
userFlags.insert(.isPremium)
|
userFlags.insert(.isPremium)
|
||||||
}
|
}
|
||||||
if (flags2 & (1 << 2)) != 0 {
|
|
||||||
|
if lhs.flags.contains(.isCloseFriend) {
|
||||||
userFlags.insert(.isCloseFriend)
|
userFlags.insert(.isCloseFriend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user