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

Convert Message-Star Package to js #6781

Merged
merged 5 commits into from
Apr 27, 2017
Merged

Convert Message-Star Package to js #6781

merged 5 commits into from
Apr 27, 2017

Conversation

MartinSchoeler
Copy link
Contributor

@RocketChat/core

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6781 April 24, 2017 19:37 Inactive
@@ -0,0 +1,69 @@
/*globals StarredMessage */
Copy link
Member

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

Copy link
Contributor Author

@MartinSchoeler MartinSchoeler Apr 27, 2017

Choose a reason for hiding this comment

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

Copy link
Member

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) {
Copy link
Member

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 () => {
Copy link
Member

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({
Copy link
Member

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

@rodrigok rodrigok merged commit b75c867 into develop Apr 27, 2017
@rodrigok rodrigok deleted the message-star-to-js branch April 27, 2017 17:11
@rodrigok rodrigok added this to the 0.57.0 milestone May 17, 2017
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.

3 participants