Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Snippet message #4623
I made a plugin to handle snippets into RocketChat. It is not finished yet but some review from the community would be awesome.
How it works
After that, the message containing the snippet is formatted as you could do it using the "```". The system also create a new message containing the link to access to your snippet.
You can also access to your snippet with the tab bar on your right.
You can disable or enable this feature in the "Message" administration section
Please do not hesitate to review the code and give me your thoughts about this plugin :)
@rodrigok Little question. Because you mentioned that permissions were not set in the request.js file, I wanted to manage it to directly in the snippet page as well. Unfortunately it's just front-end (using FlowRouter) so I can't do proper queries to the mongo, I managed permissions into the publication 'snippetedMessage' but it gives me an empty template (which makes sense but that's really ugly).
I was wondering if you have an idea of where I could manage this permission and send to the user a proper 403 response.
@juanwolf We can start with this ugly solution and start a new PR for improvements. One way is use method to get data instead of subscriptions, in fact we are replacing a lot of subscriptions by methods, then you can receive the response for your single record or an error and manage the template to show the correct result easily.