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 Mentions-Flextab Package to Js #6689

Merged
merged 3 commits into from
Apr 24, 2017
Merged

Convert Mentions-Flextab Package to Js #6689

merged 3 commits into from
Apr 24, 2017

Conversation

MartinSchoeler
Copy link
Contributor

@RocketChat/core

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6689 April 13, 2017 20:39 Inactive
@engelgabriel engelgabriel modified the milestone: 0.56.0 Apr 18, 2017
this.hasMore = new ReactiveVar(true);
this.limit = new ReactiveVar(50);
return this.autorun(() => {
return this.subscribe('mentionedMessages', this.data.rid, this.limit.get(), function() {
Copy link
Member

Choose a reason for hiding this comment

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

The old code uses => and had this inside, you should keep the arrow function.

this.limit = new ReactiveVar(50);
return this.autorun(() => {
return this.subscribe('mentionedMessages', this.data.rid, this.limit.get(), function() {
if (MentionedMessage.find({
Copy link
Member

Choose a reason for hiding this comment

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

Please, do not break que if condition, extract the find to a variable if you prefer.

@@ -18,15 +18,15 @@ Package.onUse(function(api) {
api.use('templating', 'client');
Copy link
Member

Choose a reason for hiding this comment

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

Remove the package coffeescript

@@ -0,0 +1,35 @@
Meteor.publish('mentionedMessages', 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 the default values

@engelgabriel engelgabriel requested a deployment to rocket-chat-pr-6689 April 20, 2017 18:13 Pending
@engelgabriel engelgabriel requested a deployment to rocket-chat-pr-6689 April 20, 2017 18:14 Pending
@rodrigok rodrigok merged commit 460244e into develop Apr 24, 2017
@rodrigok rodrigok deleted the mentions-to-js branch April 24, 2017 17:55
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.

None yet

3 participants