Skip to content

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

Closed
jespino wants to merge 42 commits intomattermost:masterfrom
jespino:transcripts-recording-and-ai-summarization
Closed

Adding support for transcripts, recording, AI summarization and meeting subscription to channels#377
jespino wants to merge 42 commits intomattermost:masterfrom
jespino:transcripts-recording-and-ai-summarization

Conversation

@jespino
Copy link
Copy Markdown
Contributor

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

Documentation PR: mattermost/docs#7276

@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

The [URL](1) of this request depends on a [user-provided value](2).
Copy link
Copy Markdown
Contributor 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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can these CodeQL errors be suppressed? We don't want this on every PR going forward after merge.

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

The [URL](1) of this request depends on a [user-provided value](2).
Copy link
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
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 👌

case actionConnect:
return p.runConnectCommand(user, args)
case actionSubscribe:
return p.runSubscribeCommand(user, args, meetingID)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like this a lot 👍 Many Zoom meetings do not start in Mattermost, but now they kind of "do" because we can listen for that event in an intentionally subscribed channel. We do need to take access control into account here though. The person running this command should potentially not have access to that meeting

We'll also need to do some exploratory testing in general with this. e.g. Some conflict of meeting ids between starting a meeting in MM with a personal meeting id and a matching subscribed meeting id

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, probably the ideal solution is to not allow to subscribe personal meetings, and also ensure that you have access to the meeting before you subscribe it to the channel.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is done. Now, you can only subscribe to meetings that are not personal meetings, so the only meetings that you know the ID upfront are not ad-hoc meetings, so any meeting created within Mattermost should be a PMI or Ad-hoc created on the fly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so the only meetings that you know the ID upfront are not ad-hoc meetings

Sure but what if someone knows the meeting id and not e.g. a password, can they start funneling in recordings of the meetings in their own channel? Is "knowing the meeting id ahead of time" enough of a security measure?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@enzowritescode Thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@wiggin77 This has been on my TODO list for a while but other priorities have taken precedence. I even have a PR draft up from when I had started reviewing the plugin as a whole for better understanding #405.

Maybe with the introduction of Security Partners I can get this wrapped up in the next month or two

@jespino jespino requested a review from mickmister May 17, 2024 08:13
@jespino
Copy link
Copy Markdown
Contributor Author

jespino commented May 17, 2024

@mickmister PTAL

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@jespino
Copy link
Copy Markdown
Contributor 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 enzowritescode and wiggin77 and removed request for ayusht2810 January 11, 2025 08:16
@mattermost-build
Copy link
Copy Markdown
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@wiggin77 wiggin77 removed their request for review November 8, 2025 06:23
@esarafianou
Copy link
Copy Markdown

Removing the security review. Please re-add Product Security if the PR is picked up again.

@marianunez
Copy link
Copy Markdown
Member

Closing this PR as this work was moved and completed in #455

Thanks @jespino 👋

@marianunez marianunez closed this Mar 27, 2026
@mattermost-build mattermost-build removed the Do Not Merge Should not be merged until this label is removed label Mar 27, 2026
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 Lifecycle/1:stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.