Giter VIP home page Giter VIP logo

mattermost-plugin-msteams-meetings's Introduction

Disclaimer

This repository is community supported and not maintained by Mattermost. Mattermost disclaims liability for integrations, including Third Party Integrations and Mattermost Integrations. Integrations may be modified or discontinued at any time.

Mattermost MS Teams Meetings Plugin

Build Status Code Coverage Release HW

Maintainer: @mickmister

Start and join voice calls, video calls, and use screen sharing with your team members via MS Teams Meetings.

Admin guide

Requirements

Mattermost Server v5.26+ is required.

Installation

Download the latest plugin binary release and upload it to your server via System Console > Plugin Management.

Once enabled, selecting the video icon in a Mattermost channel invites team members to join an MS Teams meeting, hosted using the credentials of the user who initiated the call.

Configuration

Step 1: Create a Mattermost App in Azure

  1. Sign in to the Azure portal using an admin Azure account.

  2. Navigate to App Registrations.

  3. Select New registration at the top of the page.

  4. Fill out the form with the following values:

    • Name: Mattermost MS Teams Meetings Plugin
    • Supported account types: Default value (Single tenant)
    • Redirect URI: https://(MM_SITE_URL)/plugins/com.mattermost.msteamsmeetings/oauth2/complete. Replace (MM_SITE_URL) with your Mattermost server's URL.
  5. Select Register to submit the form.

  6. Navigate to Certificates & secrets in the left pane.

  7. Select New client secret > Add, then copy the new secret in the bottom right corner of the screen. We'll use this value later in the Mattermost System Console.

  8. Navigate to API permissions in the left pane.

  9. Select Add a permission and choose Microsoft Graph in the right pane.

  10. Select Delegated permissions, and scroll down to select the OnlineMeetings.ReadWrite permissions.

  11. Select Add permissions to submit the form.

  12. Select Grant admin consent for... to grant the permissions for the application.

You're all set for configuration inside of the Azure portal.

Step 2: Configure plugin settings

  1. Copy the Client ID and Tenant ID from the Azure portal.

  2. Go to System Console > Plugins > MS Teams Meetings.

  3. Enter the following values in the fields provided:

    • tenantID - Copy from the Azure portal
    • clientID - Copy from the Azure portal
    • Client Secret - Copy from the Azure portal (generated in Certificates & secrets earlier in these instructions)
  4. Choose Save to apply the configuration.

Onboard users

When you’ve tested the plugin and confirmed it’s working, notify your team so they can get started. Copy and paste the text below, edit it to suit your requirements, and send it out.

Hi team,

The MS Teams Meetings plugin has been configured so you can use it for calls from within Mattermost. To get started, run the /mstmeetings connect slash command from any channel within Mattermost. Visit the documentation for more information.

User guide

Connect an MS Teams Account to Mattermost

Use the /mstmeetings connect slash command to connect an MS Teams account to Mattermost.

Start a call

Start a call either by selecting the video icon in a Mattermost channel or by using the /mstmeetings start slash command. Every meeting you start creates a new meeting room in MS Teams. If you start two meetings less than 30 seconds apart you'll be prompted to confirm that you want to create the meeting.

Disconnect an MS Teams account from Mattermost

Use the /mstmeetings disconnect slash command to disconnect an MS Teams account from Mattermost.

Development

Environment

This plugin contains both a server and web app portion. Read our documentation about the Developer Workflow and Developer Setup for more information about developing and extending plugins.

Server

Inside the /server directory, you will find the Go files that make up the server-side of the plugin. Within that directory, build the plugin like you would any other Go application.

Web app

Inside the /webapp directory, you will find the JavaScript files that make up the client-side of the plugin. Within that directory, modify files and components as necessary. Test your syntax by running npm run build.

Deploying to a Mattermost local server

It's on the Developer setup, but keep in mind It's necessary to enable PluginUploads.

Then you need to set these envvars to be able to upload the plugin:

export MM_SERVICESETTINGS_SITEURL=https://localhost:8065/   # Or other if needed
export MM_ADMIN_USERNAME=<MYUSERNAME>
export MM_ADMIN_PASSWORD=<MYPASSWORD>

Then run make deploy or MM_DEBUG=1 make deploy in case you want debugging from the root of the mattermost-plugin-msteams-meetings project.

Contact us

mattermost-plugin-msteams-meetings's People

Contributors

aaronrothschild avatar agarciamontoro avatar ayusht2810 avatar cjmartian avatar cwarnermm avatar hanzei avatar jasonblais avatar javaguirre avatar justinegeffen avatar jwilander avatar kshitij-katiyar avatar larkox avatar levb avatar mickmister avatar phoinixgrr avatar schleuse avatar sibasankarnayak avatar spirosoik avatar toninis avatar trilopin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-plugin-msteams-meetings's Issues

slash Command improvement

When i Use /mstmeetings help xyz then its ignore the extra parameter and give me the right output but when i use /mstmeetings start xyz or /mstmeetings disconnect xyz then it gives me the validation as "Too many parameters." but i expect start & disconnect should work same as help, it should not give the validation, it should ignore The Extra parameter.

2nd time when user Disconnect the account then Validation Message Should be Proper.

Currently when The User Disconnect account 2nd time then user is getting validation as "Failed to disconnect the user, err=must connect user account to Microsoft first" but we should not show text as err=.

simple Fix Should be just remove that text and The validation should be Failed to disconnect the user, must connect user account to Microsoft first

Plugin Intake

Mark as done after each step completed

As the individual doing plugin intake, you will need the following privileges.

  • Github repository admin access. You will see the Settings option tab if access has been granted. (next to Pull requests, Actions, Releases)
  • Mattermost Channel admin access. This will allow editing the channel header

The following options require Mattermost admin privileges. If you don't these (likely) ask management

  • Mattermost sysadmin access.
    • Needed for creating new public channels
    • Needed for /jira subscribe if applicable

Repository Setup - Settings

  • Options (Make sure the following are the only selected items)

    • Features:
      • Wikis
      • Restrict editing to users in teams with push access only
      • Issues
      • Projects
    • Data services
      • Security alerts
    • Merge Button:
      • Allow squash merging
      • Automatically delete head branches
  • Setup GitHub 1st Project

  • Collaborators (Manage Access)

  • Added the following:

    • mattermost/core-build-engineers
    • mattermost/core-committers
    • mattermost/core-developers
    • mattermost/core-pms
    • mattermost/integrations
    • mattermost/qa-core-team
    • mattermost/tech-writers
  • Branches
    Branch protection Rules: master should already be available. Click edit next to master and verify the following defaults

  • Branch name pattern: master

    • Applies to 1 branch: master
  • Protecting matching branches

    • Require pull request reviews before merging: required approving reviews :2
      • Dismiss stale pull request approvals when new commits are pushed
    • Require status checks to pass before merging
      • Require branches to be up to date before merging
  • Webhooks

  • Add codecov.io, create the webhook from codecove.io/gh/mattermost/mattermost-plugin-

    • Settings > General > GitHub Webhook > Create new webhook
      • This will add the webhook to GH. View in GH > Settings > Webhooks
  • CircleCI (DONE - Don't need to do because exists from OSS forking)

  • Mattermod

    • Payload URL: https://mattermod.mattermost.com/pr_event
    • Content Type: application/json
    • Secret: ?? Where to get secret?
    • Which events to trigger webhook?
      • Let me select individual events
        • Issue Comments
        • Issues
        • Pull requests
        • Select Active

Install GitHub Apps

  • CircleCi Checks
  • Dependabot Preview

README.md

  • add circleci badge
  • add codecov badge
  • add go report badge

If these don't exist, create Tickets for each (these are available in the Demo page)

  • Add HW to Readme
  • Slash commands documented
  • Images added
  • Installation / Configuration section added

Repository checks

Each of the following might require new commits and PRs against master.

These are 1:1 with the Open source repo.

  • go mod tidy
  • version
  • All tests passing
  • npm audit fix
  • npm-check -E -u to view the changes interactively
  • npm-check -E -y to update without interactive
    • check in package-lock.json and package.json
  • grep for original repo references in all files

Mattermost Channels Setup

  • Plugin: <plugin_name> - setup new plugin channel
    • Add plugin author and some other integration team members
    • Github subscribe
      • /github subscribe mattermost/mattermost-plugin-solar-lottery pulls,issues,creates
    • (n/a) Jira subscribe - need an epic!!! (or what? Really need components?)
    • Header: [HW] | [repo] | [circle-ci] | PM: | Dev:
Actual text for header - replace all instances of <plugin_repo>, <pm-name>, <dev-name>

[GitHub](https://github.com/mattermost/<plugin_repo>) | [Help Wanted](https://github.com/mattermost/<plugin_repo>/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22up+for+grabs%22+label%3A%22help+wanted%22+sort%3Aupdated-desc) | [![CircleCI](https://circleci.com/gh/mattermost/<plugin-repo-namme>.svg?style=shield)](https://circleci.com/gh/mattermost/<plugin-repo) | PM: @<pm-name> | Dev: @<dev-name>
  • GitHub subscribe in ~Plugin Heartbeat channel
    • /github subscribe mattermost/mattermost-plugin-solar-lottery pulls

The rest

Add all people in the channel to the meeting

Meeting creation allows you to add the people to the meeting directly. This will make it so you don't have to give permission to enter the meeting to each one.

The idea of this ticket is to add all people signed in into MSTeams Calling that are on the channel to the meeting.

Add warning when creating a meeting on channels

Channels (public and private) may have lots of people in the channel, and creating a meeting on those is oftentimes a mistake or a missclick. We would like to add a confirmation message when creating a meeting on public and private channels, warning the user they are about to create a meeting in a channel with X users, with a button to create the meeting either way.

Add subject to meetings

Meetings can have a subject. How do we want to provide the subject?

Shall we use the same behaviour as Jitsi?

MS Teams collision detection will throw an error if users mashes the Create New Meeting button

For MS Teams collision detection, there is a delay of a few seconds when there is an existing meeting and the user clicks Create New Meeting

If the user mashes the button by clicking it many times during this delay it can produce an error in an ephemeral post. The user will then see one meeting creation post for each of the times they've click the button.

I was not able to repro this on Zoom. I also don't see this same 2-3 second delay when creating a new meeting from the collision post.

There is no issue with the Create New Meeting button if you just wait for a few seconds for your new meeting to launch.

Steps

  • Setup MS Team Calling
  • Start a meeting
  • Click the connect link and map the user is needed
  • Immediately start a 2nd meeting
  • When the collision post appears - Mash the Create New Meeting button very quickly
    Observed:
    MSTeams-Collison

Master branch is throwing an error on webapp plugin startup

Webapp plugin is throwing this error:

index.js:3 Uncaught ReferenceError: process is not defined
    at Object.b (index.js:3)
    at __webpack_require__ (bootstrap:18)
    at Object.<anonymous> (hoist-non-react-statics.cjs.js:3)
    at __webpack_require__ (bootstrap:18)
    at Module.<anonymous> (displayName.js:23)
    at __webpack_require__ (bootstrap:18)
    at Module.module.exports (utils.browser.esm.js:40)
    at __webpack_require__ (bootstrap:18)
    at Module.<anonymous> (com.mattermost.msteamsmeetings_bc87e61d204c5460_bundle.js:5815)
    at __webpack_require__ (bootstrap:18)

Here's the file that's throwing the error:
node_modules/react-is/index.js

'use strict';

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./cjs/react-is.production.min.js');
} else {
  module.exports = require('./cjs/react-is.development.js');
}

Intermittent issue where authentication tab shows invalid state

There seems to be an intermittent issue where the tab used to authenticate to Azure shows invalid state.

This did not occur on each attempt. Interestingly. The user connected without issue and there seem to be no functional problems.

I saw no indication in the logs as to why the browser said invalid state and the authentication seemed to work fine.

Steps used:

  • Login to Mattermost
  • Type /msteams start
  • Click the connection link (opens in a new tab)
  • Provide credetials

Observed: Invalid State
Expected: Message that authentication succeeded and I should close the tab.

MS-TeamsInavlidUser

MS Teams call icon is only showing in the collapsed plugin list

When there are only a few plugins enabled that have a plugin icon in the header the MS Teams Icon is no longer showing. The icon only shows in the collapsed menu.
Screen Shot 2020-11-17 at 1 24 07 PM

Missing here...
Screen Shot 2020-11-17 at 1 24 47 PM

The button is just styled in a way that makes it invisible.
Screen Shot 2020-11-17 at 1 38 50 PM

This bug is happening when I have my MM server running the master branch. Seems possible this is a bug I missed when testing #27

The plugin seems otherwise running and functional.

400 on installing using binary

Hi,

I am very enthusiastic about using this plugin, as I might be able to continue using MM and avoid switching fully to teams for messaging :D

I tried installing the plugin on a gitlab omnibus provided instance using the .tar.gz 1.0.0 file, and I got a 400 from the server.

Message in the tool is : Received invalid response from the server.

400 in FF console is : POST https://mattermost.clap-labs.fr/api/v4/plugins -> 400 bad request.

I tried to use the plugin marketplace as suggested in the install guide, but I could not find the plugin in it (I am using this one https://api.integrations.mattermost.com/)

I did not find anything in the logs regarding the issue.

Mattermost Team Edition
Mattermost Version: 5.31.1
Database Schema Version: 5.30.0
Database: postgres

Add Enterprise check

Add Enterprise check to not allow the plugin be run unless you have an E20 license installed.

Handle panic and crash when user is returned as nill from Azure

With 1 particular user, I am seeing the authentication process return a 500 and the plugin will crash.
Other user are not affected.

In any case, we should handle this to prevent the crash should anyone else come accross a case like this where something seems to be invalid with the users.

See logs

{"level":"debug","ts":1603489636.774614,"caller":"web/handlers.go:100","msg":"Received HTTP request","method":"POST","url":"/api/v4/logs","request_id":"ho6mugii7bb5jbct4367eni1ge","status_code":"200"}
{"level":"debug","ts":1603489643.640474,"caller":"wsapi/websocket_handler.go:25","msg":"Websocket request","action":"user_update_active_status"}
{"level":"debug","ts":1603489647.0510972,"caller":"plugin/hclog_adapter.go:53","msg":"panic: runtime error: invalid memory address or nil pointer dereference","plugin_id":"com.mattermost.msteamsmeetings"}
{"level":"debug","ts":1603489647.05122,"caller":"plugin/hclog_adapter.go:53","msg":"[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1e792b6]","plugin_id":"com.mattermost.msteamsmeetings"}
{"level":"debug","ts":1603489647.051265,"caller":"plugin/hclog_adapter.go:53","msg":"","plugin_id":"com.mattermost.msteamsmeetings"}
{"level":"debug","ts":1603489647.0513,"caller":"plugin/hclog_adapter.go:53","msg":"goroutine 6370 [running]:","plugin_id":"com.mattermost.msteamsmeetings"}
{"level":"debug","ts":1603489647.0513449,"caller":"plugin/hclog_adapter.go:53","msg":"main.(*Plugin).completeUserOAuth(0xc000387900, 0x2620680, 0xc0005f9650, 0xc000294300)","plugin_id":"com.mattermost.msteamsmeetings"}
{"level":"debug","ts":1603489647.051382,"caller":"plugin/hclog_adapter.go:53","msg":"\t/Users/dylanhaussermann/go/src/github.com/mattermost/mattermost-plugin-msteams-meetings/server/http.go:137 +0x7d6","plugin_id":"com.mattermost.msteamsmeetings"}
{"level":"debug","ts":1603489647.0514162,"caller":"plugin/hclog_adapter.go:53","msg":"main.(*Plugin).ServeHTTP(0xc000387900, 0xc00007ae40, 0x2620680, 0xc0005f9650, 0xc000294300)","plugin_id":"com.mattermost.msteamsmeetings"}

Intermittent issue where user see's an error and must click the connection link a 2nd time

There is an intermittent error where users must click the connection link a 2nd time. On the 1st attempt the new tab shows the message about needing to connect the user first.
Clicking the link a 2nd time then works as expected.

image

Unfortunately there is very little info on how prevalent this issue is. The issue may be HA related.
Most extensive testing showed it occurred 2/10 time on a server with 2 cluster instances.

What was determined is that issue does occur on v1.0.1 and is not new to upgrading to version v2.0.0

Maybe requires a separate issue but on occasion the following error can also occur in similar conditions.
image

MS Teams Calling shows plugin ID as App Bar tooltip

When MS Teams is moved to the app bar, the tooltip seems to change. The plugin now shows the plugin ID instead of the previous tooltip about starting a meeting.

Short of the App Bar, I see so other change causing the tooltip to change. Likely this was missed in testing when MS teamms registered a new icon in the App Bar
image

Note: Not sure on the solution here as I believe the more permanent place for this is in the new Calls componenet

Improve Installation & Configuration Docs

Make sure that numbered lists don't reset to 1. after screenshots

Make sure images render correctly, e.g. <img width="500 src="https://user-images.githubusercontent.com/6913320/76348298-55cd4880-62de-11ea-8e0e-4ace3a8f8fcb.png"/>

Make it clear whether you need an Office365 subscription and/or account for Teams to work

Make sure screenshots of permissions show the minimum necessary permissions for the teams plugin to work and also list these permissions as text

Add note that you must be an admin to grant admin consent, and that if the option is greyed out you need to to contact your Azure administrator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.