The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/assistify-threading/client/threadFromMessageBox.js

33 lines
823 B

import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { messageBox, modal } from 'meteor/rocketchat:ui-utils';
import { settings } from 'meteor/rocketchat:settings';
Meteor.startup(function() {
Tracker.autorun(() => {
if (settings.get('Thread_from_context_menu') !== 'button') {
return messageBox.actions.remove('Create_new', /start-thread/);
}
messageBox.actions.add('Create_new', 'Thread', {
id: 'start-thread',
icon: 'thread',
condition: () => true,
action(data) {
modal.open({
// title: t('Message_info'),
content: 'CreateThread',
data: {
...data,
onCreate() {
modal.close();
},
},
showConfirmButton: false,
showCancelButton: false,
// confirmButtonText: t('Close'),
});
},
});
});
});