|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
import { Meteor } from 'meteor/meteor'; |
|
|
|
|
import { Tracker } from 'meteor/tracker'; |
|
|
|
|
import { Template } from 'meteor/templating'; |
|
|
|
|
|
|
|
|
|
import { settings } from '../../../settings/client'; |
|
|
|
|
import { MessageAction } from '../../../ui-utils/client'; |
|
|
|
@ -7,6 +8,15 @@ import { messageArgs } from '../../../ui-utils/client/lib/messageArgs'; |
|
|
|
|
import { chatMessages } from '../../../ui/client'; |
|
|
|
|
import { addMessageToList } from '../../../ui-utils/client/lib/MessageAction'; |
|
|
|
|
|
|
|
|
|
Template.room.events({ |
|
|
|
|
'click [data-message-action="reply-in-thread"]'(event, template) { |
|
|
|
|
const button = MessageAction.getButtonById(event.currentTarget.dataset.messageAction); |
|
|
|
|
if ((button != null ? button.action : undefined) != null) { |
|
|
|
|
button.action.call(this, event, template); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
Meteor.startup(function() { |
|
|
|
|
Tracker.autorun(() => { |
|
|
|
|
if (!settings.get('Threads_enabled')) { |
|
|
|
@ -34,7 +44,7 @@ Meteor.startup(function() { |
|
|
|
|
return Boolean(subscription); |
|
|
|
|
}, |
|
|
|
|
order: 1, |
|
|
|
|
group: 'menu', |
|
|
|
|
group: 'message', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|