Rename TelegramCore source folder

This commit is contained in:
Peter
2019-10-29 00:13:20 +04:00
parent d1e57a24bb
commit d2e57174a7
341 changed files with 9 additions and 69 deletions

View File

@@ -0,0 +1,32 @@
import Foundation
#if os(macOS)
import PostboxMac
import MtProtoKitMac
import SwiftSignalKitMac
import TelegramApiMac
#else
import Postbox
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
import SwiftSignalKit
#endif
public func rateCall(account: Account, callId: CallId, starsCount: Int32, comment: String = "", userInitiated: Bool) -> Signal<Void, NoError> {
var flags: Int32 = 0
if userInitiated {
flags |= (1 << 0)
}
return account.network.request(Api.functions.phone.setCallRating(flags: flags, peer: Api.InputPhoneCall.inputPhoneCall(id: callId.id, accessHash: callId.accessHash), rating: starsCount, comment: comment))
|> retryRequest
|> map { _ in }
}
public func saveCallDebugLog(account: Account, callId: CallId, log: String) -> Signal<Void, NoError> {
return account.network.request(Api.functions.phone.saveCallDebug(peer: Api.InputPhoneCall.inputPhoneCall(id: callId.id, accessHash: callId.accessHash), debug: .dataJSON(data: log)))
|> retryRequest
|> map { _ in }
}