Skip to content

Commit

Permalink
Resolve #557 Feature: Add Tuple call link support
Browse files Browse the repository at this point in the history
  • Loading branch information
leits committed Mar 9, 2023
1 parent 5c01513 commit 82695e5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "tuple_icon.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions MeetingBar/MeetingServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ enum MeetingServices: String, Codable, CaseIterable {
case zoho_cliq = "Zoho Cliq"
case slack = "Slack"
case reclaim = "Reclaim.ai"
case tuple = "Tuple"
case other = "Other"

var localizedValue: String {
Expand Down Expand Up @@ -298,9 +299,10 @@ struct LinksRegex {
let zoomgov = try! NSRegularExpression(pattern: #"https?://([a-z0-9.]+)?zoomgov\.com/j/[a-zA-Z0-9?&=]+"#)
let skype4biz = try! NSRegularExpression(pattern: #"https?://meet\.lync\.com/[^\s]*"#)
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./]+"#)
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./]+"#)
let tuple = try! NSRegularExpression(pattern: #"https://tuple\.app/c/[^\s]*"#)
}

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

case .some(.tuple):
image = NSImage(named: "tuple_icon")!
image.size = NSSize(width: 16, height: 16)

// tested and verified
case .none:
image = NSImage(named: "no_online_session")!
Expand Down
3 changes: 2 additions & 1 deletion MeetingBarTests/MeetingServicesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ 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")!)
MeetingLink(service: .reclaim, url: URL(string: "https://reclaim.ai/z/T01ABCDEFGH/C02ABCDEFGH")!),
MeetingLink(service: .tuple, url: URL(string: "https://tuple.app/c/V1StGXR8_Z5jdHi6B")!)
]

class MeetingServicesTests: XCTestCase {
Expand Down

0 comments on commit 82695e5

Please sign in to comment.