Respond to CR.

pull/1/head
Matthew Chen 6 years ago
parent d775a70a89
commit 8e44bf554c

@ -281,7 +281,7 @@ extension GiphyError: LocalizedError {
private let kGiphyBaseURL = "https://api.giphy.com/"
private func giphyAPISessionManager() -> AFHTTPSessionManager? {
return ReverseProxy.jsonSessionManager(baseUrl: kGiphyBaseURL)
return ContentProxy.jsonSessionManager(baseUrl: kGiphyBaseURL)
}
// MARK: Search

@ -415,7 +415,7 @@ extension URLSessionTask {
private lazy var giphyDownloadSession: URLSession = {
AssertIsOnMainThread()
let configuration = ReverseProxy.sessionConfiguration()
let configuration = ContentProxy.sessionConfiguration()
configuration.urlCache = nil
configuration.requestCachePolicy = .reloadIgnoringCacheData
configuration.httpMaximumConnectionsPerHost = 10

@ -8,7 +8,6 @@
#import "OWSQuotedReplyModel.h"
#import "OWSUnreadIndicator.h"
#import "TSUnreadIndicatorInteraction.h"
#import <PromiseKit/AnyPromise.h>
#import <SignalCoreKit/NSDate+OWS.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/SignalMessaging-Swift.h>

@ -23,7 +23,6 @@ public class OWSLinkPreviewInfo: NSObject {
@objc
public var imageFilePath: String?
@objc
public init(urlString: String, title: String?, imageFilePath: String? = nil) {
self.urlString = urlString
self.title = title
@ -152,7 +151,7 @@ public class OWSLinkPreview: MTLModel {
guard OWSLinkPreview.featureEnabled else {
throw LinkPreviewError.noPreview
}
let imageAttachmentId = OWSLinkPreview.saveAttachmentIfPossible(forFilePath: info.imageFilePath,
let imageAttachmentId = OWSLinkPreview.saveAttachmentIfPossible(inputFilePath: info.imageFilePath,
transaction: transaction)
let linkPreview = OWSLinkPreview(urlString: info.urlString, title: info.title, imageAttachmentId: imageAttachmentId)
@ -165,7 +164,7 @@ public class OWSLinkPreview: MTLModel {
return linkPreview
}
private class func saveAttachmentIfPossible(forFilePath filePath: String?,
private class func saveAttachmentIfPossible(inputFilePath filePath: String?,
transaction: YapDatabaseReadWriteTransaction) -> String? {
guard let filePath = filePath else {
return nil
@ -223,8 +222,7 @@ public class OWSLinkPreview: MTLModel {
"reddit.com",
"imgur.com",
"instagram.com",
"giphy.com",
"instagram.com"
"giphy.com"
]
// TODO: Finalize

@ -5,7 +5,7 @@
import Foundation
@objc
public class ReverseProxy: NSObject {
public class ContentProxy: NSObject {
@available(*, unavailable, message:"do not instantiate this class.")
private override init() {
Loading…
Cancel
Save