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

Adding support for transcripts, recording, AI summarization and meeting subscription to channels #377

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

jespino
Copy link
Member

@jespino jespino commented May 15, 2024

This PR include 3 important changes:

  1. It allows the user to subscribe channels to meetings. That way, whenever that meeting is started outside mattermost it will post a message with a link to the meeting (identical to the one is create when you click the zoom button).
  2. Whenever a meeting is finish, if there is a recording it is going to report the recording, the transcription and the chat messages in replies to the original zoom post (this works for the meetings in the point 1 and for the meetings that are created using the zoom button).
  3. If you have the mattermost AI Copilot plugin installed and configured, whenever you receive the transcription and the chat, you can summarize them using the AI plugin.

Testing

For testing this, you should test the 3 features independently (there is some degree of overlap, but I going to propose independent test cases). Another important thing is that before you test it you need to configure the zoom application in the zoom marketplace with the right webhook events (it has change, so check out the documentation).

I expect all the test proposed here are executed after properly configuring zoom plugin and AI copilot plugin

Test case 1: Subscription

  • Go to zoom web interface and create a recurrent meeting.
  • Go to a channel and execute /zoom subscribe [meeting id], where [meeting id] is the ID of the created meeting in the pervious step (without spaces)
  • Go to the zoom web interface and initiate the recurrent meeting.
  • The expected behavior is that in some seconds after that, you see the post in the channel that is subscribe.
  • Stop the meeting.
  • After some seconds you should see reflected in the post that the meeting has ended
  • Go back to the channel and execute /zoom unsubscribe [meeting id], with the same meeting id.
  • Go back to the zoom web interface and initiate the recurrent meeting again.
  • The expected behavior is you don't see any post created in the channel.

Test case 2: Recordings, Chats, and Transcriptions (Without AI Copilot enabled)

  • Go to any channel and click the zoom button to start a meeting.
  • You will see the zoom post and you get automatically connect to the meeting.
  • Leave the meeting.
  • The post in some seconds is going to be mark as terminated.
  • No other messages are published later (you can skip this step because you can verify it later).
  • Open another zoom meeting using the same process.
  • Send a chat message
  • Start the recording
  • Say some text to get that in the transcription
  • Send another chat message
  • Stop the recording
  • Leave the meeting.
  • After this, you will see the post message changing to ended (in some seconds).
  • Then, after some minutes (maybe around 5), you will receive 2 new posts. one attaching the transcription, and one attaching the chat and including a link to the recording with the password.
  • Check the transcription and see if that is the one.
  • Check the chat and verify that only the message sent during the recording is there.
  • Check the recording link and password (maybe you need to use an incognito window to require the password)

Test case 3: AI Summarization (With AI Copilot enabled)

  • Follow all the steps of the test case 2 with AI copilot enable
  • In the transcription message and in the chat message you should see a new button that allows you to summarize the content.
  • Click that button in the chat history message and see the AI copilot summarizing it
  • Click that button in the transcription message and see the AI copilot summarizing it
  • If the text in the chat history or the transcription is too short the AI copilot can send you non-sense, if you want to have a better result with the AI copilot use more messages in the chat and speak more to include more text in the transcription.

@jespino jespino requested a review from mickmister as a code owner May 15, 2024 17:56
@jespino jespino added the Do Not Merge Should not be merged until this label is removed label May 15, 2024
var response *http.Response
for retries > 0 {
var err error
response, err = http.DefaultClient.Do(request)

Check failure

Code scanning / CodeQL

Uncontrolled data used in network request Critical

The
URL
of this request depends on a
user-provided value
.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is because we are handling the incoming webhook from zoom as something secure, it should be signed if you configured it properly

return
}
request.Header.Set("Authorization", "Bearer "+webhook.DownloadToken)
response, err := http.DefaultClient.Do(request)

Check failure

Code scanning / CodeQL

Uncontrolled data used in network request Critical

The
URL
of this request depends on a
user-provided value
.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is because we are handling the incoming webhook from zoom as something secure, it should be signed if you configured it properly

Copy link
Contributor

Choose a reason for hiding this comment

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

CodeQL code tracing is 👌

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yes, I check the "show paths" and I was really impressed, It is pure gold.

@mickmister mickmister requested a review from ayusht2810 May 15, 2024 19:10
@mickmister mickmister added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels May 15, 2024
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.

Excellent feature here 🚀

I gave the PR a review and added some comments for discussion. Let me know what you think 👍

return
}
request.Header.Set("Authorization", "Bearer "+webhook.DownloadToken)
response, err := http.DefaultClient.Do(request)
Copy link
Contributor

Choose a reason for hiding this comment

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

CodeQL code tracing is 👌

server/command.go Show resolved Hide resolved
webapp/src/components/post_type_chat.jsx Outdated Show resolved Hide resolved
webapp/src/components/post_type_chat.jsx Outdated Show resolved Hide resolved
server/command.go Outdated Show resolved Hide resolved
server/webhook.go Show resolved Hide resolved
server/webhook.go Outdated Show resolved Hide resolved
server/webhook.go Show resolved Hide resolved
server/webhook.go Show resolved Hide resolved
server/webhook.go Outdated Show resolved Hide resolved
@jespino jespino requested a review from mickmister May 17, 2024 08:13
@jespino
Copy link
Member Author

jespino commented May 17, 2024

@mickmister PTAL

@azigler
Copy link

azigler commented Jul 15, 2024

I opened a docs PR to correspond with the changes in this PR.

mattermost/docs#7276

@azigler
Copy link

azigler commented Jul 16, 2024

@jespino Currently there is no way to know what meetings a channel is subscribed to, which makes it hard to know what state it's in. Should we add a slash command (maybe /zoom list) that shows subscriptions for the channel?

@azigler
Copy link

azigler commented Sep 6, 2024

Is there a timeline for merging this?

@jespino
Copy link
Member Author

jespino commented Sep 6, 2024

@azigler not really, we are still waiting for the security review and there are other things that are higher priority.

@wiggin77
Copy link
Member

@jespino Any appetite for getting this merged while we're still using Zoom?

@jespino
Copy link
Member Author

jespino commented Sep 26, 2024

@wiggin77 I would love to see this merged, but it requires the security review and it is still pending, I guess V10 release has keep the security team busy for this kind of things. @esarafianou any news on this?

Copy link
Member

@wiggin77 wiggin77 left a comment

Choose a reason for hiding this comment

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

Leaving this request for change to get this off my review queue until it is ready.

@Kshitij-Katiyar
Copy link
Contributor

@jespino Can you sync this PR with master, this fix some of the failing ci

@jespino
Copy link
Member Author

jespino commented Jan 11, 2025

@wiggin77 It looks like @enzowritescode is going to start with the security review soon, so feel free to start reviewing the code.

@jespino jespino requested review from wiggin77 and enzowritescode and removed request for ayusht2810 January 11, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester 3: Security Review Review requested from Security Team Do Not Merge Should not be merged until this label is removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants