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

[GH-199] Added a ephemeral message if the user is using PMI and his/her PMI setting is disable on Zoom. #324

Merged
merged 17 commits into from Jan 2, 2024

Conversation

raghavaggarwal2308
Copy link
Contributor

@raghavaggarwal2308 raghavaggarwal2308 commented Nov 23, 2023

Summary

  • If a user is using a Personal Meeting ID (PMI) for meeting creation and his/her PMI setting is disabled in the Zoom settings, the meeting was getting created with an invalid meeting ID. We updated the code to send an ephemeral message to the user to enable PMI in the Zoom settings.
  • Fixes the issue with the /zoom settings command not working in the threads view.
  • Fixes the issue with slack attachment to ask for PMI setting not getting posted in the threads view.

Screenshot

  1. Ephemeral message:
    image
  2. Settings command:
    image
  3. Slack attachment to ask for PMI:
    image

What to test?

  • An ephemeral message is received if the user is using PMI and his PMI setting is disabled on Zoom.
Steps to reproduce:
  1. Connect your Zoom account.
  2. Run the /zoom settings command and set the "Use your Personal Meeting ID" setting to "Yes".
  3. Make sure that "Enable Personal Meeting ID" is "false" on the Zoom settings page.
  4. Run the /zoom start command OR click on the Zoom icon in the app bar.
Environment:

MM version: v9.2.2
Node version: 14.18.0
Go version: 1.20.11

Ticket Link

Fixes #199

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 51 lines in your changes are missing coverage. Please review.

Comparison is base (8f844a9) 18.86% compared to head (31298da) 18.42%.

Files Patch % Lines
server/http.go 0.00% 42 Missing ⚠️
server/command.go 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
- Coverage   18.86%   18.42%   -0.44%     
==========================================
  Files           9        9              
  Lines        1479     1514      +35     
==========================================
  Hits          279      279              
- Misses       1149     1184      +35     
  Partials       51       51              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

1. Setting command not working in threads view
2. Slack attachment to ask for PMI setting not getting posted in threads view.
@mickmister mickmister added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester 1: UX Review Requires review by a UX Designer labels Nov 28, 2023
@mickmister
Copy link
Member

@raghavaggarwal2308 Under what circumstances does the ephemeral message in the PR description come up? When the user tries to start a meeting specifically with their PMI?

Copy link
Member

@mickmister mickmister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this @raghavaggarwal2308 👍 I have a few comments and requested a review from UX on the new functionality

server/command.go Outdated Show resolved Hide resolved
server/http.go Outdated Show resolved Hide resolved
@raghavaggarwal2308
Copy link
Contributor Author

@raghavaggarwal2308 Under what circumstances does the ephemeral message in the PR description come up? When the user tries to start a meeting specifically with their PMI?

@mickmister Yes, PMI should be disabled on the Zoom side and enabled on MM.

@mickmister
Copy link
Member

@raghavaggarwal2308 I mean, does this error still show up if the user just wants to create a meeting with a unique meeting id?

@mickmister mickmister removed the 2: Dev Review Requires review by a core committer label Nov 28, 2023
@raghavaggarwal2308
Copy link
Contributor Author

@raghavaggarwal2308 I mean, does this error still show up if the user just wants to create a meeting with a unique meeting id?

@mickmister No, only when the user is trying to create a meeting with PMI and it's disabled on Zoom.
I am attaching screenshots to clarify it more. In both screenshots, PMI is disabled on the Zoom side.

image
image

@mickmister
Copy link
Member

mickmister commented Nov 29, 2023

@raghavaggarwal2308 One thing comes to mind that maybe we should keep the two options showing if we reach that error, so the user can recorrect their action as:

  • "Okay, I'll create with a unique id instead"
  • or "Okay I changed my settings in Zoom, now I want to create with my PMI with one click"

Or we can let them know before that step and say something like "We've disabled the PMI button because you don't have zoom configured correctly"

I'll defer this UX decision to @asaadmahmood or @matthewbirtch

@mickmister mickmister self-requested a review November 29, 2023 19:21
@asaadmahmood
Copy link
Contributor

I think if the user tries to create the meeting without the PMI configured, we just automatically create the meeting without asking the user, but let him know that his PMI is not configured in zoom, so he can't create a meeting using it.

And once he has configured his PMI, we can ask him again when he tries to create a new zoom meeting.

@raghavaggarwal2308 @mickmister

@raghavaggarwal2308
Copy link
Contributor Author

@mickmister Made the changes suggested by @asaadmahmood. Now we are creating a meeting with unique meeting ID if PMI is disabled on Zoom side and enabled on MM.

@mickmister
Copy link
Member

@asaadmahmood Are you able to take this PR for a spin to see the flow in action?

@asaadmahmood
Copy link
Contributor

@raghavaggarwal2308 Is it possible to create a video recording of the flow and send it here?

@raghavaggarwal2308
Copy link
Contributor Author

@asaadmahmood @mickmister Here is a recording with all the different flows for creating a meeting: Demo video

@asaadmahmood
Copy link
Contributor

@raghavaggarwal2308 Looks good to me

Copy link
Member

@mickmister mickmister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one comment about sending errors back to the client

meetingID, createMeetingErr = p.createMeetingWithoutPMI(user, zoomUser, req.ChannelID, topic)
if createMeetingErr != nil {
p.API.LogWarn("failed to create the meeting", "Error", createMeetingErr.Error())
http.Error(w, createMeetingErr.Error(), http.StatusInternalServerError)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this call to http.Error make this error show in the client? Maybe we want something more user-friendly if so. Wondering about the other calls to http.Error as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister Yes, the error is shown to the client. Do you want us to show the user a generic message whenever we get an API error?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends how low-level or cryptic these errors are. I trust your judgment on this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister Updated, displaying a generic error to the user now.

@mickmister mickmister removed the 1: UX Review Requires review by a UX Designer label Dec 6, 2023
Comment on lines 16 to 24
let m = error.message;
if (error.message && error.message[0] === '{') {
const e = JSON.parse(error.message);

// Error is from Zoom API
if (e && e.message) {
m = '\nZoom error: ' + e.message;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this error may have some useful context for why the meeting couldn't start, like something going on with the user's zoom account. I'm thinking this can stay

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister Reverted the changes to display generic error message

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's mainly when we enter the "Error is from Zoom API" block that I'm thinking we should show the provided error. If the others from our server are more cryptic/low-level, then let's only show the error from error.message if the error came from Zoom, meaning we are in the "Error is from Zoom API" block here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister Just to clarify, if we are in the "Error is from Zoom API" block, then we show the error from the API and show a generic error otherwise. Right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raghavaggarwal2308 Yes that sounds right to me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister Updated

Copy link

@arush-vashishtha arush-vashishtha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the PR for the ephemeral message generated and the meeting created when the user has disabled the personal meeting on their zoom account and has selected yes in the message generated for /zoom settings.
The PR is working Fine. LGTM

Note: The message displayed in the screenshot for the ephemeral message is updated according to the discussion in the PR and is verified.
cc @AayushChaudhary0001

@avas27JTG avas27JTG merged commit e22524d into mattermost:master Jan 2, 2024
11 checks passed
@avas27JTG avas27JTG deleted the MM-199 branch January 2, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: QA Review Requires review by a QA tester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve explanation message for disabled setting "Enable Personal Meeting ID"
5 participants