mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-17 19:09:56 +00:00
Added call debug saving method Added application-specific ordered list item collection ids
23 lines
898 B
Swift
23 lines
898 B
Swift
import Foundation
|
|
#if os(macOS)
|
|
import PostboxMac
|
|
import MtProtoKitMac
|
|
import SwiftSignalKitMac
|
|
#else
|
|
import Postbox
|
|
import MtProtoKitDynamic
|
|
import SwiftSignalKit
|
|
#endif
|
|
|
|
public func rateCall(account: Account, report: ReportCallRating, starsCount: Int32, comment: String = "") -> Signal<Void, NoError> {
|
|
return account.network.request(Api.functions.phone.setCallRating(peer: Api.InputPhoneCall.inputPhoneCall(id: report.id, accessHash: report.accessHash), rating: starsCount, comment: comment))
|
|
|> retryRequest
|
|
|> map { _ in }
|
|
}
|
|
|
|
public func saveCallDebugLog(account: Account, id: Int64, accessHash: Int64, log: String) -> Signal<Void, NoError> {
|
|
return account.network.request(Api.functions.phone.saveCallDebug(peer: Api.InputPhoneCall.inputPhoneCall(id: id, accessHash: accessHash), debug: .dataJSON(data: log)))
|
|
|> retryRequest
|
|
|> map { _ in }
|
|
}
|