Skip to content

Commit

Permalink
Merge pull request #731 from bgjooon/support-zm-page-links
Browse files Browse the repository at this point in the history
Add support for zm.page links
  • Loading branch information
leits authored Jun 17, 2024
2 parents 13d27ac + a74bdaf commit 4fd4864
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "zm_page_icon.svg",
"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.
6 changes: 6 additions & 0 deletions MeetingBar/MeetingServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ enum MeetingServices: String, Codable, CaseIterable {
case pumble = "Pumble"
case suitConference = "Suit Conference"
case doxyMe = "Doxy.me"
case zmPage = "zm.page"
case other = "Other"

var localizedValue: String {
Expand Down Expand Up @@ -321,6 +322,7 @@ struct LinksRegex {
let pumble = try! NSRegularExpression(pattern: #"https?://meet\.pumble\.com/[a-z-]+"#)
let suitConference = try! NSRegularExpression(pattern: #"https?://([a-z0-9.]+)?conference\.istesuit\.com/[^\s]*+"#)
let doxyMe = try! NSRegularExpression(pattern: #"https://([a-z0-9.]+)?doxy\.me/[^\s]*"#)
let zmPage = try! NSRegularExpression(pattern: #"https?://([a-zA-Z0-9.]+)\.zm\.page"#)
}

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

case .some(.zmPage):
image = NSImage(named: "zm_page_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 @@ -41,7 +41,8 @@ let meetings = [
MeetingLink(service: .tuple, url: URL(string: "https://tuple.app/c/V1StGXR8_Z5jdHi6B")!),
MeetingLink(service: .pumble, url: URL(string: "https://meet.pumble.com/vly-hggs-xsn")!),
MeetingLink(service: .suitConference, url: URL(string: "https://turkcell.conference.istesuit.com/username")!),
MeetingLink(service: .doxyMe, url: URL(string: "https://bbc.doxy.me/dr.who")!)
MeetingLink(service: .doxyMe, url: URL(string: "https://bbc.doxy.me/dr.who")!),
MeetingLink(service: .zmPage, url: URL(string: "https://meetingbar.zm.page")!)
]

class MeetingServicesTests: XCTestCase {
Expand Down
13 changes: 13 additions & 0 deletions MeetingBarTests/Meetingbar-sample-data.ics
Original file line number Diff line number Diff line change
Expand Up @@ -409,4 +409,17 @@ DTSTART;TZID=Europe/Berlin:20201225T203000
SEQUENCE:1
DESCRIPTION:https://go.teamviewer.com/v15/m212323
END:VEVENT
BEGIN:VEVENT
CREATED:20240601T165407Z
UID:F012139F-5ED4-4617-8943-EBD0460D79ED
DTEND;TZID=Europe/Berlin:20240601T213000
TRANSP:OPAQUE
X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC
SUMMARY:ZM Page Test
LAST-MODIFIED:20240601T165434Z
DTSTAMP:20240601T165435Z
DTSTART;TZID=Europe/Berlin:20240601T203000
SEQUENCE:1
DESCRIPTION:https://meetingbar.zm.page
END:VEVENT
END:VCALENDAR

0 comments on commit 4fd4864

Please sign in to comment.