Free Mattermost Integration APP - Community Feedback Requested

Hello. I am going to develop Mattermost integration application for ERPNext. I published first prototype source code here https://github.com/semilimes/messaging_mattermost. But I am not fully understand how many DocTypes should this application have, which functionality should be for every DocType, where to store Mattermost user accounts, etc. Could you please review and share your ideas about that. Thx

2 Likes

Wonderful feature! We use mattermost for some notifications from ERPNext (not all). Your API will greatly help in standardizing the notifications. The following are some set of doctypes/events that mattermost notifications can be used for -

  1. Submission of Leave Application
    2.Approval/Rejection of Leave Application
  2. Submission of Salary Slip
  3. Submission of a Material Request
  4. Submission of Purchase Receipt
  5. Submission of PO
    ā€¦one can go on with almost all the doctypes. If a provision is available to set each doctype to use mattermost notification on certain events (much like existing email Alerts) that will be good.
1 Like

Design document:

  • Matttermost Connection settings will be stored in ā€œDesk | Setup | Email | Mattermost Settingsā€. DocType ā€œMattermost Settingsā€ with type ā€œSystemā€ will be created in the folder in Frappe/frappe/core/doctype. In the file Frappe/frappe/config/setup.py new Setup item for Mattermost settings will be added.
  • The folder Frappe/frappe/mattermost will be created. This folder will contain:
  1. mattermost.py with post() method as like as frappe.desk.page.messages.messages.post(). It will create doc ā€œCommunicationā€, Communication_Type = ā€˜Notificationā€™, Type (communication_medium) = ā€œChatā€. Thats all. It will not doing nothing.
  2. Python-wrapper class for Mattermost. The only one method will be used - for send message
  • Update handler Communicationn.after_insert(): after_insert() ā†’ it will call async task which will send message in Mattermost send2mattermost().delay(). This task will be stored in Frappe/frappe/tasks.py and executed by Celery (in case of Python RQ @celery_task decorator will be deleted and method will be called via frappe.utils.background_jobs.enqueue(method, **kwargs)). This async task will call Frappe/frappe/mattermost for ā€œCommunicationā€ docs
  • Add in all necessary DocType checkbox for Mattermost and in chechboxes handles add call of mattermost.post() method from Frappe/frappe/mattermost.

for anybody who (as me) might be wondering what Mattermost is

Mattermost is an open source, self-hosted Slack-alternative ā€¦ to proprietary SaaS messaging, Mattermost brings all your team communication into one place, making it searchable and accessible anywhere.

Hello, kirthi. Your requirements realized in branch ā€œmattermostā€ in repositories https://github.com/semilimes/frappe and https://github.com/semilimes/bench (no any changes in erpnext repository). Please look at it and give any feedback.
I created Pull request Mattermost Notification by osya Ā· Pull Request #1657 Ā· frappe/frappe Ā· GitHub

@osya I see some conversations going on in your pull request. Guess I have to wait until it is done or complete to test this?

@kirthi. You may wait. And you may test it now. Do what you want

I need to insert somewhere in frappe piece of code which will do infinite loop and asking websocket connection. Where do you recommend to insert it?

is there any updates in this project? the Github is no longer available

1 Like

Iā€™d quote vrms in this case.

thats a shame; otherwise, this would be a promising integration. itā€™d take messaging and communication to the next level

Actually, even though aforementioned pull request was closed, the commits are still retrievable in case you want.
Iā€™m not a legal expert, so canā€™t promote this possible act as non-violating, taking into account that at some point Semilimes have closed all their public repos. Probably that happened after Alex Kozlovā€™s letter, which was mentioned by osya.

thanks Iā€™ll try contact osya on Github to see if we can revive this integration

1 Like

Does anyone what license it was released under?

the files in the pull request inherited Frappe MIT License, and that because the didnā€™t put it in its on app and used hooks, instead they were implementing it with in frappe which i think was a mistake

2 Likes

Take a try, but I had impression, that Semilimes turned out to be not too responsive eventually.

2 Likes

If youā€™re sure, that the commits inherited MIT, then weā€™re free to go.

1 Like

even the pull request files had MIT license written on them, but yeah we need to make sure

Then you should be good to go. Just read it.

https://opensource.org/licenses/MIT

The MIT License (MIT)
Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ā€œSoftwareā€), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ā€œAS ISā€, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

you can also check whether the project was forked @ Community-Apps-for-erpnext Ā· GitHub