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

Create new meeting instead of using PMI #147

Merged
merged 23 commits into from
Dec 20, 2021
Merged

Conversation

larkox
Copy link
Contributor

@larkox larkox commented Jul 17, 2020

Summary

Create new meetings instead of using the user PMI at the meeting creation

Ticket Link

Fix #81
Fix #106

@larkox larkox added 2: Dev Review Requires review by a core committer Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) 3: QA Review Requires review by a QA tester labels Jul 17, 2020
@larkox larkox added this to the v2.0.0 milestone Jul 17, 2020
@codecov
Copy link

codecov bot commented Jul 20, 2020

Codecov Report

Merging #147 (660ddf8) into master (bb036f8) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #147   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           8       8           
  Lines         860     882   +22     
======================================
- Misses        860     882   +22     
Impacted Files Coverage Δ
server/command.go 0.00% <0.00%> (ø)
server/http.go 0.00% <0.00%> (ø)
server/plugin.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb036f8...660ddf8. Read the comment docs.

@larkox larkox requested review from mickmister and hanzei and removed request for mickmister November 16, 2020 13:24
Copy link
Contributor

@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.

Awesome improvement @larkox! Just a few requests

server/http.go Outdated
Comment on lines 403 to 407
meeting, err := client.CreateMeeting(user.Email)
if err != nil {
p.API.LogWarn("Error creating the meeting", "err", err)
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the Mattermost user's email have to match the Zoom user's email? If so, can we communicate that to the user 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.

No, there is no need on OAuth. I will make some changes to properly handle this.

var ret Meeting
meetingRequest := CreateMeetingRequest{
Topic: "Meeting created on Mattermost",
Type: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a constant for this, and also a NewCreateMeetingRequest function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The constant will be done. Regarding the function, I am not sure how useful will be. We may eventually add more different kinds of meetings, and this approach seems good for the time being. Also, this definition is only repeated on the jwt and oauth code, but the jwt code will be removed for the next release.

Comment on lines 82 to 90
// Recurrence struct {
// Type int `json:"type"`
// RepeatInterval int `json:"repeat_interval"`
// WeeklyDays string `json:"weekly_days,omitempty"`
// MonthlyDay int `json:"monthly_day,omitempty"`
// MonthlyWeekDay int `json:"monthly_week_day,omitempty"`
// EndTimes int `json:"end_times,omitempty"`
// EndDateTime int `json:"end_date_time,omitempty"`
// } `json:"recurrence,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason we would want to have this commented out, rather than uncomment or remove 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.

I would like to keep it as reference. Right now removing the comments is not an option because it will send the "recurrence" field in the payload, and will create errors on zoom side.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you do *Recurrence with omitempty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed I can and I will. 😅

func (c *JWTClient) CreateMeeting(userEmail string) (*Meeting, error) {
var ret Meeting
meetingRequest := CreateMeetingRequest{
Topic: "Meeting created on Mattermost",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we let the user specify a meeting topic via /zoom start Let's have some fun!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That can be done, but I think it would be a great HW ticket, if you are willing to write it down.

Comment on lines 99 to 102
meetingRequest := CreateMeetingRequest{
Topic: "Meeting created on Mattermost",
Type: 1,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comments mentioned in jwt.go

Copy link
Contributor

@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, one non-blocking request to prefix MeetingType constants with the data type

Comment on lines 11 to 17
Instant MeetingType = 1
// Scheduled meeting
Scheduled MeetingType = 2
// RecurringWithNoFixedTime meeting
RecurringWithNoFixedTime MeetingType = 3
// RecurringWithFixedTime meeting
RecurringWithFixedTime MeetingType = 8
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have these prefixed with MeetingType? In other parts of the code, reading Instant is not easy to know that it is a meeting type

Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

LGTM

@hanzei
Copy link
Collaborator

hanzei commented Nov 17, 2020

Does this also fix #199?

@larkox
Copy link
Contributor Author

larkox commented Nov 17, 2020

@hanzei Yes and no. A follow-up to this PR is this one #181 . After that one, is merged, the problem of #199 will appear again if the user has set in Mattermost to use the PMI.

@hanzei
Copy link
Collaborator

hanzei commented Nov 17, 2020

Got it. Then let's keep #199 open.

@larkox
Copy link
Contributor Author

larkox commented Dec 1, 2020

Waiting for #184 to be merged and cut

@hanzei hanzei removed the 2: Dev Review Requires review by a core committer label Dec 1, 2020
@larkox larkox removed the Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) label Dec 15, 2020
@hanzei hanzei added the Do Not Merge Should not be merged until this label is removed label Nov 30, 2021
Copy link

@dipak-demansol dipak-demansol left a comment

Choose a reason for hiding this comment

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

@Hanze i when i deploy this PR code then first time when i use /zoom start command then still for the first time i can see that the PMI number is same, and some time the issue was not regenerated, after testing this again and again in the server & in the Private window, i did not found the issue so its LGTM

@dipak-demansol dipak-demansol added QA Review Done PR has been approved by QA and removed 3: QA Review Requires review by a QA tester labels Nov 30, 2021
@dipak-demansol
Copy link

Should i remove the do not merge tag? @hanzei

@dipak-demansol dipak-demansol added 4: Reviews Complete All reviewers have approved the pull request and removed Do Not Merge Should not be merged until this label is removed QA Review Done PR has been approved by QA labels Nov 30, 2021
@larkox
Copy link
Contributor Author

larkox commented Dec 1, 2021

I merged master into this, and should be ready to merge. I leave up to you if some smoke test is needed in case the merge went wrong.

@hanzei hanzei added 3: QA Review Requires review by a QA tester and removed 4: Reviews Complete All reviewers have approved the pull request Awaiting Submitter Action Blocked on the author labels Dec 1, 2021
@dipak-demansol
Copy link

@Hanze i when i deploy this PR code then first time when i use /zoom start command then still for the first time i can see that the PMI number is same, and some time the issue was not regenerated, after testing this again and again in the server & in the Private window, i did not found the issue so its LGTM

@hanzei pls see this video, i was talking about this issue

at.the.First.time.the.while.creating.the.meeting.link.should.be.the.random.mp4

@hanzei
Copy link
Collaborator

hanzei commented Dec 3, 2021

@larkox ☝️

Copy link

@dipak-demansol dipak-demansol left a comment

Choose a reason for hiding this comment

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

@larkox pls see the video, i reported a issue.

@hanzei hanzei added the Awaiting Submitter Action Blocked on the author label Dec 7, 2021
@larkox
Copy link
Contributor Author

larkox commented Dec 16, 2021

@dipak-demansol I was missing that particular case. It should be solved now.
I also removed a few references to PMI from some minor places.

Let me know if you find any other issue.

@hanzei hanzei removed the Awaiting Submitter Action Blocked on the author label Dec 17, 2021
Copy link

@dipak-demansol dipak-demansol left a comment

Choose a reason for hiding this comment

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

LGTM, Tested with the below Scenario.

  1. Manually Disconnected The zoom account and connected again and tested that PMI number is different or not.
  2. after 1 hour automatically the zoom account disconnect then connected zoom account and tested the same thing.
  3. many times Created the zoom meeting and every time its generating the different PMI number.

@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Dec 20, 2021
@hanzei hanzei merged commit 65af542 into mattermost:master Dec 20, 2021
mickmister added a commit that referenced this pull request Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not using Personal Meeting ID Feature request: change meeting ID when users call meeting
7 participants