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