Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Allow native Jitsi SDK on dev and staging Brave Talk hosts (#8754)
Browse files Browse the repository at this point in the history
  • Loading branch information
stoletheminerals authored Feb 9, 2024
1 parent 0d7f871 commit 1ab30ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
7 changes: 3 additions & 4 deletions Sources/Brave/Frontend/Browser/DomainUserScript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ enum DomainUserScript: CaseIterable {
"search-dev-local.brave.com"])
#if canImport(BraveTalk)
case .braveTalkHelper:
return Set(["talk.brave.com", "beta.talk.brave.com",
"talk.bravesoftware.com", "beta.talk.bravesoftware.com",
"dev.talk.brave.software", "beta.talk.brave.software",
"talk.brave.software"])
return Set(["talk.brave.com",
"talk.bravesoftware.com",
"talk.brave.software"])
#endif
case .bravePlaylistFolderSharingHelper:
return Set(["playlist.bravesoftware.com", "playlist.brave.com"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ window.__firefox__.includeOnce("BraveTalkScript", function($) {
});
});

if (document.location.host === "talk.brave.com") {
const postRoom = $((event) => {
if (event.target.tagName !== undefined && event.target.tagName.toLowerCase() == "iframe") {
launchNativeBraveTalk(event.target.src);
window.removeEventListener("DOMNodeInserted", postRoom)
}
});
window.addEventListener("DOMNodeInserted", postRoom);
}
const postRoom = $((event) => {
if (event.target.tagName !== undefined && event.target.tagName.toLowerCase() == "iframe") {
launchNativeBraveTalk(event.target.src);
window.removeEventListener("DOMNodeInserted", postRoom)
}
});
window.addEventListener("DOMNodeInserted", postRoom);
});

4 changes: 0 additions & 4 deletions Tests/ClientTests/DomainUserScriptTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ class DomainUserScriptTests: XCTestCase {
func testBraveTalkAPIAvailability() throws {
let goodURLs = [
URL(string: "https://talk.brave.com"),
URL(string: "https://beta.talk.brave.com"),
URL(string: "https://talk.bravesoftware.com"),
URL(string: "https://beta.talk.bravesoftware.com"),
URL(string: "https://dev.talk.brave.software"),
URL(string: "https://beta.talk.brave.software"),
URL(string: "https://talk.brave.com/account"),
].compactMap { $0 }

Expand Down

0 comments on commit 1ab30ba

Please sign in to comment.