Skip to content

Commit

Permalink
Convert rocketchat-message-mark-as-unread to main module structure (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto authored and rodrigok committed Dec 3, 2018
1 parent 4295158 commit 171616a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { RoomManager, ChatSubscription } from 'meteor/rocketchat:ui';

Meteor.startup(() => {
RocketChat.MessageAction.addButton({
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-message-mark-as-unread/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './actionButton';
14 changes: 3 additions & 11 deletions packages/rocketchat-message-mark-as-unread/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,8 @@ Package.onUse(function(api) {
'rocketchat:lib',
'rocketchat:logger',
'rocketchat:ui',
'templating',
]);

api.use('templating', 'client');

api.addFiles([
'client/actionButton.js',
], 'client');

api.addFiles([
'server/logger.js',
'server/unreadMessages.js',
], 'server');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});
1 change: 1 addition & 0 deletions packages/rocketchat-message-mark-as-unread/server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './unreadMessages';
2 changes: 2 additions & 0 deletions packages/rocketchat-message-mark-as-unread/server/logger.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Logger } from 'meteor/rocketchat:logger';

const logger = new Logger('MessageMarkAsUnread', {
sections: {
connection: 'Connection',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import logger from './logger';

Meteor.methods({
unreadMessages(firstUnreadMessage, room) {
const userId = Meteor.userId();
Expand Down

0 comments on commit 171616a

Please sign in to comment.