-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Convert Message-Star Package to js #6781
Conversation
@@ -0,0 +1,69 @@ | |||
/*globals StarredMessage */ |
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.
I can't find the coffee version of this file
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.
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.
Can you delete the file in your commit? Or do you want to keep the old .coffee file?
@@ -0,0 +1,33 @@ | |||
Meteor.publish('starredMessages', function(rid, limit) { | |||
if (limit == null) { |
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.
Use default values here
this.hasMore = new ReactiveVar(true); | ||
this.limit = new ReactiveVar(50); | ||
return this.autorun(() => { | ||
return () => { |
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.
Why this function? It'll never be called
return () => { | ||
const sub = this.subscribe('starredMessages', this.data.rid, this.limit.get()); | ||
if (sub.ready()) { | ||
if (StarredMessage.find({ |
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.
Do not break the if, move the find to a variable
@RocketChat/core