Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Core/Core/Common/Extensions/Foundation/URLExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,10 @@ public extension URL {

public extension String {
func replaceHostWithCanvasForCareer() -> String {
replacing("pd.instructure.com", with: "pd.canvasforcareer.com")
.replacing("intelvio.instructure.com", with: "intelvio.canvasforcareer.com")
.replacing("horizon.cd.instructure.com", with: "dev.cd.canvashorizon.com")
let newString = replacing("horizon.cd.instructure.com", with: "dev.cd.canvashorizon.com")
if let range = newString.range(of: "instructure.com") {
return newString.replacingCharacters(in: range, with: "canvasforcareer.com")
}
return newString
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,6 @@ class AssistChatInteractorLive: AssistChatInteractor {
return
chatMethod
.map { AssistChatResponse(message: AssistChatMessage(botResponse: $0), chatHistory: history) }
.flatMap { [weak self] response in
guard let self = self else {
return Empty<AssistChatResponse, Error>(completeImmediately: true).eraseToAnyPublisher()
}
return self.chipGenerator(history: response.chatHistory, pageContext: pageContext)
.map { chipOptions in
AssistChatResponse(
chipOptions: chipOptions,
chatHistory: response.chatHistory
)
}
.eraseToAnyPublisher()
}
.eraseToAnyPublisher()
case .flashcards:
return flashcards(
Expand Down