Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Deprecated Shared Secret Package #6540

Merged
merged 5 commits into from
Mar 31, 2017
Merged

Conversation

MartinSchoeler
Copy link
Contributor

@RocketChat/core

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6540 March 30, 2017 18:34 Inactive
const SharedSecret = [];

if (Meteor.isServer) {
const EncryptMessage = (() => {
Copy link
Member

@ggazzo ggazzo Mar 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to "make a class", I think that you removed/forgot one () here

const Class = (()=>{return function(){}})()

nowadays you can just use class EncryptMessage {...}

but I think that in all situations could be simple functions.
like:

function HandleSlashCommand(command, params, item) {...}

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6540 March 30, 2017 19:35 Inactive
const SharedSecret = [];

if (Meteor.isServer) {
const EncryptMessage = ((message) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use named function for theses cases (high level functions / were we used classes before) to help the stack trace.

function EncryptMessage(message) {

if (message.urls) {
const messageUrls = message.urls;
messageUrls.forEach((i) => {
const urls = messageUrls[i];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The i is the urls already. Just rename the i to urls and remove the const urls = messageUrls[i];

return message;
})();

const HandleSlashCommand = ((command, params, item) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here

}

if (Meteor.isClient) {
const DecryptMessage = ((message) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here

if (message.urls) {
const messageUrls = message.urls;
messageUrls.forEach((i) => {
const urls = messageUrls[i];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here

return message;
})();

const HandleSlashCommand = ((command, params, item) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here

@Kiran-Rao
Copy link
Contributor

This may be a stupid question, but I don't see this package used anywhere.

It's not within .meteor/packages

@rodrigok
Copy link
Member

@Kiran-Rao You are right.

I'll double check that

@rodrigok
Copy link
Member

@Kiran-Rao we decided to remove the package, it was there as an optional package.

@MartinSchoeler Can you delete the files and add a note to HISTORY.md about this removal? Like Removed Deprecated Package rocketchat:sharedsecret

and update history
@MartinSchoeler MartinSchoeler changed the title Convert Shared Secret Package to Js Remove Deprecated Shared Secret Package Mar 31, 2017
@rodrigok rodrigok added this to the 0.55.0 milestone Mar 31, 2017
@engelgabriel engelgabriel merged commit 190a743 into develop Mar 31, 2017
@engelgabriel engelgabriel deleted the shared-secret-to-js branch March 31, 2017 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants