escolalms/mattermost
Mattermost
What does it do
This package is used for Mattermost integration.
It listens for Events then add/remove user for mattermost and particular channels either as standard user or admin.
Installing
composer require escolalms/mattermost
Example
You can configure the package using Facade
Config::set('mattermost.package_status', PackageStatusEnum::ENABLED);
Config::set('mattermost.servers.default.host', 'localhost');
Config::set('mattermost.servers.default.login', 'login');
Config::set('mattermost.servers.default.password', 'password');
or /api/admin/config endpoint
$this->actingAs($this->user, 'api')->json(
'POST',
'/api/admin/config',
[
'config' => [
[
'key' => 'mattermost.package_status',
'value' => PackageStatusEnum::ENABLED,
],
[
'key' => 'mattermost.servers.default.host',
'value' => 'localhost',
],
[
'key' => 'mattermost.servers.default.login',
'value' => 'login',
],
[
'key' => 'mattermost.servers.default.password',
'value' => 'password',
],
]
]
);
Endpoints
All the endpoints are defined in
Test
Run ./vendor/bin/phpunit to run tests. See tests folder as it's quite good staring point as documentation appendix.
Test details
Listeners
Handling events
EscolaLms\Auth\Events\AccountConfirmed=> add user to MattermostEscolaLms\Auth\Events\AccountDeleted=> remove user from MattermostEscolaLms\Auth\Events\AccountBlocked=> block user accountEscolaLms\Courses\Events\CourseAssigned=> add user to course channel with member roleEscolaLms\Courses\Events\CourseUnassigned=> remove user from course channelEscolaLms\Courses\Events\CourseTutorAssigned=> add user to course channel with channel_admin roleEscolaLms\Courses\Events\CourseTutorUnassigned=> remove user from course channelEscolaLms\Webinar\Events\WebinarUserAssigned=> add user to webinar channel with member roleEscolaLms\Webinar\Events\WebinarUserUnassigned=> remove user from webinar channelEscolaLms\Webinar\Events\WebinarTrainerAssigned=> add user to webinar channel with channel_admin roleEscolaLms\Webinar\Events\WebinarTrainerUnassigned=> remove user from webinar channel
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 0.1.6 | >=7.4 | >=8.0 | MIT | |
| 0.1.5 | >=7.4 | >=8.0 | MIT | |
| 0.1.4 | >=7.4 | >=8.0 | MIT | |
| 0.1.3 | >=7.4 | >=8.0 | MIT | |
| 0.1.2 | >=7.4 | >=8.0 | MIT | |
| 0.1.1 | >=7.4 | >=8.0 | MIT | |
| 0.1.0 | >=7.4 | >=8.0 | MIT | |
| 0.0.10 | >=7.4 | >=8.0 | MIT | |
| 0.0.9 | >=7.4 | >=8.0 | MIT | |
| 0.0.8 | >=7.4 | >=8.0 | MIT | |
| 0.0.7 | >=7.4 | >=8.0 | MIT | |
| 0.0.6 | >=7.4 | >=8.0 | MIT | |
| 0.0.5 | >=7.4 | >=8.0 | MIT | |
| 0.0.4 | >=7.4 | >=8.0 | MIT | |
| 0.0.3 | >=7.4 | >=8.0 | MIT | |
| 0.0.2 | >=7.4 | >=8.0 | MIT | |
| 0.0.1 | >=7.4 | >=8.0 | MIT |