leits / MeetingBar

πŸ‡ΊπŸ‡¦ Your meetings at your fingertips in the macOS menu bar
https://meetingbar.app
Apache License 2.0
4.36k stars 188 forks source link

Bug: Can't join MS Teams calendar invites when sent by Google Calendar #620

Closed joshjohanning closed 10 months ago

joshjohanning commented 1 year ago

macOS version

13.3.1 (a) (22E772610a)

MeetingBar version

4.4.0-4.5.1 (same issue)

Installation source

Homebrew

Calendars provider

Google Calendar

Bug description

Note how the second item on the list doesn't have a Teams link -

image

I believe that to be because the Teams link was created via Google Calendar.

Is it possible to add this parsing to MeetingBar to be able to support Teams meetings created via Google Calendar?

Here is a link to the Teams add-on for Google Calendar: https://workspace.google.com/marketplace/app/microsoft_teams_meeting/961264221134

And here is a snippet of the EML message being sent from Google Calendar. meeting-eml-snippet.txt

Reproduction steps

  1. Send Teams meeting from Google Calendar
  2. No option to join teams meeting from MeetingBar

Expected behavior

  1. MeetinBar opens browser tab to join Teams meeting

Screenshots/screen recordings

When testing the regex, it makes sense why it isn't working, it isn't picking up the whole link.

image

On further examination, it looks like Google Calendar is breaking up the lines in the calendar invite email it sends.

image

Something like this regex might work?

let teams = try! NSRegularExpression(pattern: #"https?://teams\.microsoft\.com/l/meetup-join/[a-zA-Z0-9_%\/=\-\+\..|\n?]+"#)
image

Additional context

No response

leits commented 10 months ago

Hi @joshjohanning,

Thanks for the request. Sorry for the delay. Is this still relevant?

joshjohanning commented 10 months ago

Yes @leits still relevant!

Teams meeting created via Google Calendar:

image

Doesn't have a Teams icon in MeetingBar:

image

And can't join:

image

leits commented 10 months ago

Thanks for the feedback!

I've dug deeper and see that adding a \n to the regex can cause a problem for other users. Since there are no upvoters on this issue, I propose you add this regex to your custom regexes in Advanced Preferences.

Thanks for the report!

joshjohanning commented 10 months ago

I couldn't get that to work 😒 Am I adding it correctly before I dig into the regex more?

image
leits commented 10 months ago

Try to add not a swift code, but only a regex part πŸ˜„

https?://teams\.microsoft\.com/l/meetup-join/[a-zA-Z0-9_%\/=\-\+\..|\n?]+
joshjohanning commented 4 months ago

@leits I think that new line char was a misnomer. But I STILL cannot get a custom regex to work :(

Here's the meeting invite txt in question. I can't find any reason why the existing Teams regex won't work, can you?

invite.ics.txt

joshjohanning commented 4 months ago

Unsure if the special characters that Google throws into the description throws things off.

DESCRIPTION:-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-\nJoin Microsoft Teams Meeting\nhttps://teams.microsoft.com/l/meetup-join/19%3ameeting_abcdefTg2NjItNDE4ZC001234567NmItZWRiNTUwMTI1Mjlm%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-abcd-defg-1234-56789%22%2c%22Oid%22%3a%221c74eb3f-1234-5678-91011-123456789%22%7d (ID: abcdefg)\n\nJoin by phone\n(US toll) +1 323-849-1234\n\n<a rel="noop

IE the -::~:~