Coder Social home page Coder Social logo

mattermost / mattermost-plugin-demo Goto Github PK

View Code? Open in Web Editor NEW
70.0 31.0 102.0 105.86 MB

A demo of what Mattermost plugins can do.

Home Page: https://developers.mattermost.com/extend/plugins/

License: Apache License 2.0

Makefile 7.26% Go 64.82% JavaScript 26.90% HTML 0.06% TypeScript 0.96%
hacktoberfest mattermost mattermost-plugin

mattermost-plugin-demo's Introduction

Demo Plugin

Build Status Code Coverage Release HW

Maintainer: @hanzei Co-Maintainer: @jfrerich

This plugin demonstrates the capabilities of a Mattermost plugin. It includes the same build scripts as mattermost-plugin-starter-template, but implements all supported server-side hooks and registers a component for each supported client-side integration point. See server/README.md and webapp/README.md for more details. The plugin also doubles as a testbed for verifying plugin functionality during release testing.

Once installed and enabled, you can specify both the channel and user for the demo plugin. If the specified channel or user doesn't exist, the plugin creates it for you.

Feel free to base your own plugin off this repository, removing or modifying components as needed. If you're already familiar with what plugins can do, consider starting from mattermost-plugin-starter-template instead, which includes the same build framework but omits the demo implementations.

Note that this plugin is authored for the Mattermost version indicated in the min_server_version within plugin.json, and is not compatible with earlier releases of Mattermost.

For details on getting started, see mattermost-plugin-starter-template.

Releasing this plugin

A new minor version of this plugin is released with every feature release of Mattermost. The new version should be cut until Code complete.

mattermost-plugin-demo's People

Contributors

cpanato avatar crspeller avatar dependabot[bot] avatar gupsho avatar hanzei avatar iomodo avatar isacikgoz avatar jespino avatar jfrerich avatar joebordes avatar justinegeffen avatar jwilander avatar kosgrz avatar kyeongsoosoo avatar levb avatar lieut-data avatar marianunez avatar matthewdorner avatar mickmister avatar patrickkang avatar qamarfarooq avatar rfoyard avatar saturninoabril avatar scottleedavis avatar shieldsjared avatar sibasankarnayak avatar spirosoik avatar streamer45 avatar tgkouras avatar topolovac avatar

Stargazers

 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  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  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-demo's Issues

Error when try to build plugin

Hi, on mac m1 build plugin end with errors.

end of log file:
7210 error npm ERR! c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.4"' -I/Users/****/.node-gyp/16.10.0/include/node -I/Users/****/.node-gyp/16.10.0/src -I/Users/****/.node-gyp/16.10.0/deps/openssl/config -I/Users/****/.node-gyp/16.10.0/deps/openssl/openssl/include -I/Users/****/.node-gyp/16.10.0/deps/uv/include -I/Users/****/.node-gyp/16.10.0/deps/zlib -I/Users/****/.node-gyp/16.10.0/deps/v8/include -I../src/libsass/include -O3 -gdwarf-2 -mmacosx-version-min=10.7 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/extend.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/extend.o ../src/libsass/src/extend.cpp 7210 error npm ERR! 7211 verbose exit 1

i can attach full log file if needed.

Typescript Migration

I'm having a hard-time trying to write a plugin for mattermost.
The mattermost starter template generates a webapp that uses typescript.
If I want to look into the plugin-demo to figure out how something is done, I cannot directly use code from there since I have to migrate it to typescript first.

It would be good if the demo used typescript as well, so that a plugin developer has some examples on how to implement stuff using typescript.

Are there any other plugins that use typescript already? So I can look into and lend ideas from there? :)

Localization not working on latest stable Mattermost

On the latest stable Mattermost release the demo plugin strings are always in English language; no matter what language settings are applied the strings won't show up in Espanol. I've built dist from master.

Cant build demo

I have tried to build this demo on both windows and centos and am getting failures.

On windows i assume it is my make command because Centos get furthers but on Centos when running make it fails due to the permissions on WriteFile being greater than 0600. I would have thought running make on the repo as it is on master should build correctly.

Am I missing something?

npm install err!

node v16.8.0

gleke@gleke-System-Product-Name:~/mattermost-plugin-demo/webapp$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: webapp@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"6.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   dev @typescript-eslint/parser@"1.13.0" from the root project
npm ERR!   peer @typescript-eslint/parser@"^1.9.0" from @typescript-eslint/[email protected]
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     dev @typescript-eslint/eslint-plugin@"1.13.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/gleke/.npm/eresolve-report.txt for a full report.

Make use of react-router in plugin-registered routes

Thanks to the recent PR #5367, plugins now have the ability to register custom routes, both under /plug/:pluginId/ and under /:teamId/:pluginId/. There is a really simple example of how to use this new feature in this repository: see PR #102.

The goal of this ticket is to improve the previous example, registering a more complex component that uses some of the features provided by react-router to manage subpaths under the new route. For example, we can register a new component under the team route /:teamId/:pluginId/demo, that has a couple of subpaths:

  • /:teamId/:pluginId/demo/sub_path
  • /:teamId/:pluginId/demo/sub_path_with_query?param=value

These subpaths must be managed by the root component registered before, using, for example, a <Switch> component, that will render a different element depending on the path. In the case of the path with query parameters, we can use the props provided by react-router to change the rendering of the element depending on the parameters.

Some considerations:

  • The goal of this ticket is not to demonstrate all of the features provided by react-router, but just a few of the most useful ones, in order to showcase that they are natively available. The ones described here may be a good starting point, but feel free to add any that you personally consider useful.
  • The UI of the registered component is not important in this ticket. For instance, the current example linked above simply renders a line of text. The focus should be on demoing the code, so keeping the UI as simple as possible will work.

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-25826

Demo Plugin v0.7.0 will not start up on mysql.test

When I upload the new release v0.7.0 of the demo plugin on my http://mysql.test.mattermost.com and try to enable it is crashes.
Logs show info related to trying to create a channel where the name already exists (among other things)
Perhaps there is an upgrade issue with the demo plugin.

{"level":"error","ts":1591898526.1935163,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"fom4du8r9pft9cycarqipexuhc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898526.3017197,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"y6bpsf5fx3f59ey6odwgbxre3c","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898528.1210191,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"cd8wkacsgp8pjd3e5sx1ryh6fc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898528.3408728,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"4opk4n3tkpfrjbqde94cpcaq5o","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898529.451237,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"7nqki141etnqtxgqtu4rrbhopy","error":"SqlUserStore.Save: This team has reached the maximum number of allowed accounts. Contact your System Administrator to set a higher limit., "}
{"level":"error","ts":1591898530.1260083,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"qfb1qrcbejywbj7hawkzuw1btw","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898530.293569,"caller":"[email protected]/stream.go:15","msg":" call to OnConfigurationChange failed, error: failed to ensure demo channels: CreateChannel: A channel with that name already exists on the same team., Channelexists id=47ioejhd67b9pnpwep1as3o4me Error 1062: Duplicate entry 'demo_plugin-z1599abuzffy8bdh4do9qzetho' for key 'Name'","plugin_id":"com.mattermost.demo-plugin","source":"plugin_stderr"}
{"level":"error","ts":1591898530.2969584,"caller":"mlog/sugar.go:23","msg":"Server configuration is not compatible","plugin_id":"com.mattermost.demo-plugin"}
{"level":"error","ts":1591898530.8210347,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"fom4du8r9pft9cycarqipexuhc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898530.9364452,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"y6bpsf5fx3f59ey6odwgbxre3c","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898532.7847457,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"cd8wkacsgp8pjd3e5sx1ryh6fc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898532.9855063,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"4opk4n3tkpfrjbqde94cpcaq5o","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898534.115114,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"7nqki141etnqtxgqtu4rrbhopy","error":"SqlUserStore.Save: This team has reached the maximum number of allowed accounts. Contact your System Administrator to set a higher limit., "}
{"level":"error","ts":1591898534.6991549,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"qfb1qrcbejywbj7hawkzuw1btw","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898534.862732,"caller":"mlog/log.go:175","msg":"Unable to activate plugin","plugin_id":"com.mattermost.demo-plugin","error":"failed to ensure demo channels: CreateChannel: A channel with that name already exists on the same team., Channelexists id=8g4dwmod77nkbyynaiyxjo1f1y Error 1062: Duplicate entry 'demo_plugin-z1599abuzffy8bdh4do9qzetho' for key 'Name'"}
{"level":"error","ts":1591898535.4448636,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"fom4du8r9pft9cycarqipexuhc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898535.5482078,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"y6bpsf5fx3f59ey6odwgbxre3c","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898537.1768587,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"cd8wkacsgp8pjd3e5sx1ryh6fc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898537.3703146,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"4opk4n3tkpfrjbqde94cpcaq5o","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898538.4109979,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"7nqki141etnqtxgqtu4rrbhopy","error":"SqlUserStore.Save: This team has reached the maximum number of allowed accounts. Contact your System Administrator to set a higher limit., "}
{"level":"error","ts":1591898538.9740536,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"qfb1qrcbejywbj7hawkzuw1btw","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898539.131942,"caller":"[email protected]/stream.go:15","msg":" call to OnConfigurationChange failed, error: failed to ensure demo channels: CreateChannel: A channel with that name already exists on the same team., Channelexists id=1n46idtz47gpupjxmbrr6g8xte Error 1062: Duplicate entry 'demo_plugin-z1599abuzffy8bdh4do9qzetho' for key 'Name'","plugin_id":"com.mattermost.demo-plugin","source":"plugin_stderr"}
{"level":"error","ts":1591898539.135249,"caller":"mlog/sugar.go:23","msg":"Server configuration is not compatible","plugin_id":"com.mattermost.demo-plugin"}
{"level":"error","ts":1591898539.702591,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"fom4du8r9pft9cycarqipexuhc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898539.8073962,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"y6bpsf5fx3f59ey6odwgbxre3c","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898541.547894,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"cd8wkacsgp8pjd3e5sx1ryh6fc","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898541.740053,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"4opk4n3tkpfrjbqde94cpcaq5o","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898542.7785597,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"7nqki141etnqtxgqtu4rrbhopy","error":"SqlUserStore.Save: This team has reached the maximum number of allowed accounts. Contact your System Administrator to set a higher limit., "}
{"level":"error","ts":1591898543.3239017,"caller":"mlog/sugar.go:23","msg":"Failed add demo user to team","plugin_id":"com.mattermost.demo-plugin","teamID":"qfb1qrcbejywbj7hawkzuw1btw","error":"JoinUserToTeam: Email must be from a specific domain (e.g. @example.com). Please ask your team or system administrator for details., "}
{"level":"error","ts":1591898543.475797,"caller":"mlog/log.go:175","msg":"Unable to activate plugin","plugin_id":"com.mattermost.demo-plugin","error":"failed to ensure demo channels: CreateChannel: A channel with that name already exists on the same team., Channelexists id=nbg69tj3gfy6icpyoswosou5pa Error 1062: Duplicate entry 'demo_plugin-z1599abuzffy8bdh4do9qzetho' for key 'Name'"}

I think error where the user cannot join certain team due to email validation would be expected but the channel creation issue is preventing the demo plugin from starting up.

Steps:

Make an example of using the Custom Status plugin API methods

With the additions from mattermost/mattermost#17435 (comment), plugins can now access the APIs around managing a user's custom status. This makes it so plugins can:

  • Get a user's custom status
  • Change the user's custom status
  • Remove the user's custom status

The task here is to create slash commands to make use of these newly added methods:

  • /demo custom_status get
  • /demo custom_status update (...value)
  • /demo custom_status delete

Each command should reflect the current user's custom status state.

You will need to deploy the commit from the PR mattermost/mattermost#17435 to have access to the plugin API methods. To checkout this code:

  • cd mattermost-server - wherever you have this on your filesystem
  • with hub installed, run hub pr checkout 17435

this plugin requires Mattermost v5.30.0 or later?

{"level":"error","ts":1607756624.6742744,"caller":"mlog/log.go:229","msg":"Unable to activate plugin","plugin_id":"com.mattermost.demo-plugin","error":"this plugin requires Mattermost v5.30.0 or later"}

Perform config validation in its own function, rather than using `OnConfigurationChange` to check

I understand we are calling OnConfigurationChange here to make sure we exit if we cannot create the channel or user. Nevertheless, I wonder if we should separate this in a different function (e.g. CreateUserAndChannel). Semantically, here there are no configuration changes. We are just trying to create the channel and the user to exit if they cannot be created.

Originally posted by @larkox in https://github.com/mattermost/mattermost-plugin-demo/timeline

Edit: GitHub's "Reference in new issue" feature seems to have created a broken link above. Here's the actual comment this ticket came from #109 (comment)

Demo Pluigin should fail to start if the demo_plugin cannot be created

I'm seeing an issue with demo plugin where it behaves strangely because the demon_plugin user can not get created due to password policies.

  • The plugin will start
  • The demo_plugin user will be missing
  • The plugin channel will not get created on team
  • @mentions for any user on the server will incorrectly be prevented and the user will be informed that the demo_plugin should not be mentioned
  • All webhook events fail as the channel was not created

The broken @ mentions make this issue particularly bad as it breaks functionality that goes beyond the demo plugin.

Logs:

 {"level":"error","ts":1591296667.2939677,"caller":"[email protected]/stream.go:15","msg":" call to OnConfigurationChange failed, error: failed to ensure demo user: User.IsValid: Your password must contain at least 10 characters made up of at least one lowercase letter, at least one uppercase letter, at least one number, and at least one symbol (e.g. \"~!@#$%^&*()\").,","plugin_id":"com.mattermost.demo-plugin","source":"plugin_stderr"}
{"level":"error","ts":1591296667.296541,"caller":"mlog/sugar.go:23","msg":"Server configuration is not compatible","plugin_id":"com.mattermost.demo-plugin"}
{"level":"warn","ts":1591296667.2992775,"caller":"mlog/sugar.go:27","msg":"No demo channel id for team","plugin_id":"com.mattermost.demo-plugin","team":"7k9r98aqyjnz7gqbouz5fr44ea"}
{"level":"error","ts":1591296667.305288,"caller":"mlog/log.go:175","msg":"Plugin OnConfigurationChange hook failed","error":"failed to ensure demo user: User.IsValid: Your password must contain at least 10 characters made up of at least one lowercase letter, at least one uppercase letter, at least one number, and at least one symbol (e.g. \"~!@#$%^&*()\")., "}
{"level":"info","ts":1591296667.3181894,"caller":"bleveengine/bleve.go:267","msg":"UpdateConf Bleve"}
{"level":"error","ts":1591296667.3228917,"caller":"mlog/log.go:175","msg":"Plugin OnConfigurationChange hook failed","error":"failed to ensure demo user: User.IsValid: Your password must contain at least 10 characters made up of at least one lowercase letter, at least one uppercase letter, at least one number, and at least one symbol (e.g. \"~!@#$%^&*()\")., "}
{"level":"info","ts":1591296667.3425257,"caller":"cluster/cluster.go:332","msg":"This node attempted to join the cluster, but could not find any nodes."}
{"level":"info","ts":1591296682.344527,"caller":"cluster/cluster.go:332","msg":"This node attempted to join the cluster, but could not find any nodes."}
{"level":"error","ts":1591296695.8007276,"caller":"plugin/health_check.go:59","msg":"Health check failed for plugin","id":"com.mattermost.demo-plugin","error":"Plugin RPC connection is not responding"}
{"level":"error","ts":1591296695.800773,"caller":"mlog/log.go:175","msg":"RPC call OnDeactivate to plugin failed.","plugin_id":"com.mattermost.demo-plugin","error":"connection is shut down"}
{"level":"warn","ts":1591296695.8008316,"caller":"plugin/hclog_adapter.go:69","msg":"error closing client during Kill","plugin_id":"com.mattermost.demo-plugin","wrapped_extras":"errconnection is shut down"}
{"level":"warn","ts":1591296695.800849,"caller":"plugin/hclog_adapter.go:71","msg":"plugin failed to exit gracefully","plugin_id":"com.mattermost.demo-plugin"}
{"level":"error","ts":1591296695.8944583,"caller":"[email protected]/stream.go:15","msg":" call to OnConfigurationChange failed, error: failed to ensure demo user: User.IsValid: Your password must contain at least 10 characters made up of at least one lowercase letter, at least one uppercase letter, at least one number, and at least one symbol (e.g. \"~!@#$%^&*()\").,","plugin_id":"com.mattermost.demo-plugin","source":"plugin_stderr"}
{"level":"error","ts":1591296695.8967557,"caller":"mlog/sugar.go:23","msg":"Server configuration is not compatible","plugin_id":"com.mattermost.demo-plugin"}
{"level":"warn","ts":1591296695.898923,"caller":"mlog/sugar.go:27","msg":"No demo channel id for team","plugin_id":"com.mattermost.demo-plugin","team":"7k9r98aqyjnz7gqbouz5fr44ea"}

We should:

  1. Change the stock password we're using for the demo_plugin to match stricter requirements OR It may make more sense if the user was actually a bot.
  2. If the user or channel can't be created - Don't start the plugin. This way I will go see what's wrong in the logs instead of assuming the plugin is working properly

Steps:

  • Create or locate a server where the demo plugin has never been enabled (can create a cloud server)
  • Set strict password policies with minimum length o 10 and requiring special characters
  • Enable the plugin
    Observed: Plugin starts but does not work properly

FileWillBeUploaded does not implement the server hook

The FileWillBeUploaded hook in file_hooks.go is never called by the server, as it does not implement the function defined by the interface.

The plugin's function signature is:

FileWillBeUploaded(c *plugin.Context, fileInfo *model.FileInfo, reader bytes.Reader, buf *bytes.Buffer)

but the one defined in the interface is:

FileWillBeUploaded(c *Context, info *model.FileInfo, file io.Reader, output io.Writer) (*model.FileInfo, string)

We need to change the signature to match the one defined by the interface and check that it actually gets called when a file is uploaded.

Demo plugin minimum version seems to have changed

There seems to be an issue with the new Demo plugin release 0.9.0

When doing release testing for 5.29 - I noticed the plugin will not start.
Logs show: "Unable to activate plugin","plugin_id":"com.mattermost.demo-plugin","error":"this plugin requires Mattermost v5.30.0 or later"}

When looking at the releases page, I see 5.26.0 listed as the minimum version still.

Issue about build web app

after clone code i can't able to install npm and also having multiples errors about packages can you please suggest which node version we can use and also get errors in rhs files.

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.