mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
[skip ci]
This commit is contained in:
@@ -174,16 +174,14 @@ public struct LegacyPeerSummaryCounterTags: OptionSet, Sequence, Hashable {
|
|||||||
public extension PeerSummaryCounterTags {
|
public extension PeerSummaryCounterTags {
|
||||||
static let contact = PeerSummaryCounterTags(rawValue: 1 << 3)
|
static let contact = PeerSummaryCounterTags(rawValue: 1 << 3)
|
||||||
static let nonContact = PeerSummaryCounterTags(rawValue: 1 << 4)
|
static let nonContact = PeerSummaryCounterTags(rawValue: 1 << 4)
|
||||||
static let smallGroup = PeerSummaryCounterTags(rawValue: 1 << 5)
|
static let group = PeerSummaryCounterTags(rawValue: 1 << 5)
|
||||||
static let largeGroup = PeerSummaryCounterTags(rawValue: 1 << 6)
|
|
||||||
static let bot = PeerSummaryCounterTags(rawValue: 1 << 7)
|
static let bot = PeerSummaryCounterTags(rawValue: 1 << 7)
|
||||||
static let channel = PeerSummaryCounterTags(rawValue: 1 << 8)
|
static let channel = PeerSummaryCounterTags(rawValue: 1 << 8)
|
||||||
|
|
||||||
static let all: PeerSummaryCounterTags = [
|
static let all: PeerSummaryCounterTags = [
|
||||||
.contact,
|
.contact,
|
||||||
.nonContact,
|
.nonContact,
|
||||||
.smallGroup,
|
.group,
|
||||||
.largeGroup,
|
|
||||||
.bot,
|
.bot,
|
||||||
.channel
|
.channel
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public let telegramPostboxSeedConfiguration: SeedConfiguration = {
|
|||||||
return .nonContact
|
return .nonContact
|
||||||
}
|
}
|
||||||
} else if let _ = peer as? TelegramGroup {
|
} else if let _ = peer as? TelegramGroup {
|
||||||
return .smallGroup
|
return .group
|
||||||
} else if let _ = peer as? TelegramSecretChat {
|
} else if let _ = peer as? TelegramSecretChat {
|
||||||
return .nonContact
|
return .nonContact
|
||||||
} else if let channel = peer as? TelegramChannel {
|
} else if let channel = peer as? TelegramChannel {
|
||||||
@@ -37,9 +37,9 @@ public let telegramPostboxSeedConfiguration: SeedConfiguration = {
|
|||||||
return .channel
|
return .channel
|
||||||
case .group:
|
case .group:
|
||||||
if channel.username != nil {
|
if channel.username != nil {
|
||||||
return .largeGroup
|
return .group
|
||||||
} else {
|
} else {
|
||||||
return .smallGroup
|
return .group
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ public func joinChannel(account: Account, peerId: PeerId) -> Signal<RenderedChan
|
|||||||
|> take(1)
|
|> take(1)
|
||||||
|> castError(JoinChannelError.self)
|
|> castError(JoinChannelError.self)
|
||||||
|> mapToSignal { peer -> Signal<RenderedChannelParticipant?, JoinChannelError> in
|
|> mapToSignal { peer -> Signal<RenderedChannelParticipant?, JoinChannelError> in
|
||||||
#if DEBUG
|
|
||||||
return .fail(.tooMuchJoined)
|
|
||||||
#endif
|
|
||||||
if let inputChannel = apiInputChannel(peer) {
|
if let inputChannel = apiInputChannel(peer) {
|
||||||
return account.network.request(Api.functions.channels.joinChannel(channel: inputChannel))
|
return account.network.request(Api.functions.channels.joinChannel(channel: inputChannel))
|
||||||
|> mapError { error -> JoinChannelError in
|
|> mapError { error -> JoinChannelError in
|
||||||
|
|||||||
Reference in New Issue
Block a user