-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Conversation
const SharedSecret = []; | ||
|
||
if (Meteor.isServer) { | ||
const EncryptMessage = (() => { |
There was a problem hiding this comment.
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) {...}
const SharedSecret = []; | ||
|
||
if (Meteor.isServer) { | ||
const EncryptMessage = ((message) => { |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here
This may be a stupid question, but I don't see this package used anywhere. It's not within |
@Kiran-Rao You are right. I'll double check that |
@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 |
and update history
@RocketChat/core