mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 03:40:18 +00:00
no message
This commit is contained in:
parent
368ecfb3a8
commit
4c8be1544c
@ -1,9 +1,11 @@
|
||||
#if os(macOS)
|
||||
import PostboxMac
|
||||
import SwiftSignalKitMac
|
||||
import MtProtoKitMac
|
||||
#else
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import MtProtoKitDynamic
|
||||
#endif
|
||||
|
||||
public typealias AdminLogEventId = Int64
|
||||
@ -116,7 +118,7 @@ public func channelAdminLogEvents(postbox: Postbox, network: Network, peerId: Pe
|
||||
if let _ = inputAdmins {
|
||||
flags += Int32(1 << 1)
|
||||
}
|
||||
return network.request(Api.functions.channels.getAdminLog(flags: flags, channel: inputChannel, q: query ?? "", eventsFilter: eventsFilter, admins: inputAdmins, maxId: maxId, minId: minId, limit: limit)) |> map { result in
|
||||
return network.request(Api.functions.channels.getAdminLog(flags: flags, channel: inputChannel, q: query ?? "", eventsFilter: eventsFilter, admins: inputAdmins, maxId: maxId, minId: minId, limit: limit)) |> mapToSignal { result in
|
||||
|
||||
switch result {
|
||||
case let .adminLogResults(apiEvents, apiChats, apiUsers):
|
||||
@ -198,7 +200,11 @@ public func channelAdminLogEvents(postbox: Postbox, network: Network, peerId: Pe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return postbox.transaction { transaction -> AdminLogEventsResult in
|
||||
updatePeers(transaction: transaction, peers: peers.map { $0.1 }, update: { return $1 })
|
||||
return AdminLogEventsResult(peerId: peerId, peers: peers, events: events)
|
||||
} |> introduceError(MTRpcError.self)
|
||||
}
|
||||
|
||||
} |> mapError {_ in return .generic}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user