Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reclaim.ai links support #593

Merged
merged 3 commits into from
Mar 8, 2023
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: 8 additions & 0 deletions MeetingBar/MeetingServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ enum MeetingServices: String, Codable, CaseIterable {
case demodesk = "Demodesk"
case zoho_cliq = "Zoho Cliq"
case slack = "Slack"
case reclaim = "Reclaim.ai"
case other = "Other"

var localizedValue: String {
Expand Down Expand Up @@ -299,6 +300,7 @@ struct LinksRegex {
let skype4biz_selfhosted = try! NSRegularExpression(pattern: #"https?:\/\/(meet|join)\.[^\s]*\/[a-z0-9.]+/meet\/[A-Za-z0-9./]+"#)
let hangouts = try! NSRegularExpression(pattern: #"https?://hangouts.google.com/[^\s]*"#)
let slack = try! NSRegularExpression(pattern: #"https?://app.slack.com/huddle/[A-Za-z0-9./]+"#)
let reclaim = try! NSRegularExpression(pattern: #"https?://reclaim.ai/z/[A-Za-z0-9./]+"#)
}

func getRegexForMeetingService(_ service: MeetingServices) -> NSRegularExpression? {
Expand Down Expand Up @@ -363,6 +365,12 @@ func getIconForMeetingService(_ meetingService: MeetingServices?) -> NSImage {
image = NSImage(named: "zoom_icon")!
image.size = NSSize(width: 16, height: 16)

case .some(.reclaim):
// reclaim only uses its own links when zoom is involved, so they are always zoom links
// see https://devforum.zoom.us/t/major-zoom-gcal-sync-problems-recent-behavior-change/80912
leits marked this conversation as resolved.
Show resolved Hide resolved
image = NSImage(named: "zoom_icon")!
image.size = NSSize(width: 16, height: 16)

// tested and verified
case .some(.webex):
image = NSImage(named: "webex_icon")!
Expand Down
1 change: 1 addition & 0 deletions MeetingBarTests/MeetingServicesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ let meetings = [
MeetingLink(service: .zoho_cliq, url: URL(string: "https://cliq.zoho.eu/meetings/alsfsma213")!),
MeetingLink(service: .slack, url: URL(string: "https://app.slack.com/huddle/T01ABCDEFGH/C02ABCDEFGH")!),
MeetingLink(service: .vimeo, url: URL(string: "https://venues.vimeo.com/12345678/abcdef123")!),
MeetingLink(service: .reclaim, url: URL(string: "https://reclaim.ai/z/T01ABCDEFGH/C02ABCDEFGH")!),
]

class MeetingServicesTests: XCTestCase {
Expand Down