[skip ci]

This commit is contained in:
overtake
2020-03-09 12:11:07 +01:00
parent d6243fb78b
commit 4c095a8da3
3 changed files with 5 additions and 10 deletions

View File

@@ -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
] ]

View File

@@ -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 {

View File

@@ -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